Implement EJB 2.x applications
Use this task when we are implementing EJB 2.x applications.
Based on the EJB specification, enterprise beans are Java components that typically implement the business logic of J2EE applications as well as access data. IBM WebSphere Application Server provides broad support for enterprise beans, including the EJB 2.x and EJB 3.0 and EJB 3.1 specifications. The EJB 2.x specification includes a container-managed persistence (CMP) 2.0 component model, which provides a number of improvements to aid developer productivity and application performance. The EJB 3.0 and 3.1 specifications simplify the development of business logic and data handling for enterprise applications.
This task lists the steps needed to implement EJB 2.x application in WAS, including tuning and troubleshooting tips.
Tasks
- Migrate enterprise bean code.
- EJB v2.1-compliant beans can be assembled only in an EJB 2.1-compliant module, although an EJB 2.1-compliant module can contain a mixture of Version 1.x and v2.1 beans.
- Develop EJB 2.x applications.
- We can develop an EJB application or prepare an existing application. For Enterprise JavaBeans™ (EJB) 2.x CMP entity beans, we can use the partial update feature to specify how we want to update the persistent attributes of the CMP bean to the database. This feature is provided as a bean-level persistence option, called PartialOperation, in the access intent policy configured for the bean.
- Assemble EJB 2.x applications.
- This topic assumes that we have created and unit tested an enterprise bean file to assemble in an enterprise application and deploy onto an application server. Now we are assembling EJB modules based on the EJB 2.x and earlier specifications. We can apply an access intent policy to an application's entity beans through the assembly tool.
- Deploy EJB 2.x applications.
- When we deploy an EJB module, we install that module on a server configured to support deployed modules.
- Administer EJB 2.x applications.
- Each application server can have a single EJB container; one is created automatically for you when the application server is created. We can back up entity beans, enable, and disable session beans.
- Secure EJB 2.x applications.
- We can protect enterprise bean methods by assigning security roles to them. Before we assign security roles, we need to know which EJB methods need protecting and how to protect them.
- Tune EJB 2.x applications.
- If we use applications that affect the size of the EJB container cache, it is possible that the performance of the applications can be impacted by an incorrect size setting. Container managed persistence (CMP) is discussed in this topic, although it is important to know that entity beans are not supported in an EJB 3.x module. One of the steps in tuning your EJB container to optimum performance levels is to fine-tune the EJB cache.
- Troubleshoot EJB 2.x applications.
- Use these troubleshooting tips for problems related to accessing enterprise beans and access intents for EJB 2.x entity beans.
We have implemented EJB 2.x applications on WAS.