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.
Can someone please tell me why I get this strange error and how to solve it? On rare occasions I am getting the below error output from JBOSS. This is when I attempt to load a hibernate encapsulated object from the DB. The load is requested by a servlet which references methods in a stateless session bean, but in this case does not use any of the referenced methods. The load is also not explicitly enclosed in a transaction. JBOSS 3.0.4 Hibernate 1.0 MYSQL Connector 3.0.8
This message in the log clearly states that the transaction(through which the load of the hibernate object or some other operation was being carried out) has timed-out. As a result the state of the transaction has been set to MARKED_FOR_ROLLBACK. Further operations in context of this timed-out transaction, will lead to the exception mentioned in the stack trace.
Solution to such problems is, either reduce the amount of activity being carried out as part of a transaction or increase the transaction timeout on the EJB(which is by default 5 minutes, set in the jboss-service.xml present in %JBOSS_HOME%/server/default/conf directory) [ July 03, 2006: Message edited by: jaikiran pai ]