Java Code Examples for javax.transaction.xa.XAException#XA_RBROLLBACK
The following examples show how to use
javax.transaction.xa.XAException#XA_RBROLLBACK .
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: LocalXAResourceImpl.java From lams with GNU General Public License v2.0 | 6 votes |
/** * {@inheritDoc} */ 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 (LocalResourceException lre) { connectionManager.returnManagedConnection(cl, true); throw new LocalXAException(bundle.couldNotCommitLocalTx(), XAException.XAER_RMFAIL, lre); } catch (ResourceException re) { connectionManager.returnManagedConnection(cl, true); throw new LocalXAException(bundle.couldNotCommitLocalTx(), XAException.XA_RBROLLBACK, re); } }
Example 2
Source File: AbstractTransactionAssistanceXAResource.java From genericconnector with Apache License 2.0 | 6 votes |
@Override public int prepare(Xid xid) throws XAException { log.log(Level.INFO, "PREPARE " + XidImpl.asString(xid)); //if the EXECUTE was unsuccessful, we must not let a COMMIT occur, since it will fail //7.6.2.8 of the JCA spec 1.6 says we must not erase knowledge //of the transaction branch until commit or rollback is called. // => do not call cleanup yet! if(!getUnderlyingConnection().wasExecuteSuccessful()){ //vote to rollback :o( throw new XAException(XAException.XA_RBROLLBACK); }else{ //a successful execute is a guarantee that we can commit => therefore vote "OK to commit" return XAResource.XA_OK; } }
Example 3
Source File: LocalXAResourceImpl.java From ironjacamar with Eclipse Public License 1.0 | 6 votes |
/** * {@inheritDoc} */ 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 (LocalResourceException lre) { connectionManager.returnConnectionListener(cl, true); throw new LocalXAException(bundle.couldNotCommitLocalTx(), XAException.XAER_RMFAIL, lre); } catch (ResourceException re) { connectionManager.returnConnectionListener(cl, true); throw new LocalXAException(bundle.couldNotCommitLocalTx(), XAException.XA_RBROLLBACK, re); } }
Example 4
Source File: LocalXAResourceImpl.java From lams with GNU General Public License v2.0 | 5 votes |
/** * {@inheritDoc} */ public void commit(Xid xid, boolean onePhase) throws XAException { try { cl.getManagedConnection().getLocalTransaction().commit(); } catch (ResourceException re) { connectionManager.returnManagedConnection(cl, true); throw new LocalXAException("commit", XAException.XA_RBROLLBACK, re); } }
Example 5
Source File: XATestUtil.java From gemfirexd-oss with Apache License 2.0 | 5 votes |
/** * 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 6
Source File: XATestUtil.java From gemfirexd-oss with Apache License 2.0 | 5 votes |
/** * 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: XATerminatorImpl.java From ByteJTA with GNU Lesser General Public License v3.0 | 5 votes |
private void invokeOnePhaseCommit(XAResourceArchive archive) throws XAException { try { archive.commit(archive.getXid(), true); } catch (XAException xaex) { switch (xaex.errorCode) { case XAException.XA_HEURCOM: case XAException.XA_HEURHAZ: case XAException.XA_HEURMIX: case XAException.XA_HEURRB: logger.warn("An error occurred in one phase commit: {}, transaction has been completed!", ByteUtils.byteArrayToString(archive.getXid().getGlobalTransactionId())); throw xaex; case XAException.XAER_RMFAIL: logger.warn("An error occurred in one phase commit: {}", ByteUtils.byteArrayToString(archive.getXid().getGlobalTransactionId())); throw xaex; case XAException.XAER_NOTA: case XAException.XAER_INVAL: case XAException.XAER_PROTO: logger.warn("An error occurred in one phase commit: {}", ByteUtils.byteArrayToString(archive.getXid().getGlobalTransactionId())); throw new XAException(XAException.XAER_RMERR); case XAException.XAER_RMERR: case XAException.XA_RBCOMMFAIL: case XAException.XA_RBDEADLOCK: case XAException.XA_RBINTEGRITY: case XAException.XA_RBOTHER: case XAException.XA_RBPROTO: case XAException.XA_RBROLLBACK: case XAException.XA_RBTIMEOUT: case XAException.XA_RBTRANSIENT: default: logger.warn("An error occurred in one phase commit: {}, transaction has been rolled back!", ByteUtils.byteArrayToString(archive.getXid().getGlobalTransactionId())); throw new XAException(XAException.XA_HEURRB); } } }
Example 8
Source File: LocalXAResourceImpl.java From ironjacamar with Eclipse Public License 1.0 | 5 votes |
/** * {@inheritDoc} */ public void commit(Xid xid, boolean onePhase) throws XAException { try { cl.getManagedConnection().getLocalTransaction().commit(); } catch (ResourceException re) { connectionManager.returnConnectionListener(cl, true); throw new LocalXAException("commit", XAException.XA_RBROLLBACK, re); } }
Example 9
Source File: XATestUtil.java From spliceengine with GNU Affero General Public License v3.0 | 5 votes |
/** * 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 10
Source File: xaHelper.java From gemfirexd-oss with Apache License 2.0 | 4 votes |
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 11
Source File: xaHelper.java From gemfirexd-oss with Apache License 2.0 | 4 votes |
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 12
Source File: XATerminatorOptd.java From ByteJTA with GNU Lesser General Public License v3.0 | 4 votes |
private void fireOnePhaseCommit(Xid xid) throws XAException { if (archive.isCommitted() && archive.isRolledback()) { throw new XAException(XAException.XA_HEURMIX); } else if (archive.isCommitted()) { return; } else if (archive.isReadonly()) { throw new XAException(XAException.XA_RDONLY); // XAException.XAER_NOTA } else if (archive.isRolledback()) { throw new XAException(XAException.XA_HEURRB); } TransactionLogger transactionLogger = this.beanFactory.getTransactionLogger(); boolean updateRequired = true; try { archive.commit(archive.getXid(), true); archive.setCommitted(true); archive.setCompleted(true); logger.info("{}> commit: xares= {}, branch= {}, opc= {}", ByteUtils.byteArrayToString(archive.getXid().getGlobalTransactionId()), archive, ByteUtils.byteArrayToString(archive.getXid().getBranchQualifier()), false); } catch (XAException xaex) { switch (xaex.errorCode) { case XAException.XA_HEURCOM: archive.setHeuristic(true); archive.setCommitted(true); archive.setCompleted(true); break; case XAException.XA_HEURMIX: archive.setHeuristic(true); archive.setCommitted(true); archive.setRolledback(true); archive.setCompleted(true); throw xaex; case XAException.XA_HEURRB: archive.setHeuristic(true); archive.setRolledback(true); archive.setCompleted(true); throw xaex; case XAException.XA_HEURHAZ: archive.setHeuristic(true); throw xaex; case XAException.XAER_RMFAIL: logger.warn("An error occurred in one phase commit: {}", ByteUtils.byteArrayToString(archive.getXid().getGlobalTransactionId())); updateRequired = false; throw new XAException(XAException.XA_HEURHAZ); case XAException.XAER_NOTA: case XAException.XAER_INVAL: case XAException.XAER_PROTO: logger.warn("An error occurred in one phase commit: {}", ByteUtils.byteArrayToString(archive.getXid().getGlobalTransactionId())); updateRequired = false; throw new XAException(XAException.XAER_RMERR); case XAException.XAER_RMERR: case XAException.XA_RBCOMMFAIL: case XAException.XA_RBDEADLOCK: case XAException.XA_RBINTEGRITY: case XAException.XA_RBOTHER: case XAException.XA_RBPROTO: case XAException.XA_RBROLLBACK: case XAException.XA_RBTIMEOUT: case XAException.XA_RBTRANSIENT: default: logger.warn("An error occurred in one phase commit: {}, transaction has been rolled back!", ByteUtils.byteArrayToString(archive.getXid().getGlobalTransactionId())); archive.setRolledback(true); archive.setCompleted(true); throw new XAException(XAException.XA_HEURRB); } } catch (RuntimeException rex) { logger.error("{}> Error occurred while committing xa-resource: xares= {}, branch= {}", ByteUtils.byteArrayToString(archive.getXid().getGlobalTransactionId()), archive, ByteUtils.byteArrayToString(archive.getXid().getBranchQualifier()), rex); updateRequired = false; throw new XAException(XAException.XA_HEURHAZ); } finally { if (updateRequired) { transactionLogger.updateParticipant(archive); } } }
Example 13
Source File: XASupport.java From jTDS with GNU Lesser General Public License v2.1 | 4 votes |
/** * 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 14
Source File: xaHelper.java From spliceengine with GNU Affero General Public License v3.0 | 4 votes |
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); } }