2 Replies Latest reply on Mar 24, 2005 6:07 PM by Scott Stark

    Transaction timeout behavior

    Andreas Knecht Newbie

      First off, I know that there are several related topics to this (i've done plenty of searching), however I haven't found an answer yet that's satisfying.

      We have two different systems in production, one of which on JBoss 3.2.3 and the other on 3.2.5. Both use stateless session beans.

      The issue we are experiencing with both is that one particular backend system that we depend on sometimes never returns. As a result, the calling thread hangs, and never releases its resources, which slowly over time consumes all the available resources.

      Now the obvious solution would be to fix up the backend system. However this is not possible, since a.) we don't look after this system, b.) it would be too expensive to fix it.

      The problem comes down to what's mentioned in the documentation as a longstanding bug in JBoss, which is that the transaction gets marked for rollback, but doesn't actually rollback (and release all its resources).

      There's two work arounds that I can think of at the moment:
      1.) Implement a timer that will simply throw an exception before we reach the end of a transaction (causing the method to abort and release all it's resources).
      2.) Regularly scan through all the transactions marked for rollback and release them.

      I'm not a very experienced JBoss user and thus don't have much knowledge of how feasible either of those two options are. Has anyone here encountered this problem before?

      PS: Please not replies along the lines of "Don't use this backend system".