Package org.jboss.seam.transaction

Examples of org.jboss.seam.transaction.UserTransaction


      return entityManager;
   }

   private void joinTransaction() throws SystemException
   {
      UserTransaction transaction = Transaction.instance();
      if ( transaction.isActive() )
      {
         transaction.enlist(entityManager);
         try
         {
            transaction.registerSynchronization(this);
            synchronizationRegistered = true;
         }
         catch (Exception e)
         {
            synchronizationRegistered = PersistenceProvider.instance().registerSynchronization(this, entityManager);
View Full Code Here


      return entityManager;
   }

   private void joinTransaction() throws SystemException
   {
      UserTransaction transaction = Transaction.instance();
      if ( transaction.isActive() )
      {
         transaction.enlist(entityManager);
         try
         {
            transaction.registerSynchronization(this);
            synchronizationRegistered = true;
         }
         catch (Exception e)
         {
            synchronizationRegistered = PersistenceProvider.instance().registerSynchronization(this, entityManager);
View Full Code Here

  
   protected void rollbackTransactionIfNecessary()
   {
      try
      {
         UserTransaction transaction = Transaction.instance();
         if ( transaction.isActiveOrMarkedRollback() || transaction.isRolledBack() )
         {
            log.debug("killing transaction");
            transaction.rollback();
         }
      }
      catch (Exception te)
      {
         log.error("could not roll back transaction", te);
View Full Code Here

    */
   protected void raiseTransactionFailedEvent()
   {
      try
      {
         UserTransaction tx = Transaction.instance();
         if ( tx.isRolledBackOrMarkedRollback() )
         {
            if (Events.exists()) Events.instance().raiseEvent(TRANSACTION_FAILED, tx.getStatus());
         }
      }
      catch (Exception e) {} //swallow silently, not important
   }
View Full Code Here

    */
   protected void raiseTransactionFailedEvent()
   {
      try
      {
         UserTransaction tx = Transaction.instance();
         if ( tx.isRolledBackOrMarkedRollback() )
         {
            if (Events.exists()) Events.instance().raiseEvent(TRANSACTION_FAILED, tx.getStatus());
         }
      }
      catch (Exception e) {} //swallow silently, not important
   }
View Full Code Here

      return jbpmContext;
   }

   private void joinTransaction() throws SystemException
   {
      UserTransaction transaction = Transaction.instance();
     
      if ( !transaction.isActiveOrMarkedRollback() )
      {
         throw new IllegalStateException("JbpmContext may only be used inside a transaction");
      }
     
      if ( !synchronizationRegistered && !Lifecycle.isDestroying() && transaction.isActive() )
      {
         jbpmContext.getSession().isOpen();
         try //TODO: what we really want here is if (!cmt)
         {
            transaction.registerSynchronization(this);
         }
         catch (UnsupportedOperationException uoe)
         {
            jbpmContext.getSession().getTransaction().registerSynchronization(this);
         }
View Full Code Here

  
   protected void rollbackTransactionIfNecessary()
   {
      try
      {
         UserTransaction transaction = Transaction.instance();
         if ( transaction.isActiveOrMarkedRollback() || transaction.isRolledBack() )
         {
            log.debug("killing transaction");
            transaction.rollback();
         }
      }
      catch (Exception te)
      {
         log.error("could not roll back transaction", te);
View Full Code Here

      return entityManager;
   }

   private void joinTransaction() throws SystemException
   {
      UserTransaction transaction = Transaction.instance();
      if ( transaction.isActive() )
      {
         transaction.enlist(entityManager);
         try
         {
            transaction.registerSynchronization(this);
            synchronizationRegistered = true;
         }
         catch (Exception e)
         {
            synchronizationRegistered = PersistenceProvider.instance().registerSynchronization(this, entityManager);
View Full Code Here

         boolean transactionActive = false;
        
         try
         {
            UserTransaction tx = Transaction.instance();
            try
            {
               transactionActive = tx.isActive();
            }
            catch (SystemException se)
            {
               log.debug("could not get transaction status while destroying persistence context");
            }
View Full Code Here

      return session;
   }

   private void joinTransaction() throws SystemException
   {
      UserTransaction transaction = Transaction.instance();
      if ( transaction.isActive() )
      {
         session.isOpen();
         try
         {
            transaction.registerSynchronization(this);
         }
         catch (Exception e)
         {
            session.getTransaction().registerSynchronization(this);
         }
View Full Code Here

TOP

Related Classes of org.jboss.seam.transaction.UserTransaction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.