6 Replies Latest reply on Jun 19, 2007 1:09 PM by William DeCoste

    JBAS-4489 - Suspending Incomplete BMT transactions

    Adrian Brock Master

      http://jira.jboss.com/jira/browse/JBAS-4489

      I see you were already suspending incomplete transactions,
      which means you had already seen and resolved the problem.

      I think there is still an issue that you should be throwing an exception
      for the incomplete transaction, otherwise the caller isn't going to know it failed!

      The real problem is that my test is broken, it doesn't assert that it actually
      got the expected exception. It should be something like:

       public void testTxTimeout()
       {
      + boolean gotException = true;
       BMTCleanUp remote = (BMTCleanUp) sessionCtx.getEJBObject();
       try
       {
       remote.doTimeout();
       }
       catch (EJBException expected)
       {
       // expected
       expected.printStackTrace();
      + gotException = true;
       }
      + if (gotException == false)
      + throw new EJBException("Did not get expected exception for incomplete transaction");
       checkTransaction();
       remote.doNormal();
       }