public void setTimeout(Xid id, long timeout) throws UnknownDtxBranchException { DtxBranch branch = getBranch(id); if(branch != null) { branch.setTimeout(timeout); } else { throw new UnknownDtxBranchException(id); } }
public long getTimeout(Xid id) throws UnknownDtxBranchException { DtxBranch branch = getBranch(id); if(branch != null) { return branch.getTimeout(); } else { throw new UnknownDtxBranchException(id); } }
public void forget(Xid id) throws UnknownDtxBranchException, IncorrectDtxStateException { DtxBranch branch = getBranch(id); if(branch != null) { synchronized (branch) { if(!branch.hasAssociatedSessions()) { if(branch.getState() != DtxBranch.State.HEUR_COM && branch.getState() != DtxBranch.State.HEUR_RB) { throw new IncorrectDtxStateException("Branch should not be forgotten - " + "it is not heuristically complete", id); } branch.setState(DtxBranch.State.FORGOTTEN); unregisterBranch(branch); } else { throw new IncorrectDtxStateException("Branch was still associated with a session", id); } } } else { throw new UnknownDtxBranchException(id); } }
DtxBranch branch = _dtxRegistry.getBranch(id);
DtxBranch branch = dtxRegistry.getBranch(id); if(branch == null)
DtxBranch branch = getBranch(id); if(branch != null)
public void end(Xid id, boolean fail, boolean suspend) throws UnknownDtxBranchException, NotAssociatedDtxException, SuspendAndFailDtxException, TimeoutDtxException DtxBranch branch = _dtxRegistry.getBranch(id);
IncorrectDtxStateException, StoreException, RollbackOnlyDtxException, TimeoutDtxException DtxBranch branch = getBranch(id); if(branch != null)
DtxBranch branch = dtxRegistry.getBranch(id); if (branch == null)
public synchronized void commit(Xid id, boolean onePhase) throws IncorrectDtxStateException, UnknownDtxBranchException, StoreException, RollbackOnlyDtxException, TimeoutDtxException DtxBranch branch = getBranch(id); if(branch != null)