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

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Rejected
    • Affects Version/s: 6.0.0.CR1
    • Fix Version/s: 6.0.0.Final
    • Component/s: EJB
    • Labels:
      None

      Description

      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()

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  wolfc Carlo de Wolf
                  Reporter:
                  marius.bogoevici Marius Bogoevici
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: