1 Reply Latest reply on Jan 13, 2012 4:10 PM by Jason Porter

    ConcurrentAccessTimeoutException when using SFSB with seam-transaction

    Gonne Martens Novice

      I have a simple war project with a servlet, a stateful session bean and the library seam-transaction-3.1.0.Final.jar deployed to JBoss 7.1.0.CR1b.


      When the second method of the SFSB is called as shown in the code below, the following exception is thrown




      JBAS014134: EJB Invocation failed on component TestSFSB for method public void de.mobileview.playground.TestSFSB2.methodTxNotSupported(): javax.ejb.EJBException: javax.ejb.ConcurrentAccessTimeoutException: JBAS014360:
      EJB 3.1 FR 4.3.14.1 concurrent access timeout on org.jboss.invocation.InterceptorContext@2d899c4f - could not obtain lock within 5000 MILLISECONDS
           at org.jboss.as.ejb3.tx.CMTTxInterceptor.notSupported(CMTTxInterceptor.java:282)


      If I disable the TransactionServletListener by setting the context param org.jboss.seam.transaction.disableListener to true it all works as expected.


      @Stateful
      public class TestSFSB {
      
          @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
          public void methodTxNotSupported() {
              System.out.println("methodNotSupported");
          }
          
          @TransactionAttribute(TransactionAttributeType.REQUIRED)
          public void methodTxRequired() {
              System.out.println("methodTxRequired");
          }    
      }
      
      @WebServlet("/TestServlet")
      public class TestServlet extends HttpServlet {
      
          @EJB private TestSFSB testBean;
      
          protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
      
           testBean.methodTxRequired();
           testBean.methodTxNotSupported();
               
           response.getWriter().println("OK");
          }
      }