Package javax.resource.spi

Examples of javax.resource.spi.LocalTransaction


    /**
     * @see javax.resource.spi.ManagedConnection#getLocalTransaction()
     */
    public LocalTransaction getLocalTransaction() throws ResourceException {
        return new LocalTransaction() {

            public void begin() {
                // TODO: jms api does not have a begin...
                // add a method to ActiveMQSession to allow for this.
            }
View Full Code Here


   public void tidyup() throws ResourceException
   {
      // We have a hanging transaction
      if (localTransaction.get())
      {
         LocalTransaction local = null;
         ManagedConnection mc = getManagedConnection();
         try
         {
            local = mc.getLocalTransaction();
         }
         catch (Throwable t)
         {
            throw new ResourceException(bundle.unfinishedLocalTransaction(this), t);
         }
         if (local == null)
            throw new ResourceException(bundle.unfinishedLocalTransactionNotProvideLocalTransaction(this));
         else
         {
            local.rollback();
            log.debug("Unfinished local transaction was rolled back." + this);
         }
      }
   }
View Full Code Here

      if (HornetQRAManagedConnection.trace)
      {
         HornetQRALogger.LOGGER.trace("getLocalTransaction()");
      }

      LocalTransaction tx = new HornetQRALocalTransaction(this);

      if (HornetQRAManagedConnection.trace)
      {
         HornetQRALogger.LOGGER.trace("LocalTransaction=" + tx);
      }
View Full Code Here

     *
     * @return The local transaction for the connection.
     * @throws ResourceException
     */
    public LocalTransaction getLocalTransaction() throws ResourceException {
        LocalTransaction tx = new JmsLocalTransaction(this);
        if (log.isTraceEnabled()) {
            log.trace("LocalTransaction=" + tx);
        }
        return tx;
    }
View Full Code Here

      if (HornetQRAManagedConnection.trace)
      {
         HornetQRAManagedConnection.log.trace("getLocalTransaction()");
      }

      LocalTransaction tx = new HornetQRALocalTransaction(this);

      if (HornetQRAManagedConnection.trace)
      {
         HornetQRAManagedConnection.log.trace("LocalTransaction=" + tx);
      }
View Full Code Here

   public void tidyup() throws ResourceException
   {
      // We have a hanging transaction
      if (localTransaction.get())
      {
         LocalTransaction local = null;
         ManagedConnection mc = getManagedConnection();
         try
         {
            local = mc.getLocalTransaction();
         }
         catch (Throwable t)
         {
            throw new ResourceException(bundle.unfinishedLocalTransaction(this), t);
         }
         if (local == null)
            throw new ResourceException(bundle.unfinishedLocalTransactionNotProvideLocalTransaction(this));
         else
         {
            local.rollback();
            log.debug("Unfinished local transaction was rolled back." + this);
         }
      }
   }
View Full Code Here

   public void tidyup() throws ResourceException
   {
      // We have a hanging transaction
      if (localTransaction.get())
      {
         LocalTransaction local = null;
         ManagedConnection mc = getManagedConnection();
         try
         {
            local = mc.getLocalTransaction();
         }
         catch (Throwable t)
         {
            JBossResourceException.rethrowAsResourceException("Unfinished local transaction - " +
                  "error getting local transaction from " + this, t);
         }
         if (local == null)
            throw new ResourceException("Unfinished local transaction but managed connection does not " +
                  "provide a local transaction. " + this);
         else
         {
            local.rollback();
            getLog().debug("Unfinished local transaction was rolled back." + this);
         }
      }
   }
View Full Code Here

   public void tidyup() throws ResourceException
   {
      // We have a hanging transaction
      if (localTransaction.get())
      {
         LocalTransaction local = null;
         ManagedConnection mc = getManagedConnection();
         try
         {
            local = mc.getLocalTransaction();
         }
         catch (Throwable t)
         {
            JBossResourceException.rethrowAsResourceException("Unfinished local transaction - " +
                  "error getting local transaction from " + this, t);
         }
         if (local == null)
            throw new ResourceException("Unfinished local transaction but managed connection does not " +
                  "provide a local transaction. " + this);
         else
         {
            local.rollback();
            getLog().debug("Unfinished local transaction was rolled back." + this);
         }
      }
   }
View Full Code Here

      if (HornetQRAManagedConnection.trace)
      {
         HornetQRALogger.LOGGER.trace("getLocalTransaction()");
      }

      LocalTransaction tx = new HornetQRALocalTransaction(this);

      if (HornetQRAManagedConnection.trace)
      {
         HornetQRALogger.LOGGER.trace("LocalTransaction=" + tx);
      }
View Full Code Here

/*      */     public void tidyup()
/*      */       throws ResourceException
/*      */     {
/*  719 */       if (this.localTransaction.get())
/*      */       {
/*  721 */         LocalTransaction local = null;
/*  722 */         ManagedConnection mc = getManagedConnection();
/*      */         try
/*      */         {
/*  725 */           local = mc.getLocalTransaction();
/*      */         }
/*      */         catch (Throwable t)
/*      */         {
/*  729 */           JBossResourceException.rethrowAsResourceException("Unfinished local transaction - error getting local transaction from " + this, t);
/*      */         }
/*  731 */         if (local == null) {
/*  732 */           throw new ResourceException("Unfinished local transaction but managed connection does not provide a local transaction. " + this);
/*      */         }
/*      */
/*  735 */         local.rollback();
/*  736 */         this.log.debug("Unfinished local transaction was rolled back." + this);
/*      */       }
/*      */     }
View Full Code Here

TOP

Related Classes of javax.resource.spi.LocalTransaction

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.