This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: DSRA9002E : ResourceException with Container-Managed Transactions