aspose file tools*
The moose likes Websphere and the fly likes DSRA9002E : ResourceException with Container-Managed Transactions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "DSRA9002E : ResourceException with Container-Managed Transactions" Watch "DSRA9002E : ResourceException with Container-Managed Transactions" New topic
Author

DSRA9002E : ResourceException with Container-Managed Transactions

Amit Xerxes
Greenhorn

Joined: Dec 28, 2004
Posts: 2
Our team has run into problems with the usage of EJB container-managed transactions. The specific exception I am encountering is :
(java.sql.SQLException: DSRA9002E: ResourceException with error code null: javax.resource.ResourceException: enlist: caught Exception

The platform I am running on is IBM Websphere Application Server 5.1 with DB2. The JDBC driver for data access is the Type 2 DB2 Universal JDBC Driver - XA.

All data access within the application is routed though a single / central stateless session fa�ade. The fa�ade delegates the call to a set of "manager classes", which then invoke different DAO classes to perform the required data access operations. Some of these data access operations require transactional support, which I am accomplishing using container-managed transactions. The transaction attribute is set to "Required" for the methods that need this level of transactional support. This framework has actually been working fine for the last several weeks.

Very recently, this error has been induced by some "faulty" code or configuration. Bypassing the WEB/EJB layer and hitting the DAO layer directly (fired through a test JSP/JUnit) works perfectly fine. I tested this against the latest code multiple times and all is well on that front. What that essentially means is that the problem is being triggered somewhere in the Struts/WEB or EJB layer.

From the details of the exception, it's pretty clear that the container was unable to enlist the connection within the scope of the transaction. As a workaround, I set the transaction attribute to "Supports" for all the methods, and that caused things to start working. Clearly though, that is not the long-term solution since we do need container-managed transactions to work for us.

Any help on this would be much appreciated.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DSRA9002E : ResourceException with Container-Managed Transactions