public class JcrXaSession extends JcrSession implements XAResource
JcrSession that is also an XAResource, enabling clients to explicitly enlist the session in the
transaction.
This implementation simply delegates to the Infinispan cache's XAResource instance, since
ModeShape does not need to itself be a resource that participates in the transaction. (Instead, ModeShape registers as a
Synchronization on the transaction, ensuring that it is notified when the transaction completes.)
JcrSession.JcrPreSave, JcrSession.SystemSessionCacherepositoryTMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLYACTION_ADD_NODE, ACTION_READ, ACTION_REMOVE, ACTION_SET_PROPERTY| Modifier | Constructor and Description |
|---|---|
protected |
JcrXaSession(JcrRepository repository,
String workspaceName,
ExecutionContext context,
Map<String,Object> sessionAttributes,
boolean readOnly) |
| Modifier and Type | Method and Description |
|---|---|
void |
commit(Xid xid,
boolean onePhase) |
protected XAResource |
delegate() |
void |
end(Xid xid,
int flags) |
void |
forget(Xid xid) |
int |
getTransactionTimeout() |
boolean |
isSameRM(XAResource xaRes) |
int |
prepare(Xid xid) |
Xid[] |
recover(int flag) |
void |
rollback(Xid xid) |
boolean |
setTransactionTimeout(int seconds) |
void |
start(Xid xid,
int flags) |
addLockToken, checkPermission, createNodeKeyFromIdentifier, decode, encode, entryForNode, exportDocumentView, exportDocumentView, exportSystemView, exportSystemView, getAccessControlManager, getAttribute, getAttributeNames, getImportContentHandler, getItem, getLockTokens, getNamespacePrefix, getNamespacePrefixes, getNamespaceURI, getNode, getNode, getNodeByIdentifier, getNodeByUUID, getNonSystemNodeByIdentifier, getProperty, getRepository, getRetentionManager, getRootNode, getUserID, getValueFactory, getWorkspace, hasCapability, hasPendingChanges, hasPermission, impersonate, importXML, initBaseVersionKeys, initOriginalVersionKeys, isAnonymous, isForeignKey, isForeignKey, isLive, isReadOnly, itemExists, logout, move, nodeExists, nodeExists, nodeIdentifier, nodeIdentifier, propertyExists, readable, readableLocation, refresh, releaseCachedNode, removeItem, removeLockToken, save, sequence, setNamespacePrefix, toStringprotected JcrXaSession(JcrRepository repository, String workspaceName, ExecutionContext context, Map<String,Object> sessionAttributes, boolean readOnly)
protected final XAResource delegate()
public void start(Xid xid, int flags) throws XAException
start in interface XAResourceXAExceptionpublic void end(Xid xid, int flags) throws XAException
end in interface XAResourceXAExceptionpublic int prepare(Xid xid) throws XAException
prepare in interface XAResourceXAExceptionpublic void commit(Xid xid, boolean onePhase) throws XAException
commit in interface XAResourceXAExceptionpublic void rollback(Xid xid) throws XAException
rollback in interface XAResourceXAExceptionpublic void forget(Xid xid) throws XAException
forget in interface XAResourceXAExceptionpublic Xid[] recover(int flag) throws XAException
recover in interface XAResourceXAExceptionpublic boolean isSameRM(XAResource xaRes) throws XAException
isSameRM in interface XAResourceXAExceptionpublic int getTransactionTimeout()
throws XAException
getTransactionTimeout in interface XAResourceXAExceptionpublic boolean setTransactionTimeout(int seconds)
throws XAException
setTransactionTimeout in interface XAResourceXAExceptionCopyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.