Feature Pack for EJB 3.0

The Feature Pack for EJB 3.0 implements the Enterprise JavaBeans (EJB) Version 3.0 and Java Persistence API (JPA) specifications.

These specifications simplify the development of business logic and data handling for enterprise applications and were developed using the following guidelines:

The JPA specification provides a new persistence framework that is based on successful industry patterns. JPA uses a simple object relational mapping layer over the top of a typical Java Database Connectivity (JDBC) resource usage pattern. JPA uses simple JavaBeans classes or POJO to represent relational database content, which is suitable for most Java developers. You can use basic resource access patterns to fetch and store state in the database while using POJO classes instead of JDBC persistence APIs.

Example

The following is an example of how these principles are used in the development of a transactional stateful session bean:
@Stateful
public class Cart3Bean implements ShoppingCart {
	private ArrayList contents = new ArrayList();
	
	public void addToCart (Object o) {
		contents.add(o);
	}
	
	public Collection getContents() {
		return contents;
	}
}
The stateful annotation defines this component as a stateful session bean. By default, a single interface implemented by a bean defaults to a local business interface and its methods default to a transaction attribute of Required. It is no longer necessary to create XML deployment descriptors when using the EJB 3.0 feature pack.

Since the class only implements application-defined interfaces and methods, you can easily test your applications outside of the container using typical JUnit-style test patterns. This increases rapid development productivity by reducing the edit-compile-deploy-debug cycles that are associated with Java 2 Platform, Enterprise Edition (J2EE) applications.

There are no migration issues associated with installing the Feature Pack for EJB 3.0. Existing applications should continue to run as is and compile without errors.

However, when you install applications enhanced with EJB 3.0 components using the application installation wizard, there are some changes:
  • You no longer need to specify, nor are you prompted for, bean bindings for EJB components. You have the option of leaving all EJB references blank and using the AutoLink feature instead. For more information about AutoLink, see the topic EJB 3.0 application bindings support.
  • The EJB deployment tool is not available for EJB 3.0 modules therefore, EJB deployment tool settings are disabled.



Subtopics
Feature Pack for EJB 3.0 limitations
Related concepts
Feature packs
What is new in the Version 6.1 Feature Pack for EJB 3.0
Related tasks
Task overview: Storing and retrieving persistent data with the Java Persistence API (JPA)
Planning to install Feature Pack for EJB 3.0
Installing Feature Pack for EJB 3.0 on z/OS
Installing Feature Pack for EJB 3.0 on distributed operating systems
Installing Feature Pack for EJB 3.0 on IBM i
Related reference
Options for the AdminApp object install, installInteractive, edit, editInteractive, update, and updateInteractive commands
Concept topic Concept topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Aug 31, 2013 2:56:59 AM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=pix&product=was-nd-dist&topic=covr_featurepack_ejb
File name: covr_featurepack_ejb.html