Package javax.transaction.xa

Examples of javax.transaction.xa.XAException.initCause()


         {
            XAException xae = new XAException("Connection unavailable for xa recovery");
            xae.errorCode = XAException.XA_RETRY;
            if (error != null)
            {
               xae.initCause(error);
            }
            HornetQXAResourceWrapper.log.debug("Cannot get connectionFactory XAResource", xae);
            throw xae;
         }
         else
View Full Code Here


         {
            XAException xae = new XAException("Error trying to connect to any providers for xa recovery");
            xae.errorCode = XAException.XAER_RMERR;
            if (error != null)
            {
               xae.initCause(error);
            }
            HornetQXAResourceWrapper.log.debug("Cannot get connectionFactory XAResource", xae);
            throw xae;
         }
View Full Code Here

         {
            XAException xae = new XAException("Connection unavailable for xa recovery");
            xae.errorCode = XAException.XA_RETRY;
            if (error != null)
            {
               xae.initCause(error);
            }
            if (HornetQJMSServerLogger.LOGGER.isDebugEnabled())
            {
               HornetQJMSServerLogger.LOGGER.debug("Cannot get connectionFactory XAResource", xae);
            }
View Full Code Here

         {
            XAException xae = new XAException("Error trying to connect to any providers for xa recovery");
            xae.errorCode = XAException.XAER_RMERR;
            if (error != null)
            {
               xae.initCause(error);
            }
            if (HornetQJMSServerLogger.LOGGER.isDebugEnabled())
            {
               HornetQJMSServerLogger.LOGGER.debug("Cannot get connectionFactory XAResource", xae);
            }
View Full Code Here

      if (result == null)
      {
         XAException xae = new XAException("Error trying to connect to provider " + providerName);
         xae.errorCode = XAException.XAER_RMERR;
         if (error != null)
            xae.initCause(error);
         log.debug("Cannot get delegate XAResource", xae);
         throw xae;
      }
     
      return result;
View Full Code Here

      {
         XAException xae = new XAException("Error trying to connect to provider " + connectorFactoryClassName);
         xae.errorCode = XAException.XAER_RMERR;
         if (error != null)
         {
            xae.initCause(error);
         }
         HornetQXAResourceWrapper.log.debug("Cannot get connectionFactory XAResource", xae);
         throw xae;
      }
View Full Code Here

        } catch (Throwable e) {
            LOG.warn("PRE-PREPARE FAILED: ", e);
            rollback();
            XAException xae = new XAException("PRE-PREPARE FAILED: Transaction rolled back.");
            xae.errorCode = XAException.XA_RBOTHER;
            xae.initCause(e);
            throw xae;
        }
    }

    private void doPostCommit() throws XAException {
View Full Code Here

            // I guess this could happen. Post commit task failed
            // to execute properly.
            LOG.warn("POST COMMIT FAILED: ", e);
            XAException xae = new XAException("POST COMMIT FAILED");
            xae.errorCode = XAException.XAER_RMERR;
            xae.initCause(e);
            throw xae;
        }
    }

    public void rollback() throws XAException, IOException {
View Full Code Here

            // I guess this could happen. Post commit task failed
            // to execute properly.
            LOG.warn("POST ROLLBACK FAILED: ", e);
            XAException xae = new XAException("POST ROLLBACK FAILED");
            xae.errorCode = XAException.XAER_RMERR;
            xae.initCause(e);
            throw xae;
        }
    }

    public int prepare() throws XAException, IOException {
View Full Code Here

            LOG.warn("COMMIT FAILED: ", e);
            rollback();
            // Let them know we rolled back.
            XAException xae = new XAException("COMMIT FAILED: Transaction rolled back.");
            xae.errorCode = XAException.XA_RBOTHER;
            xae.initCause(e);
            throw xae;
        }

        setState(Transaction.FINISHED_STATE);
        context.getTransactions().remove(xid);
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.