7 Replies Latest reply on Aug 13, 2013 6:29 AM by Stephen Coy

    Singleton Bean Transaction Management

    method_ben_qc Newbie

      Hi,

       

       

      Anyone know if the annotation @TransactionTimeout is honnored on a method annoted with @PostConstruct in a startup singleton bean ?

      My Singleton Bean:

       

       

      import javax.annotation.PostConstruct;

      import javax.annotation.PreDestroy;

      import javax.ejb.Singleton;

      import javax.ejb.Startup;

      import javax.ejb.TransactionAttribute;

      import javax.ejb.TransactionAttributeType;

       

       

      @Startup

      @Singleton

      public class StartupBean

      {

           private static final Log LOGGER = LogFactory.getLog(StartupBean.class);

       

           @PostConstruct

           @TransactionTimeout(1800000)

        @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)

           public void init()

           {

            // Call another EJB.

           }

      }

       

       

      My transaction reaches is timeout after 5 minutes which is the setting in my standalone.xml:

       

       

      <subsystem xmlns="urn:jboss:domain:transactions:1.1">

                  <core-environment>

                      <process-id>

                          <uuid/>

                      </process-id>

                  </core-environment>

                  <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>

                  <coordinator-environment default-timeout="300"/>

      </subsystem>

       

       

      Thank you