public void commit(Xid xid, boolean b) throws XAException { delegate.commit(xid, b); }
public String getName() { return delegate.getName(); }
public Xid[] recover(int i) throws XAException { return delegate.recover(i); }
public synchronized void recoverResourceManager(NamedXAResource xaResource) throws XAException { String name = xaResource.getName(); Xid[] prepared = xaResource.recover(XAResource.TMSTARTRSCAN + XAResource.TMENDRSCAN); for (int i = 0; prepared != null && i < prepared.length; i++) { Xid xid = prepared[i]; xaResource.commit(xid, false); } catch(XAException e) { recoveryErrors.add(e); xaResource.rollback(xid); } catch (XAException e) { recoveryErrors.add(e); xaResource.rollback(xid); } catch (XAException e) { recoveryErrors.add(e);
private void doCommitOrRollback(NamedXAResource xaResource, Xid xid, boolean commit) { try { if (commit) { xaResource.commit(xid, false); } else { xaResource.rollback(xid); if (e.errorCode == XAException.XA_HEURRB) { log.info("Transaction has been heuristically rolled back"); xaResource.forget(xid); } else if (e.errorCode == XAException.XA_HEURMIX) { log.info("Transaction has been heuristically committed and rolled back"); xaResource.forget(xid); } else if (e.errorCode == XAException.XA_HEURCOM) { log.info("Transaction has been heuristically committed"); xaResource.forget(xid); } else { recoveryErrors.add(e);
public synchronized void recoverResourceManager(NamedXAResource xaResource) throws XAException { String name = xaResource.getName(); Xid[] prepared = xaResource.recover(XAResource.TMSTARTRSCAN + XAResource.TMENDRSCAN); for (int i = 0; prepared != null && i < prepared.length; i++) { Xid xid = prepared[i]; if (xid.getGlobalTransactionId() == null || xid.getBranchQualifier() == null) { log.warn("Ignoring bad xid from\n name: " + xaResource.getName() + "\n " + toString(xid)); continue; log.trace("Considering recovered xid from\n name: " + xaResource.getName() + "\n " + toString(xid)); ByteArrayWrapper globalIdWrapper = new ByteArrayWrapper(xid.getGlobalTransactionId()); XidBranchesPair xidNamesPair = ourXids.get(globalIdWrapper);
public void rollback(Xid xid) throws XAException { delegate.rollback(xid); }
public void forget(Xid xid) throws XAException { delegate.forget(xid); }
public void end(Xid xid, int i) throws XAException { delegate.end(xid, i); }
public synchronized void recoverResourceManager(NamedXAResource xaResource) throws XAException { String name = xaResource.getName(); Xid[] prepared = xaResource.recover(XAResource.TMSTARTRSCAN + XAResource.TMENDRSCAN); for (int i = 0; prepared != null && i < prepared.length; i++) { Xid xid = prepared[i]; xaResource.commit(xid, false); } catch(XAException e) { recoveryErrors.add(e); xaResource.rollback(xid); } catch (XAException e) { recoveryErrors.add(e); xaResource.rollback(xid); } catch (XAException e) { recoveryErrors.add(e);
public synchronized void recoverResourceManager(NamedXAResource xaResource) throws XAException { String name = xaResource.getName(); Xid[] prepared = xaResource.recover(XAResource.TMSTARTRSCAN + XAResource.TMENDRSCAN); for (int i = 0; prepared != null && i < prepared.length; i++) { Xid xid = prepared[i]; xaResource.commit(xid, false); } catch(XAException e) { recoveryErrors.add(e); xaResource.rollback(xid); } catch (XAException e) { recoveryErrors.add(e); xaResource.rollback(xid); } catch (XAException e) { recoveryErrors.add(e);
public String getResourceName() { if (committer instanceof NamedXAResource) { return ((NamedXAResource) committer).getName(); } else { // if it isn't a named resource should we really stop all processing here! // Maybe this would be better to handle else where and do we really want to prevent all processing of transactions? log.error("Please correct the integration and supply a NamedXAResource", new IllegalStateException("Cannot log transactions as " + committer + " is not a NamedXAResource.")); return committer.toString(); } }
public String getResourceName() { if (committer instanceof NamedXAResource) { return ((NamedXAResource) committer).getName(); } else { // if it isn't a named resource should we really stop all processing here! // Maybe this would be better to handle else where and do we really want to prevent all processing of transactions? log.error("Please correct the integration and supply a NamedXAResource", new IllegalStateException("Cannot log transactions as " + committer + " is not a NamedXAResource.")); return committer.toString(); } }
public String getResourceName() { if (committer instanceof NamedXAResource) { return ((NamedXAResource) committer).getName(); } else { // if it isn't a named resource should we really stop all processing here! // Maybe this would be better to handle else where and do we really want to prevent all processing of transactions? log.error("Please correct the integration and supply a NamedXAResource", new IllegalStateException("Cannot log transactions as " + committer + " is not a NamedXAResource.")); return committer.toString(); } }
public String getResourceName() { if (committer instanceof NamedXAResource) { return ((NamedXAResource) committer).getName(); } else { // if it isn't a named resource should we really stop all processing here! // Maybe this would be better to handle else where and do we really want to prevent all processing of transactions? log.error("Please correct the integration and supply a NamedXAResource", new IllegalStateException("Cannot log transactions as " + committer + " is not a NamedXAResource.")); return committer.toString(); } }