# Creating enterprise beans with XDoclet annotation support

You can use a wizard to create session beans and message-driven beans that support XDoclet annotation.

Before you can create an enterprise bean, you must:

- Define an EJB project to contain the enterprise bean. See Creating EJB projects.
- Install XDoclet annotation support and enable it. See Configuring XDoclet annotation support.

After you create an EJB project, you can add enterprise beans to the EJB project in one of the following ways:

- Create new enterprise beans.
- Import enterprise beans from EJB JAR files.

A wizard helps you to create enterprise beans. You can use the Enterprise Bean Creation wizard to generate an enterprise bean while avoiding the complexities that exist between the different types of beans. The wizard helps you add enterprise beans to you project by creating entirely new enterprise beans.

With the wizard, you can create three types of enterprise beans: session beans and message-driven beans (EJB 2.0 or later projects only):

- Create a session bean. For more information, see Creating session beans with XDoclet annotation support.
- Create a CMP entity bean. For more information, see Creating container-managed persistence (CMP) entity beans with XDoclet annotation support.
- Create a message-driven bean. For more information, see Creating message-driven beans with XDoclet annotation support.

- Creating session beans with XDoclet annotation support
  You can use a wizard to create a session bean and add it to your project.
- Creating container-managed persistence (CMP) entity beans with XDoclet annotation support
  You can use a wizard to create a CMP entity bean and add it to your project.
- Creating message-driven beans with XDoclet annotation support
  You can use a wizard to create a message-driven bean and add it to your project.
- Configuring XDoclet annotation support
  To use XDoclet annotation support, or to create enterprise beans, XDoclet must be installed on your system and configured to work with the workbench.

Parent topic: EJB 2.x application development