EJB applications

The workbench provides a specialized environment that you can use to develop and test enterprise beans that conform to the distributed component architecture defined in the Sun Microsystems Enterprise JavaBeans™ (EJB) specification. This product supports the Enterprise JavaBeans 1.1, 2.0, and 2.1 specification levels.

This product also supports extended Enterprise JavaBeans functionality provided by WebSphere® Application Server, including extensions to the specification and security and other bindings.

The complete Enterprise JavaBeans specifications and descriptions of the technology are available from the java.sun.com Web site.

If you are not familiar with enterprise beans or related EJB technology, see EJB architecture for a brief description of key EJB concepts.

The EJB development environment includes the following tools:

J2EE perspective
All of the EJB tools are accessible from the J2EE perspective. This perspective provides a layout in which the most commonly used actions, views, and wizards for J2EE and EJB development are easily accessible
Creating enterprise beans
The EJB tools help you create enterprise beans (either with or without inheritance), such as session beans, container-managed persistence (CMP) entity beans, bean-managed persistence (BMP) entity beans, or message-driven beans. The EJB deployment descriptor editor helps you set deployment descriptor and assembly properties for your enterprise beans.

You can also accomplish complementary enterprise bean development activities, such as writing and editing business logic, importing or exporting enterprise beans, and maintaining both your enterprise bean source code and generated code using the built in Java™ development tools, along with the team and version control capabilities of the workbench.

Creating access beans
You can also create access beans and add other attributes such as relationships. Access beans are Java bean wrappers for enterprise beans, which are typically used by client programs, such as Java ServerPages (JSP) files, servlets, and sometimes even other enterprise beans.
Building data persistence into enterprise beans
The EJB mapping tools help you map entity enterprise beans to back-end data stores, such as relational databases. There is support for top-down, bottom-up, and meet-in-the-middle mapping development. You can also create schemas and maps from existing EJB JAR files. For more information about mapping, see Approaches for mapping enterprise beans to database tables .
Generating deployment code
The EJB tools generate the deployment classes that allow your beans to run on an EJB server. These tools mask the complexities normally associated with creating deployment classes, such as generating RMI-over-IIOP stubs and EJB container-specific deployment code.

The tools support session beans, CMP entity beans, BMP entity beans, and message-driven beans (EJB 2.x only). They also allow you to create relational database tables for CMP entity beans. After the deployment code is generated, you can export your enterprise beans to a JAR or EAR file for installation on an EJB server, such as the WebSphere Application Server.

Validating enterprise bean and access bean code
The EJB tools automatically validate that your enterprise bean code is consistent and that it conforms to the rules defined by the Enterprise JavaBeans specifications. Code verification occurs whenever an enterprise bean or its properties are changed. Errors and warnings are displayed in the Problems view of the workbench. Files with errors also display error icons.

The EJB tools also automatically validate that access beans are constructed correctly and that they are consistent with their associated enterprise beans. Code validation occurs whenever you create or edit access beans.

Related concepts
EJB architecture
Annotation-based programming overview
Related tasks
Developing enterprise beans
Creating enterprise beans

Feedback