Pearl
09-11-2008, 12:06 PM
We are interfacing with a system that is performing database transactions with EJB2.0 entities with Container Managed Relationships (CMRs). Our db transactions begin with a Delegate kicking off the transaction with a remote call to the session facade in the first jar. Then a series of local entity calls are done as the first part of the transaction in that same jar. Once those entities are updated, the transaction needs to continue with another session facade and local entities, but they exist in another jar. Of course this does not work because you can't use CMRs across jars. Does anyone know of a way to wrap the entire transaction so that we can make use of the code that uses the CMRs in the first jar and continue on with our transaction in the second jar using a DAO or another set of entities AND all occur in the one transaction so that if an error occurs in the very last table in the second jar, the entire transaction would be rolled back? If anyone knows of a way to make this all work and still use the CMRs in the first jar as part of the transaction, we would like to hear it.