public void registerInterposedSynchronization(@NotNull final Transaction transaction, @NotNull final Synchronization sync) throws IllegalArgumentException { // this is silly but for some reason they've locked this API up tight try { registerSynchronizationImple.invoke((TransactionImple) transaction, new JTAInterposedSynchronizationImple (sync)); } catch (RuntimeException | Error e) { throw e; } catch (Throwable t) { throw Log.log.unexpectedFailure(t); } }
public SynchronizationImple (javax.transaction.Synchronization ptr) { _theSynch = ptr; _theReference = null; _theClassLoader = this.getContextClassLoader(); }
public String type() { return XAResourceRecord.typeName(); }
public void forget() throws org.omg.CORBA.SystemException { if (jtaxLogger.logger.isTraceEnabled()) { jtaxLogger.logger.trace("XAResourceRecord.forget for " + _tranID + " _forgotten=" + _forgotten); } // if we have not yet seen a successful forget call then tell the resource to forget if (!_forgotten) handleForget(); // this call can fail silently which will leave _forgotten as false // if it is known that the resource has forgotten the heuristic then delete our record of it if (_forgotten) { destroyState(); removeConnection(); } }
/** * Attempt to create an XAResourceRecord wrapping the given XAResource. Return null if this fails, or * is diallowed by the current configuration of multiple last resource behaviour. * * @param xaRes * @param params * @param xid * @return */ private XAResourceRecord createRecord(XAResource xaRes, Object[] params, Xid xid) { final XAResourceRecord record; if ((xaRes instanceof LastResourceCommitOptimisation) || ((LAST_RESOURCE_OPTIMISATION_INTERFACE != null) && LAST_RESOURCE_OPTIMISATION_INTERFACE .isInstance(xaRes))) { record = new LastResourceRecord(this, xaRes, xid, params); } else { record = new XAResourceRecord(this, xaRes, xid, params); } return record; }
public int recover () { return super.recover(); }
/** * Prepare this resource. */ public Vote prepare() throws HeuristicMixed, HeuristicHazard, SystemException { try { commit_one_phase() ; return Vote.VoteCommit ; } catch (final TRANSACTION_ROLLEDBACK tr) { return Vote.VoteRollback ; } }
protected XAResourceRecord(Uid u) { _theXAResource = null; _recoveryObject = null; _tranID = null; _prepared = true; _committed = false; _heuristic = TwoPhaseOutcome.FINISH_OK; _theUid = new Uid(u); _objStore = null; _valid = false; _theReference = null; _recoveryCoordinator = null; _theTransaction = null; _valid = loadState(); }
public final org.omg.CosTransactions.Synchronization getSynchronization () { if (_theReference == null) { _thePOATie = getPOATie(); ORBManager.getPOA().objectIsReady(_thePOATie); _theReference = org.omg.CosTransactions.SynchronizationHelper.narrow(ORBManager.getPOA().corbaReference(_thePOATie)); } return _theReference; }
public boolean restoreState(InputObjectState os) { InputObjectState copy = new InputObjectState(os); try { heuristic = copy.unpackInt(); } catch (IOException e) { } return super.restoreState(os); }
public void registerInterposedSynchronization(@NotNull final Transaction transaction, @NotNull final Synchronization sync) throws IllegalArgumentException { // this is silly but for some reason they've locked this API up tight try { registerSynchronizationImple.invoke((TransactionImple) transaction, new JTAInterposedSynchronizationImple (sync)); } catch (RuntimeException | Error e) { throw e; } catch (Throwable t) { throw Log.log.unexpectedFailure(t); } }
public void forget() throws org.omg.CORBA.SystemException { if (jtaLogger.logger.isDebugEnabled()) { jtaLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jta.logging.FacilityCode.FAC_JTA, "XAResourceRecord.forget for " + _tranID); } handleForget() ; destroyState(); removeConnection(); }
/** * Attempt to create an XAResourceRecord wrapping the given XAResource. Return null if this fails, or * is diallowed by the current configuration of multiple last resource behaviour. * * @param xaRes * @param params * @param xid * @return */ private XAResourceRecord createRecord(XAResource xaRes, Object[] params, Xid xid) { final XAResourceRecord record; if ((xaRes instanceof LastResourceCommitOptimisation) || ((LAST_RESOURCE_OPTIMISATION_INTERFACE != null) && LAST_RESOURCE_OPTIMISATION_INTERFACE .isInstance(xaRes))) { record = new LastResourceRecord(this, xaRes, xid, params); } else { record = new XAResourceRecord(this, xaRes, xid, params); } return record; }
public String type() { return XAResourceRecord.typeName(); }
public int recover () { return super.recover(); }
/** * Prepare this resource. */ public Vote prepare() throws HeuristicMixed, HeuristicHazard, SystemException { try { commit_one_phase() ; return Vote.VoteCommit ; } catch (final TRANSACTION_ROLLEDBACK tr) { return Vote.VoteRollback ; } }
protected XAResourceRecord(Uid u) { _theXAResource = null; _recoveryObject = null; _tranID = null; _prepared = true; _committed = false; _heuristic = TwoPhaseOutcome.FINISH_OK; _theUid = new Uid(u); _participantStore = null; _valid = false; _theReference = null; _recoveryCoordinator = null; _theTransaction = null; _phaseTwoStarted = true; _valid = loadState(); }
public final org.omg.CosTransactions.Synchronization getSynchronization () { if (_theReference == null) { _thePOATie = getPOATie(); ORBManager.getPOA().objectIsReady(_thePOATie); _theReference = org.omg.CosTransactions.SynchronizationHelper.narrow(ORBManager.getPOA().corbaReference(_thePOATie)); } return _theReference; }
public void registerInterposedSynchronization(@NotNull final Transaction transaction, @NotNull final Synchronization sync) throws IllegalArgumentException { // this is silly but for some reason they've locked this API up tight try { registerSynchronizationImple.invoke((TransactionImple) transaction, new JTAInterposedSynchronizationImple (sync)); } catch (RuntimeException | Error e) { throw e; } catch (Throwable t) { throw Log.log.unexpectedFailure(t); } }
static synchronized void getXARecoveryResourceMBeans(UidWrapper uidWrapper) { if (xaRecoveryResourceMBeans == null) { xaRecoveryResourceMBeans = new ArrayList<XARecoveryResourceMBean>(); List<UidWrapper> wrappers = uidWrapper.probe(XAResourceRecord.typeName()); if (wrappers != null) { for (UidWrapper w : wrappers) { OSEntryBean bean = w.getMBean(); if (bean != null && bean instanceof XARecoveryResourceMBean) xaRecoveryResourceMBeans.add((XARecoveryResourceMBean) bean); } } } }