Enterprise JavaBean 1.x wizard

This is a feature of JBuilder Enterprise.

Use the Enterprise JavaBean 1.x wizard to begin creating an enterprise bean that conforms to the EJB 1.x specification. The wizard creates either a session or an entity bean. Once the wizard generates the code, you then use JBuilder's code editor to add the methods and fill in method implementations that your enterprise bean requires.

If you have one or more existing database tables you want to use to create entity enterprise beans, use the EJB 1.x Entity Bean Modeler.

To display the Enterprise JavaBean 1.x wizard, choose File|New to display the object gallery, click the Enterprise tab, then double-click the Enterprise JavaBean 1.x wizard icon.



Select EJB module

This is a feature of JBuilder Enterprise.

Use this step to select the EJB module you want to use.

Available EJB Modules

Displays a list of EJB modules that are defined in your current project. Select the EJB module you want this new enterprise bean to belong to. If no EJB modules are listed or you want to create a new EJB module for the enterprise bean, click the New button to start the EJB Module wizard; once the EJB Module wizard finishes, the Enterprise JavaBean 1.x wizard resumes.



Create a new Enterprise JavaBean component

This is a feature of JBuilder Enterprise.

Use this step to specify the information needed to create a new EJB.

Class Information

The class information identifies the new enterprise bean class your are creating and specifies the class you want to use as the base class for the bean.

Package

Specify the package you want the new enterprise bean class to become part of.

Class Name

Type in the name of bean class you are creating. JBuilder suggests a default name, but you probably want to specify a more descriptive name.

Base Class

Specify a base class you want to use for the new bean class. By default, JBuilder suggests the java.lang.Object class.

Options

You are building either a session enterprise bean or an entity enterprise bean. The Options group allows you to select between these two types of beans. If you are building a session bean, you must also choose between a stateless and stateful session bean. For more information about session beans, see Developing session beans.

Stateless Session Bean

Select this option if you are creating a stateless session bean.

Stateful Session Bean

Select this option is you are creating a stateful session bean.

Session Synchronization

Select this option to have your stateful session bean class implement the SessionSynchronization interface. For information about using this interface, see The SessionSynchronization interface.

Bean Managed Persistence Entity Bean

Select the Bean Managed Persistence Entity Bean option if you want to create an entity bean with bean-managed persistence.

Container Managed Persistence EJB 1.1 Entity Bean

Select the Container Managed Persistence EJB 1.1 Entity Bean option if you want to create an entity bean with container-managed persistence.

Primary Key Class

If you are creating an entity bean, you must specify a primary key class. Enter the class that will be the type of the primary key for the bean.

The primary key is represented by a Java class or primitive data type containing the unique data. This primary key class can be any class as long as that class is a legal value type in RMI_IIOP. This means the class must extend the java.io.Serializable interface, and it must implement the Object.equals(Other other) and Object.hashCode() methods, which all Java classes inherit.

The primary key class can be specific to a particular entity bean class. That is, each entity bean can define its own primary key class. Or multiple entity beans can share the same primary key class.



Set EJB interface names

This is a feature of JBuilder Enterprise.

Enterprise Bean Class

Displays the name of the bean class you are creating.

Home Interface Class

The name of the home interface for the bean you are creating. JBuilder suggests a default name based on the name you entered for your bean class. You can accept this suggested name, or enter a new name for the home interface.

Remote Interface Class

The name of the remote interface for the bean you are creating. JBuilder suggests a default name based on the name you entered for your bean class. You can accept this suggested name, or enter a new name for the remote interface.

Bean Name

The name of the enterprise bean. JBuilder suggest a default name based on the name you entered for your bean class. You can accept this suggested name, or enter a new name for the bean name.

JNDI Name

The name JNDI uses to locate the enterprise bean. JBuilder suggests a default name based on the name you entered for your bean class. You can accept this suggested name, or enter a new name for the bean home name.

Generate Headers

Select this option if you want the name of the title, description, version number, company, author, and copyright labels to appear in a JavaDoc section at the top of the generated bean class file.