[Version 5.0.2 and later]Container Managed Persistence over anything

Before the release of WebSphere Business Integration Server Foundation Version 5.1, Container Managed Persistence (CMP) supported a number of relational backend systems. Users wanting to use the earlier WebSphere Application Server Enterprise Editions to host stateful and live business models needed a way to represent all the entities that existed in the business model, including non-relational backend systems. Version 5.1 addresses this need.

The CMP infrastructure is designed to work with the J2EE Connector Architecture (JCA), through an interface called EJBToRAAdapter. In addition to the current implementation of this interface (which connects to relational backend systems), Version 5.1 provides a new implementation that connects to procedural backend systems. The EJB Deployment tool can be used to return either of these implementations. The new procedural implementation contains generic logic for adapting between JCA and the WebSphere Application Server persistence manager. Note that all of the actual connection logic is contained down in the FunctionSet of the bean.

However, the CMP over anything (CMP/A) function is not limited to JCA connectors. There are other approaches to backend data store connectivity that you can use. CMP over the web services, which enable communication with backend systems indirectly through a web service using JAX-RPC, or WSIF are available. You can also use a composed EJB model, where a CMP bean delegates its persistence logic to another EJB.

So now you can develop a simple CMP bean that works with whatever backend system you need, rather than having to go the cumbersome Bean Managed Persistence (BMP) bean development route, where all of the connection logic must go directly in the bean implementation class.

Version 5.1 introduces support for pushdown methods, which can be thought of as container managed business methods. In the CMP framework, you can use the class called UserDefinedPushDownMethodsImpl, to place connectivity logic with a non-relational backend data store. The Java source code for this class is generated by the WebSphere Application Server deployment tools and contains methods corresponding to each CRUD method and each pushdown data-logic method defined in the PME EJB deployment descriptor.

This means that methods can be defined on a CMP bean that, rather than being implemented by the developer (in a BMP style of putting connection logic directly in the EJB's method implementation), are instead handled by the container and deployment tools. This is accomplished by defining the method as abstract, and then marking new PME extended deployment descriptor settings for these PushDownMethodElements. The new command-line code generation tool reads these extensions and generates appropriate entries.

WebSphere Business Integration Server Foundation Version 5.1 also includes a generic UserDefinedPushDownMethods interface (unrelated to the backend) and a UserDefinedPushDownMethodsImpl class that implements the interface and that is specific to a given backend. When a method has been marked userDefined, the FunctionSet is delegated to the corresponding method of the UserDefinedPushDownMethodsImpl. The implementer of the UserDefinedPushDownMethodsImpl does not need to worry about processing CCI Records - it can simply do its work and let the FunctionSet code take care of that.

See Example: Container Managed Persistence over anything -- CCI and Example: Container Managed Persistence over anything -- EJB for examples.

Version 5.1 provides tooling that you can invoke from the command line or from the Assembly Toolkit. The tool generates the bean's UserDefinedPushDownMethods interface, and generates skeleton Java source code for the bean's UserDefinedPushDownMethodsImpl class. You must fill this class in with the appropriate logic, compile it, and package it into the appropriate EJB JAR file. See Applying Container Managed Persistence services over anything for complete information.

The following links provide additional information concerning the procedural functions that use a CMP EJB. For relational stored procedure information, refer to Stored procedure support for CMP EJB.


Related tasks
Applying Container Managed Persistence services over anything
Related reference
Example: Container Managed Persistence over anything -- CCI
Example: Container Managed Persistence over anything -- EJB
Related topics
WSProceduralPushDownHelper



Searchable topic ID:   cejb_cmpa
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/ae/cejb_cmpa.html

Library | Support | Terms of Use | Feedback