Hello, I'm maintaining an application on jboss in which the developers decided to put business logic in the front end / jsp's and servlets etc..
also of course to accomplish this the transactions are started and commited in the frontend..
the problem that arrises is that if a unexpected exceptions happens the transaction that is opened in the frontend seems (according to log messages) to hang en never be closed.. then the what happens is that it seems the database connection cannot be used and for some reasen all connections to the database get exhausted almost immediately.. resulting in a application that is not functioning anymore until jboss is restarted..
Since its to much work now to rewrite the whole application.. What i did to overcome is, is enable the older transaction manager..(org.jboss.tm.TransactionManagerService) which has the options:
<!-- Force a rollback if another thread is associated with the transaction at commit -->
so i hoped this would help releasing the connections or close the transaction.. so the application would keep functioning.. but it did not help..
anyone has some idea's how i can fix the problem of connections getting exhausted/ transactions not getting closed ? without refactoring all the code to the ejb backend
Caused by: javax.transaction.RollbackException: Transaction TransactionImpl:XidImpl[FormatId=257, GlobalId=inotive01/2172842, BranchQual=, localId=2172842] cannot proceed STATUS_ROLLEDBACK
... 39 more
2010-10-20 20:55:11,416 DEBUG [org.hibernate.util.JDBCExceptionReporter] could not execute query [select ......]
com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed.