Examples of LocalXAException


Examples of org.jboss.jca.core.spi.transaction.local.LocalXAException

      if (trace)
         log.tracef("start(%s, %s)", xid, flags)
     
      if (currentXid != null && flags == XAResource.TMNOFLAGS)
      {
         throw new LocalXAException(bundle.tryingStartNewTxWhenOldNotComplete(
               currentXid, xid, flags), XAException.XAER_PROTO);
      }
     
      if (currentXid == null && flags != XAResource.TMNOFLAGS)
      {
         throw new LocalXAException(bundle.tryingStartNewTxWithWrongFlags(xid, flags), XAException.XAER_PROTO);
      }

      if (currentXid == null)
      {
         try
         {
            cl.getManagedConnection().getLocalTransaction().begin();
         }
         catch (ResourceException re)
         {
            throw new LocalXAException(bundle.errorTryingStartLocalTx(), XAException.XAER_RMERR, re);
         }
         catch (Throwable t)
         {
            throw new LocalXAException(bundle.throwableTryingStartLocalTx(), XAException.XAER_RMERR, t);
         }

         currentXid = xid;
      }
   }
View Full Code Here

Examples of org.jboss.jca.core.spi.transaction.local.LocalXAException

    */
   public void commit(Xid xid, boolean onePhase) throws XAException
   {
      if (!xid.equals(currentXid))
      {
         throw new LocalXAException(bundle.wrongXidInCommit(currentXid, xid), XAException.XAER_PROTO);
        
      }
     
      currentXid = null;

      try
      {
         cl.getManagedConnection().getLocalTransaction().commit();
      }
      catch (ResourceException re)
      {
         connectionManager.returnManagedConnection(cl, true);
         throw new LocalXAException(bundle.couldNotCommitLocalTx(), XAException.XA_RBROLLBACK, re);
      }
   }
View Full Code Here

Examples of org.jboss.jca.core.spi.transaction.local.LocalXAException

   /**
    * {@inheritDoc}
    */
   public void forget(Xid xid) throws XAException
   {
      throw new LocalXAException(bundle.forgetNotSupportedInLocalTx(), XAException.XAER_RMERR);
   }
View Full Code Here

Examples of org.jboss.jca.core.spi.transaction.local.LocalXAException

   /**
    * {@inheritDoc}
    */
   public Xid[] recover(int flag) throws XAException
   {
      throw new LocalXAException(bundle.noRecoverWithLocalTxResourceManagers(), XAException.XAER_RMERR);
   }
View Full Code Here

Examples of org.jboss.jca.core.spi.transaction.local.LocalXAException

    */
   public void rollback(Xid xid) throws XAException
   {
      if (!xid.equals(currentXid))
      {
         throw new LocalXAException(bundle.wrongXidInRollback(currentXid, xid), XAException.XAER_PROTO)
      }
      currentXid = null;
      try
      {
         cl.getManagedConnection().getLocalTransaction().rollback();
      }
      catch (ResourceException re)
      {
         connectionManager.returnManagedConnection(cl, true);
         throw new LocalXAException(bundle.couldNotRollbackLocalTx(), XAException.XAER_RMERR, re);
      }
   }
View Full Code Here

Examples of org.jboss.jca.core.spi.transaction.local.LocalXAException

   /**
    * {@inheritDoc}
    */
   public void forget(Xid xid) throws XAException
   {
      throw new LocalXAException(bundle.forgetNotSupportedInLocalTx(), XAException.XAER_RMERR);
   }
View Full Code Here

Examples of org.jboss.jca.core.spi.transaction.local.LocalXAException

   /**
    * {@inheritDoc}
    */
   public Xid[] recover(int flag) throws XAException
   {
      throw new LocalXAException(bundle.noRecoverWithLocalTxResourceManagers(), XAException.XAER_RMERR);
   }
View Full Code Here

Examples of org.jboss.jca.core.spi.transaction.local.LocalXAException

      if (trace)
         log.tracef("start(%s, %s)", xid, flags)
     
      if (currentXid != null && flags == XAResource.TMNOFLAGS)
      {
         throw new LocalXAException(bundle.tryingStartNewTxWhenOldNotComplete(
               currentXid, xid, flags), XAException.XAER_PROTO);
      }
     
      if (currentXid == null && flags != XAResource.TMNOFLAGS)
      {
         throw new LocalXAException(bundle.tryingStartNewTxWithWrongFlags(xid, flags), XAException.XAER_PROTO);
      }

      if (currentXid == null)
      {
         try
         {
            cl.getManagedConnection().getLocalTransaction().begin();
         }
         catch (ResourceException re)
         {
            throw new LocalXAException(bundle.errorTryingStartLocalTx(), XAException.XAER_RMERR, re);
         }
         catch (Throwable t)
         {
            throw new LocalXAException(bundle.throwableTryingStartLocalTx(), XAException.XAER_RMERR, t);
         }

         currentXid = xid;
      }
   }
View Full Code Here

Examples of org.jboss.jca.core.spi.transaction.local.LocalXAException

    */
   public void commit(Xid xid, boolean onePhase) throws XAException
   {
      if (!xid.equals(currentXid))
      {
         throw new LocalXAException(bundle.wrongXidInCommit(currentXid, xid), XAException.XAER_PROTO);
        
      }
     
      currentXid = null;

      try
      {
         cl.getManagedConnection().getLocalTransaction().commit();
      }
      catch (ResourceException re)
      {
         connectionManager.returnManagedConnection(cl, true);
         throw new LocalXAException(bundle.couldNotCommitLocalTx(), XAException.XA_RBROLLBACK, re);
      }
   }
View Full Code Here

Examples of org.jboss.jca.core.spi.transaction.local.LocalXAException

   /**
    * {@inheritDoc}
    */
   public void forget(Xid xid) throws XAException
   {
      throw new LocalXAException(bundle.forgetNotSupportedInLocalTx(), XAException.XAER_RMERR);
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.