EJB Interfaces wizard

This is a feature of JBuilder Enterprise.

The EJB Interfaces wizard generates the required home and remote interfaces for your enterprise bean, specifies the bean home name, and allows you to specify which methods in the EJB you want exposed in the remote interface. Use this wizard if you have an existing bean class, but don't have a home or remote interface for it. If you make changes to the method signatures in the bean class, you can also use the EJB Interfaces wizard to regenerate home and remote interfaces that reflect the changes you've made. Any old home or remote interfaces will be overwritten. You can also use the Bean designer to update a remote interface without the need to regenerate it using the EJB Interfaces wizard.

If you've used the EJB Entity Bean Modeler to create an entity bean, you should avoid using the EJB Interfaces wizard to regenerate the home and remote interfaces because you are likely to lose important information placed in the home and remote interfaces by the EJB Entity Bean Modeler.

To use the wizard, open the bean class in JBuilder's code editor, then choose Wizards|EJB Interfaces. Follow these steps:

Step 1

Available EJB Groups

Displays a list of EJB groups that are defined in your current project. Select the EJB group you want this new enterprise bean to belong to. If no EJB groups are listed or you want to create a new EJB group for the enterprise bean, click the New button to start the Empty EJB Group wizard; once the Empty EJB Group wizard finishes, the EJB Interfaces wizard resumes.

Step 2

Enterprise Bean Class

Displays the name of the enterprise bean you are creating the home and remote interfaces for.

Home Interface Class

The wizard suggests a default name for the home interface based on the name of the bean class. If you want a different name, type it in here.

Remote Interface Class

The wizard suggests a default name for the remote interface based on the name of the bean class. If you want a different name, type it in here.

Bean Home Name(JNDI)

The bean home name is how the enterprise bean is identified through JNDI. The wizard suggests a default name for the bean home name based on the name of the bean class. If you want a different name, type it in here.

Session Bean Type

The Session Bean Type group appears if the bean is a session bean. For more information about session bean types, see Types of session beans.

Stateful

Check the Stateful option if you want the session bean to be a stateful bean.

Stateless

Check the Stateless option if you want the session bean to be a stateless bean.

Entity Bean Type

The Entity Bean Type group appears if the bean is an entity bean. For more information about entity bean types, see Persistence and entity beans.

Bean Managed Persistence

Check this option if you want the entity bean to have bean-managed persistence. An entity bean with bean-managed persistence contains the code to access and update a database. That is, you, as the bean provider, write database access calls directly in the entity bean or its associated classes.

Container Managed Persistence

Check this option if you want the entity bean to have container-managed persistence. You don't have to write code that accesses and updates databases for entity beans with container-managed persistence. Instead, the bean relies on the container to access and update the database.

Step 3

This page displays all the public business methods in your enterprise bean. Check the methods you want exposed in the remote interface. By default, all are checked.

Generate Headers

If you want header comments such as Title and Author generated at the top of the interfaces, check this option. You can then fill in the header information directly in the interfaces' source code.