EJB 3.x overview

[8.5.5.6 or later]You can use the workbench to develop and test enterprise beans that conform to the distributed component architecture defined in the Enterprise JavaBeans™ (EJB) 3.2 specification. EJB 3.2, 3.1, and 3.0 are supported.

Using the EJB 3.x specification, you can develop beans more simply than in the 2.1 standard. You can annotate your Java™™ source code to provide information that was previously contained in XML deployment descriptors. By using Java annotations, you can create EJBs and Java Persistence Architecture beans quickly and easily from plain old Java objects (POJOs). EJBs can be created without implementing EnterpriseBean interfaces.

This product supports the Enterprise JavaBeans™ 3.x. specification levels and offers minimal assembly tools for 2.x specification levels. Only session EJB bean types are supported in EJB 2.1 and earlier. Container-managed persistence (CMP) entity beans are not supported in EJB 2.1 and earlier in WebSphere Developer Tools. For more information about restrictions that apply when you use EJB 2.1 and earlier, see Known problems and limitations for WebSphere Application Server Developer Tools for Eclipse.

All the EJB tools in the product are accessible from the Java EE perspective in the workbench. You can create session beans (stateful or stateless) or message-driven beans by simply specifying the component defining annotation in your Java class. More configuration for your bean can be done by specifying more annotations in the Java class. The Java editor provides validation, content assistance, and QuickFixes for your EJB 3.x annotations, and support for refactoring beans. For richer assistance with the EJB 3.x annotations, you can use the Annotations view to add or delete annotations, and to modify the attribute values of annotations. Deployment descriptors for your EJB 3.x modules are optional, but can be created for extra configuration.

[8.5.5.6 or later]For more information about EJB 3.2, see the official specification: JSR 345: Enterprise JavaBeans 3.2 .

Java EE specification makes the creation of EJB 3.x applications simpler than previous EJB specifications. Java EE streamlines EJB development in the following ways:
  • Fewer required classes and interfaces
    • Home and object interfaces are no longer required – you need the business interface only
    • No need to implement javax.ejb.SessionBean
    • No need to declare checked exceptions
  • Optional deployment descriptors
    • Annotations provide component definition and dependency injection
  • Simple lookups
    • new EJBContext() interface method replaces JNDI calls
  • Lightweight persistence for object-relational mapping
    • Entities are POJOs that provide an object-oriented view of the data stored in relational database
  • Interceptors
    • Interceptors are objects that can intercept a call to a business method (to handle security for example)
    • Similar in purpose and action to Servlet filter or Web services handler
    • Provide limited form of aspect-oriented programming
Icon that indicates the type of topic Concept topic
Timestamp icon Last updated: July 17, 2017 21:58

File name: cejb3overview.html