Creating enterprise beans

You can use a wizard to create session beans, entity beans, and message-driven beans.

To create an enterprise bean, first have an EJB project defined. After you create an EJB project, you can add enterprise beans to the EJB project in one of the following ways:

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 or by defining them from existing Java classes.

For more information about creating enterprise beans by generating a bottom-up mapping from a database schema, see Generating beans by mapping from a database schema.

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

Creating session beans
You can use a wizard to create a session bean and add it to your project.

Creating entity beans with bean-managed persistence (BMP)
You can use the Create an Enterprise Bean wizard to create an entity bean that will manage its own persistence.

Creating entity beans with container-managed persistence (CMP)
You can use the Create an Enterprise Bean wizard to create a CMP entity bean.

Creating message-driven beans
You can use the Create an Enterprise Bean wizard to create EJB 2.0 or EJB 2.1 message-driven beans.

Creating session bean facades
Use the Create Session Bean Facade wizard to create session facades and their associated static SDOs for CMP entity beans.

Creating EJB access beans
You can use the Add an Access Bean wizard to generate an access bean for an EJB enterprise bean.

 

Related concepts

EJB application development
EJB architecture
Annotation-based programming overview

 

Related tasks

Developing enterprise beans