Java Code Examples for javax.transaction.xa.XAException#XAER_DUPID

The following examples show how to use javax.transaction.xa.XAException#XAER_DUPID . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GenericXaResource.java    From scipio-erp with Apache License 2.0 6 votes vote down vote up
/**
 * @see javax.transaction.xa.XAResource#start(javax.transaction.xa.Xid xid, int flag)
 */
public void start(Xid xid, int flag) throws XAException {
    if (this.active) {
        if (this.xid != null && this.xid.equals(xid)) {
            throw new XAException(XAException.XAER_DUPID);
        }
        throw new XAException(XAException.XAER_PROTO);
    }
    if (this.xid != null && !this.xid.equals(xid)) {
        throw new XAException(XAException.XAER_NOTA);
    }

    this.setName("GenericXaResource-Thread");
    this.setDaemon(true);
    this.active = true;
    this.xid = xid;
    this.start();
}
 
Example 2
Source File: XATestUtil.java    From gemfirexd-oss with Apache License 2.0 5 votes vote down vote up
/**
 * Return a string for the error code of the XAException.
*/
public static String errorCode(XAException e)
{
    String error;
    switch(e.errorCode)
    {
    case XAException.XA_HEURCOM : error = "XA_HEURCOM "; break;
    case XAException.XA_HEURHAZ : error = "XA_HEURHAZ"; break;
    case XAException.XA_HEURMIX : error = "XA_HEURMIX"; break;
    case XAException.XA_HEURRB : error = "XA_HEURRB "; break;
    case XAException.XA_NOMIGRATE : error = "XA_NOMIGRATE "; break;
    case XAException.XA_RBCOMMFAIL : error = "XA_RBCOMMFAIL "; break;
    case XAException.XA_RBDEADLOCK : error = "XA_RBDEADLOCK "; break;
    case XAException.XA_RBINTEGRITY : error = "XA_RBINTEGRITY "; break;
    case XAException.XA_RBOTHER : error = "XA_RBOTHER "; break;
    case XAException.XA_RBPROTO : error = "XA_RBPROTO "; break;
    case XAException.XA_RBROLLBACK : error = "XA_RBROLLBACK "; break;
    case XAException.XA_RBTIMEOUT : error = "XA_RBTIMEOUT "; break;
    case XAException.XA_RBTRANSIENT : error = "XA_RBTRANSIENT "; break;
    case XAException.XA_RDONLY : error = "XA_RDONLY "; break;
    case XAException.XA_RETRY : error = "XA_RETRY "; break;
    case XAException.XAER_ASYNC : error = "XAER_ASYNC "; break;
    case XAException.XAER_DUPID : error = "XAER_DUPID "; break;
    case XAException.XAER_INVAL : error = "XAER_INVAL "; break;
    case XAException.XAER_NOTA : error = "XAER_NOTA "; break;
    case XAException.XAER_OUTSIDE : error = "XAER_OUTSIDE "; break;
    case XAException.XAER_PROTO : error = "XAER_PROTO "; break;
    case XAException.XAER_RMERR : error = "XAER_RMERR "; break;
    case XAException.XAER_RMFAIL : error = "XAER_RMFAIL "; break;
    default: error = Integer.toString(e.errorCode); break;
    }        
    return error;
}
 
Example 3
Source File: XATestUtil.java    From gemfirexd-oss with Apache License 2.0 5 votes vote down vote up
/**
 * Return a string for the error code of the XAException.
*/
public static String errorCode(XAException e)
{
    String error;
    switch(e.errorCode)
    {
    case XAException.XA_HEURCOM : error = "XA_HEURCOM "; break;
    case XAException.XA_HEURHAZ : error = "XA_HEURHAZ"; break;
    case XAException.XA_HEURMIX : error = "XA_HEURMIX"; break;
    case XAException.XA_HEURRB : error = "XA_HEURRB "; break;
    case XAException.XA_NOMIGRATE : error = "XA_NOMIGRATE "; break;
    case XAException.XA_RBCOMMFAIL : error = "XA_RBCOMMFAIL "; break;
    case XAException.XA_RBDEADLOCK : error = "XA_RBDEADLOCK "; break;
    case XAException.XA_RBINTEGRITY : error = "XA_RBINTEGRITY "; break;
    case XAException.XA_RBOTHER : error = "XA_RBOTHER "; break;
    case XAException.XA_RBPROTO : error = "XA_RBPROTO "; break;
    case XAException.XA_RBROLLBACK : error = "XA_RBROLLBACK "; break;
    case XAException.XA_RBTIMEOUT : error = "XA_RBTIMEOUT "; break;
    case XAException.XA_RBTRANSIENT : error = "XA_RBTRANSIENT "; break;
    case XAException.XA_RDONLY : error = "XA_RDONLY "; break;
    case XAException.XA_RETRY : error = "XA_RETRY "; break;
    case XAException.XAER_ASYNC : error = "XAER_ASYNC "; break;
    case XAException.XAER_DUPID : error = "XAER_DUPID "; break;
    case XAException.XAER_INVAL : error = "XAER_INVAL "; break;
    case XAException.XAER_NOTA : error = "XAER_NOTA "; break;
    case XAException.XAER_OUTSIDE : error = "XAER_OUTSIDE "; break;
    case XAException.XAER_PROTO : error = "XAER_PROTO "; break;
    case XAException.XAER_RMERR : error = "XAER_RMERR "; break;
    case XAException.XAER_RMFAIL : error = "XAER_RMFAIL "; break;
    default: error = Integer.toString(e.errorCode); break;
    }        
    return error;
}
 
Example 4
Source File: ServerSessionImpl.java    From activemq-artemis with Apache License 2.0 5 votes vote down vote up
@Override
public synchronized void xaStart(final Xid xid) throws Exception {
   if (tx != null) {
      ActiveMQServerLogger.LOGGER.xidReplacedOnXStart(tx.getXid().toString(), xid.toString());

      try {
         if (tx.getState() != Transaction.State.PREPARED) {
            // we don't want to rollback anything prepared here
            if (tx.getXid() != null) {
               resourceManager.removeTransaction(tx.getXid());
            }
            tx.rollback();
         }
      } catch (Exception e) {
         logger.debug("An exception happened while we tried to debug the previous tx, we can ignore this exception", e);
      }
   }

   tx = newTransaction(xid);

   if (logger.isTraceEnabled()) {
      logger.trace("xastart into tx= " + tx);
   }

   boolean added = resourceManager.putTransaction(xid, tx);

   if (!added) {
      final String msg = "Cannot start, there is already a xid " + tx.getXid();

      throw new ActiveMQXAException(XAException.XAER_DUPID, msg);
   }
}
 
Example 5
Source File: FBManagedConnection.java    From jaybird with GNU Lesser General Public License v2.1 5 votes vote down vote up
private void findIscTrHandle(Xid xid, int flags) throws SQLException, XAException {
    // FIXME return old tr handle if it is still valid before proceeding
    getGDSHelper().setCurrentTransaction(null);

    if (flags == XAResource.TMRESUME) {
        FbTransaction trHandle = xidMap.get(xid);
        if (trHandle == null) {
            throw new FBXAException(
                    "You are trying to resume a transaction that is not attached to this XAResource",
                    XAException.XAER_INVAL);
        }

        getGDSHelper().setCurrentTransaction(trHandle);
        return;
    }

    for (Xid knownXid : xidMap.keySet()) {
        boolean sameFormatId = knownXid.getFormatId() == xid.getFormatId();
        boolean sameGtrid = Arrays.equals(knownXid.getGlobalTransactionId(), xid.getGlobalTransactionId());
        boolean sameBqual = Arrays.equals(knownXid.getBranchQualifier(), xid.getBranchQualifier());
        if (sameFormatId && sameGtrid && sameBqual)
            throw new FBXAException(
                    "A transaction with the same XID has already been started",
                    XAException.XAER_DUPID);
    }

    // new xid for us
    try {
        FbTransaction transaction = getGDSHelper().startTransaction(tpb.getTransactionParameterBuffer());
        xidMap.put(xid, transaction);
    } catch (SQLException e) {
        throw new FBXAException(e.getMessage(), XAException.XAER_RMERR, e);
    }
}
 
Example 6
Source File: XATestUtil.java    From spliceengine with GNU Affero General Public License v3.0 5 votes vote down vote up
/**
 * Return a string for the error code of the XAException.
*/
public static String errorCode(XAException e)
{
    String error;
    switch(e.errorCode)
    {
    case XAException.XA_HEURCOM : error = "XA_HEURCOM "; break;
    case XAException.XA_HEURHAZ : error = "XA_HEURHAZ"; break;
    case XAException.XA_HEURMIX : error = "XA_HEURMIX"; break;
    case XAException.XA_HEURRB : error = "XA_HEURRB "; break;
    case XAException.XA_NOMIGRATE : error = "XA_NOMIGRATE "; break;
    case XAException.XA_RBCOMMFAIL : error = "XA_RBCOMMFAIL "; break;
    case XAException.XA_RBDEADLOCK : error = "XA_RBDEADLOCK "; break;
    case XAException.XA_RBINTEGRITY : error = "XA_RBINTEGRITY "; break;
    case XAException.XA_RBOTHER : error = "XA_RBOTHER "; break;
    case XAException.XA_RBPROTO : error = "XA_RBPROTO "; break;
    case XAException.XA_RBROLLBACK : error = "XA_RBROLLBACK "; break;
    case XAException.XA_RBTIMEOUT : error = "XA_RBTIMEOUT "; break;
    case XAException.XA_RBTRANSIENT : error = "XA_RBTRANSIENT "; break;
    case XAException.XA_RDONLY : error = "XA_RDONLY "; break;
    case XAException.XA_RETRY : error = "XA_RETRY "; break;
    case XAException.XAER_ASYNC : error = "XAER_ASYNC "; break;
    case XAException.XAER_DUPID : error = "XAER_DUPID "; break;
    case XAException.XAER_INVAL : error = "XAER_INVAL "; break;
    case XAException.XAER_NOTA : error = "XAER_NOTA "; break;
    case XAException.XAER_OUTSIDE : error = "XAER_OUTSIDE "; break;
    case XAException.XAER_PROTO : error = "XAER_PROTO "; break;
    case XAException.XAER_RMERR : error = "XAER_RMERR "; break;
    case XAException.XAER_RMFAIL : error = "XAER_RMFAIL "; break;
    default: error = Integer.toString(e.errorCode); break;
    }        
    return error;
}
 
Example 7
Source File: xaHelper.java    From gemfirexd-oss with Apache License 2.0 4 votes vote down vote up
private void handleException(Throwable t) throws SQLException
{
	if (t instanceof SQLException)
	{
		// let ij handle it
		throw (SQLException)t;
	}
	if (t instanceof XAException)
	{
		int errorCode = ((XAException)t).errorCode;
		String error = LocalizedResource.getMessage("IJ_IlleValu");

		// XA_RBBASE 100
		// XA_RBROLLBACK 100
		// XA_RBCOMMFAIL 101
		// XA_RBDEADLOCK 102
		// XA_RBINTEGRITY 103
		// XA_RBOTHER 104
		// XA_RBPROTO 105
		// XA_RBTIMEOUT 106
		// XA_RBTRANSIENT 107
		// XA_RBEND 107
		//
		// XA_RDONLY 3
		// XA_RETRY 4
		// XA_HEURMIX 5
		// XA_HEURRB 6
		// XA_HEURCOM 7
		// XA_HEURHAZ 8
		// XA_NOMIGRATE 9
		//
		// XAER_ASYNC -2
		// XAER_RMERR -3
		// XAER_NOTA -4
		// XAER_INVAL -5
		// XAER_PROTO -6
		// XAER_RMFAIL -7
		// XAER_DUPID -8
		// XAER_OUTSIDE -9

		switch(errorCode)
		{
		case XAException.XA_HEURCOM : error = "XA_HEURCOM "; break;
		case XAException.XA_HEURHAZ : error = "XA_HEURHAZ"; break;
		case XAException.XA_HEURMIX : error = "XA_HEURMIX"; break;
		case XAException.XA_HEURRB : error = "XA_HEURRB "; break;
		case XAException.XA_NOMIGRATE : error = "XA_NOMIGRATE "; break;
			// case XAException.XA_RBBASE : error = "XA_RBBASE "; break;
		case XAException.XA_RBCOMMFAIL : error = "XA_RBCOMMFAIL "; break;
		case XAException.XA_RBDEADLOCK : error = "XA_RBDEADLOCK "; break;
			// case XAException.XA_RBEND : error = "XA_RBEND "; break;
		case XAException.XA_RBINTEGRITY : error = "XA_RBINTEGRITY "; break;
		case XAException.XA_RBOTHER : error = "XA_RBOTHER "; break;
		case XAException.XA_RBPROTO : error = "XA_RBPROTO "; break;
		case XAException.XA_RBROLLBACK : error = "XA_RBROLLBACK "; break;
		case XAException.XA_RBTIMEOUT : error = "XA_RBTIMEOUT "; break;
		case XAException.XA_RBTRANSIENT : error = "XA_RBTRANSIENT "; break;
		case XAException.XA_RDONLY : error = "XA_RDONLY "; break;
		case XAException.XA_RETRY : error = "XA_RETRY "; break;
		case XAException.XAER_ASYNC : error = "XAER_ASYNC "; break;
		case XAException.XAER_DUPID : error = "XAER_DUPID "; break;
		case XAException.XAER_INVAL : error = "XAER_INVAL "; break;
		case XAException.XAER_NOTA : error = "XAER_NOTA "; break;
		case XAException.XAER_OUTSIDE : error = "XAER_OUTSIDE "; break;
		case XAException.XAER_PROTO : error = "XAER_PROTO "; break;
		case XAException.XAER_RMERR : error = "XAER_RMERR "; break;
		case XAException.XAER_RMFAIL : error = "XAER_RMFAIL "; break;
		}
		//t.printStackTrace(System.out);
		throw new ijException(error);

	}
	else // StandardException or run time exception, log it first
	{
		String info = LocalizedResource.getMessage("IJ_01SeeLog", t.toString(), t.getMessage());
		//		t.printStackTrace(System.out);
		throw new ijException(info);
	}
}
 
Example 8
Source File: xaHelper.java    From gemfirexd-oss with Apache License 2.0 4 votes vote down vote up
private void handleException(Throwable t) throws SQLException
{
	if (t instanceof SQLException)
	{
		// let ij handle it
		throw (SQLException)t;
	}
	if (t instanceof XAException)
	{
		int errorCode = ((XAException)t).errorCode;
		String error = LocalizedResource.getMessage("IJ_IlleValu");

		// XA_RBBASE 100
		// XA_RBROLLBACK 100
		// XA_RBCOMMFAIL 101
		// XA_RBDEADLOCK 102
		// XA_RBINTEGRITY 103
		// XA_RBOTHER 104
		// XA_RBPROTO 105
		// XA_RBTIMEOUT 106
		// XA_RBTRANSIENT 107
		// XA_RBEND 107
		//
		// XA_RDONLY 3
		// XA_RETRY 4
		// XA_HEURMIX 5
		// XA_HEURRB 6
		// XA_HEURCOM 7
		// XA_HEURHAZ 8
		// XA_NOMIGRATE 9
		//
		// XAER_ASYNC -2
		// XAER_RMERR -3
		// XAER_NOTA -4
		// XAER_INVAL -5
		// XAER_PROTO -6
		// XAER_RMFAIL -7
		// XAER_DUPID -8
		// XAER_OUTSIDE -9

		switch(errorCode)
		{
		case XAException.XA_HEURCOM : error = "XA_HEURCOM "; break;
		case XAException.XA_HEURHAZ : error = "XA_HEURHAZ"; break;
		case XAException.XA_HEURMIX : error = "XA_HEURMIX"; break;
		case XAException.XA_HEURRB : error = "XA_HEURRB "; break;
		case XAException.XA_NOMIGRATE : error = "XA_NOMIGRATE "; break;
			// case XAException.XA_RBBASE : error = "XA_RBBASE "; break;
		case XAException.XA_RBCOMMFAIL : error = "XA_RBCOMMFAIL "; break;
		case XAException.XA_RBDEADLOCK : error = "XA_RBDEADLOCK "; break;
			// case XAException.XA_RBEND : error = "XA_RBEND "; break;
		case XAException.XA_RBINTEGRITY : error = "XA_RBINTEGRITY "; break;
		case XAException.XA_RBOTHER : error = "XA_RBOTHER "; break;
		case XAException.XA_RBPROTO : error = "XA_RBPROTO "; break;
		case XAException.XA_RBROLLBACK : error = "XA_RBROLLBACK "; break;
		case XAException.XA_RBTIMEOUT : error = "XA_RBTIMEOUT "; break;
		case XAException.XA_RBTRANSIENT : error = "XA_RBTRANSIENT "; break;
		case XAException.XA_RDONLY : error = "XA_RDONLY "; break;
		case XAException.XA_RETRY : error = "XA_RETRY "; break;
		case XAException.XAER_ASYNC : error = "XAER_ASYNC "; break;
		case XAException.XAER_DUPID : error = "XAER_DUPID "; break;
		case XAException.XAER_INVAL : error = "XAER_INVAL "; break;
		case XAException.XAER_NOTA : error = "XAER_NOTA "; break;
		case XAException.XAER_OUTSIDE : error = "XAER_OUTSIDE "; break;
		case XAException.XAER_PROTO : error = "XAER_PROTO "; break;
		case XAException.XAER_RMERR : error = "XAER_RMERR "; break;
		case XAException.XAER_RMFAIL : error = "XAER_RMFAIL "; break;
		}
		//t.printStackTrace(System.out);
		throw new ijException(error);

	}
	else // StandardException or run time exception, log it first
	{
		String info = LocalizedResource.getMessage("IJ_01SeeLog", t.toString(), t.getMessage());
		//		t.printStackTrace(System.out);
		throw new ijException(info);
	}
}
 
Example 9
Source File: TransactionImpl.java    From ByteJTA with GNU Lesser General Public License v3.0 4 votes vote down vote up
private Boolean enlistResource(XAResourceArchive archive, int flag) throws SystemException {
	try {
		Xid branchXid = archive.getXid();
		logger.info("{}> enlist: xares= {}, branch= {}, flags: {}",
				ByteUtils.byteArrayToString(branchXid.getGlobalTransactionId()), archive,
				ByteUtils.byteArrayToString(branchXid.getBranchQualifier()), flag);

		switch (flag) {
		case XAResource.TMNOFLAGS:
			long expired = this.transactionContext.getExpiredTime();
			long current = System.currentTimeMillis();
			long remains = expired - current;
			int timeout = (int) (remains / 1000L);
			archive.setTransactionTimeout(timeout);
			archive.start(branchXid, flag);
			return true;
		case XAResource.TMJOIN:
			archive.start(branchXid, flag);
			archive.setDelisted(false);
			return false;
		case XAResource.TMRESUME:
			archive.start(branchXid, flag);
			archive.setDelisted(false);
			archive.setSuspended(false);
			return false;
		default:
			return null;
		}
	} catch (XAException xae) {
		logger.error("XATerminatorImpl.enlistResource(XAResourceArchive, int)", xae);

		// Possible exceptions are XA_RB*, XAER_RMERR, XAER_RMFAIL,
		// XAER_DUPID, XAER_OUTSIDE, XAER_NOTA, XAER_INVAL, or XAER_PROTO.
		switch (xae.errorCode) {
		case XAException.XAER_DUPID:
			// * If neither TMJOIN nor TMRESUME is specified and the transaction
			// * specified by xid has previously been seen by the resource manager,
			// * the resource manager throws the XAException exception with XAER_DUPID error code.
			return null;
		case XAException.XAER_OUTSIDE:
			// The resource manager is doing work outside any global transaction
			// on behalf of the application.
		case XAException.XAER_NOTA:
			// Either TMRESUME or TMJOIN was set inflags, and the specified XID is not
			// known by the resource manager.
		case XAException.XAER_INVAL:
			// Invalid arguments were specified.
		case XAException.XAER_PROTO:
			// The routine was invoked in an improper context.
			return null;
		case XAException.XAER_RMFAIL:
			// An error occurred that makes the resource manager unavailable
		case XAException.XAER_RMERR:
			// An error occurred in associating the transaction branch with the thread of control
			return null;
		default /* XA_RB **/ :
			// When a RollbackException is received, DBCP treats the state as STATUS_ROLLEDBACK,
			// but the actual state is still STATUS_MARKED_ROLLBACK.
			return null; // throw new RollbackException();
		}
	} catch (RuntimeException ex) {
		logger.error("XATerminatorImpl.enlistResource(XAResourceArchive, int)", ex);
		throw new SystemException();
	}

}
 
Example 10
Source File: XASupport.java    From jTDS with GNU Lesser General Public License v2.1 4 votes vote down vote up
/**
 * Construct and throw an <code>XAException</code> with an explanatory message and the XA error code set.
 *
 * @param errorCode the XA Error code
 * @exception javax.transaction.xa.XAException
 *             the constructed exception
 */
public static void raiseXAException(int errorCode)
        throws XAException {
    String err = "xaerunknown";
    switch (errorCode) {
        case XAException.XA_RBROLLBACK:
            err = "xarbrollback";
            break;
        case XAException.XA_RBCOMMFAIL:
            err = "xarbcommfail";
            break;
        case XAException.XA_RBDEADLOCK:
            err = "xarbdeadlock";
            break;
        case XAException.XA_RBINTEGRITY:
            err = "xarbintegrity";
            break;
        case XAException.XA_RBOTHER:
            err = "xarbother";
            break;
        case XAException.XA_RBPROTO:
            err = "xarbproto";
            break;
        case XAException.XA_RBTIMEOUT:
            err = "xarbtimeout";
            break;
        case XAException.XA_RBTRANSIENT:
            err = "xarbtransient";
            break;
        case XAException.XA_NOMIGRATE:
            err = "xanomigrate";
            break;
        case XAException.XA_HEURHAZ:
            err = "xaheurhaz";
            break;
        case XAException.XA_HEURCOM:
            err = "xaheurcom";
            break;
        case XAException.XA_HEURRB:
            err = "xaheurrb";
            break;
        case XAException.XA_HEURMIX:
            err = "xaheurmix";
            break;
        case XAException.XA_RETRY:
            err = "xaretry";
            break;
        case XAException.XA_RDONLY:
            err = "xardonly";
            break;
        case XAException.XAER_ASYNC:
            err = "xaerasync";
            break;
        case XAException.XAER_NOTA:
            err = "xaernota";
            break;
        case XAException.XAER_INVAL:
            err = "xaerinval";
            break;
        case XAException.XAER_PROTO:
            err = "xaerproto";
            break;
        case XAException.XAER_RMERR:
            err = "xaerrmerr";
            break;
        case XAException.XAER_RMFAIL:
            err = "xaerrmfail";
            break;
        case XAException.XAER_DUPID:
            err = "xaerdupid";
            break;
        case XAException.XAER_OUTSIDE:
            err = "xaeroutside";
            break;
    }
    XAException e = new XAException(Messages.get("error.xaexception." + err));
    e.errorCode = errorCode;
    Logger.println("XAException: " + e.getMessage());
    throw e;
}
 
Example 11
Source File: xaHelper.java    From spliceengine with GNU Affero General Public License v3.0 4 votes vote down vote up
private void handleException(Throwable t) throws SQLException
{
	if (t instanceof SQLException)
	{
		// let ij handle it
		throw (SQLException)t;
	}
	if (t instanceof XAException)
	{
		int errorCode = ((XAException)t).errorCode;
		String error = LocalizedResource.getMessage("IJ_IlleValu");

		// XA_RBBASE 100
		// XA_RBROLLBACK 100
		// XA_RBCOMMFAIL 101
		// XA_RBDEADLOCK 102
		// XA_RBINTEGRITY 103
		// XA_RBOTHER 104
		// XA_RBPROTO 105
		// XA_RBTIMEOUT 106
		// XA_RBTRANSIENT 107
		// XA_RBEND 107
		//
		// XA_RDONLY 3
		// XA_RETRY 4
		// XA_HEURMIX 5
		// XA_HEURRB 6
		// XA_HEURCOM 7
		// XA_HEURHAZ 8
		// XA_NOMIGRATE 9
		//
		// XAER_ASYNC -2
		// XAER_RMERR -3
		// XAER_NOTA -4
		// XAER_INVAL -5
		// XAER_PROTO -6
		// XAER_RMFAIL -7
		// XAER_DUPID -8
		// XAER_OUTSIDE -9

		switch(errorCode)
		{
		case XAException.XA_HEURCOM : error = "XA_HEURCOM "; break;
		case XAException.XA_HEURHAZ : error = "XA_HEURHAZ"; break;
		case XAException.XA_HEURMIX : error = "XA_HEURMIX"; break;
		case XAException.XA_HEURRB : error = "XA_HEURRB "; break;
		case XAException.XA_NOMIGRATE : error = "XA_NOMIGRATE "; break;
			// case XAException.XA_RBBASE : error = "XA_RBBASE "; break;
		case XAException.XA_RBCOMMFAIL : error = "XA_RBCOMMFAIL "; break;
		case XAException.XA_RBDEADLOCK : error = "XA_RBDEADLOCK "; break;
			// case XAException.XA_RBEND : error = "XA_RBEND "; break;
		case XAException.XA_RBINTEGRITY : error = "XA_RBINTEGRITY "; break;
		case XAException.XA_RBOTHER : error = "XA_RBOTHER "; break;
		case XAException.XA_RBPROTO : error = "XA_RBPROTO "; break;
		case XAException.XA_RBROLLBACK : error = "XA_RBROLLBACK "; break;
		case XAException.XA_RBTIMEOUT : error = "XA_RBTIMEOUT "; break;
		case XAException.XA_RBTRANSIENT : error = "XA_RBTRANSIENT "; break;
		case XAException.XA_RDONLY : error = "XA_RDONLY "; break;
		case XAException.XA_RETRY : error = "XA_RETRY "; break;
		case XAException.XAER_ASYNC : error = "XAER_ASYNC "; break;
		case XAException.XAER_DUPID : error = "XAER_DUPID "; break;
		case XAException.XAER_INVAL : error = "XAER_INVAL "; break;
		case XAException.XAER_NOTA : error = "XAER_NOTA "; break;
		case XAException.XAER_OUTSIDE : error = "XAER_OUTSIDE "; break;
		case XAException.XAER_PROTO : error = "XAER_PROTO "; break;
		case XAException.XAER_RMERR : error = "XAER_RMERR "; break;
		case XAException.XAER_RMFAIL : error = "XAER_RMFAIL "; break;
		}
		//t.printStackTrace(System.out);
		throw new ijException(error);

	}
	else // StandardException or run time exception, log it first
	{
		String info = LocalizedResource.getMessage("IJ_01SeeLog", t.toString(), t.getMessage());
		//		t.printStackTrace(System.out);
		throw new ijException(info);
	}
}