Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-8762

Opening a transaction from a Startup Singleton EJB @PostConstruct callback fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Critical Critical
    • 6.0.0.Final
    • 6.0.0.CR1
    • EJB
    • None

      A class like this:

      @Startup
      @Singleton
      public class PopulateDatabase
      {
      @Resource UserTransaction transaction;

      @PostConstruct
      public void startup()

      { utx.begin(); ... utx.commit(); ... }

      fails with:

      BaseTransaction.checkTransactionState - ARJUNA-16051 thread is already associated with a transaction!
      at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.begin(BaseTransaction.java:65) [:]
      at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.begin(BaseTransactionManagerDelegate.java:65) [:]
      at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.begin(ServerVMClientUserTransaction.java:137) [:]
      at org.jboss.weld.examples.pastecode.session.PopulateDatabase.startup(PopulateDatabase.java:94)

      at the utx.begin call()

              rhn-engineering-cdewolf Carlo de Wolf
              marius.bogoevici Marius Bogoevici (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: