public class XASessionImpl extends SessionImpl implements org.apache.jackrabbit.api.XASession, XAResource
| Modifier and Type | Field and Description |
|---|---|
static String |
SYSTEM_PROPERTY_DEFAULT_TRANSACTION_TIMEOUT
System property specifying the default Transaction Timeout
|
attributes, AUTO_FIX_CORRUPTIONS, context, DISABLE_CLUSTER_SYNC_ON_REFRESH, listeners, loginContext, namePathResolver, repositoryContext, subject, userId, versionMgrACTION_ADD_NODE, ACTION_READ, ACTION_REMOVE, ACTION_SET_PROPERTYTMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLYACTION_ADD_PROPERTY, ACTION_LOCKING, ACTION_MODIFY_ACCESS_CONTROL, ACTION_MODIFY_PROPERTY, ACTION_NODE_TYPE_MANAGEMENT, ACTION_READ_ACCESS_CONTROL, ACTION_REMOVE_NODE, ACTION_REMOVE_PROPERTY, ACTION_USER_MANAGEMENT, ACTION_VERSIONING| Modifier | Constructor and Description |
|---|---|
protected |
XASessionImpl(RepositoryContext repositoryContext,
AuthContext loginContext,
WorkspaceConfig wspConfig)
Create a new instance of this class.
|
protected |
XASessionImpl(RepositoryContext repositoryContext,
Subject subject,
WorkspaceConfig wspConfig)
Create a new instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
void |
associate(TransactionContext tx)
Associate this session with a global transaction.
|
void |
commit(Xid xid,
boolean onePhase) |
protected InternalVersionManager |
createVersionManager()
Create the version manager.
|
void |
end(Xid xid,
int flags) |
void |
forget(Xid xid) |
int |
getTransactionTimeout() |
XAResource |
getXAResource() |
boolean |
isSameRM(XAResource xares) |
void |
logout()
Invalidates this session and releases all associated resources.
|
int |
prepare(Xid xid) |
Xid[] |
recover(int flags) |
void |
rollback(Xid xid) |
boolean |
setTransactionTimeout(int seconds) |
void |
start(Xid xid,
int flags) |
addListener, addLockToken, autoFixCorruptions, checkFormat, checkPermission, clusterSyncOnRefresh, createAccessManager, createDataStoreGarbageCollector, createItemManager, createObservationManager, createSession, createSessionItemStateManager, finalize, getAccessControlManager, getAccessManager, getAttribute, getAttributeNames, getHierarchyManager, getImportContentHandler, getInternalVersionManager, getItem, getItemManager, getItemOrNull, getJCRName, getJCRPath, getLocks, getLockTokens, getNode, getNodeById, getNodeByIdentifier, getNodeByUUID, getNodeOrNull, getNodeTypeManager, getPath, getPrefix, getPrincipalManager, getProperty, getPropertyOrNull, getQName, getQPath, getQPath, getRepository, getRetentionManager, getRetentionRegistry, getRootNode, getSubject, getURI, getUserID, getUserManager, getValueFactory, getWorkspace, hasCapability, hasPendingChanges, hasPermission, hasPermission, impersonate, isAdmin, isLive, isSystem, itemExists, move, nodeExists, notifyLoggedOut, notifyLoggingOut, propertyExists, refresh, removeItem, removeListener, removeLockToken, retrieveUserId, save, setAttribute, setNamespacePrefix, toStringexportDocumentView, exportDocumentView, exportSystemView, exportSystemView, getNamespacePrefix, getNamespacePrefixes, getNamespaceURI, importXMLclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitaddLockToken, checkPermission, exportDocumentView, exportDocumentView, exportSystemView, exportSystemView, getAccessControlManager, getAttribute, getAttributeNames, getImportContentHandler, getItem, getLockTokens, getNamespacePrefix, getNamespacePrefixes, getNamespaceURI, getNode, getNodeByIdentifier, getNodeByUUID, getProperty, getRepository, getRetentionManager, getRootNode, getUserID, getValueFactory, getWorkspace, hasCapability, hasPendingChanges, hasPermission, impersonate, importXML, isLive, itemExists, move, nodeExists, propertyExists, refresh, removeItem, removeLockToken, save, setNamespacePrefixpublic static final String SYSTEM_PROPERTY_DEFAULT_TRANSACTION_TIMEOUT
protected XASessionImpl(RepositoryContext repositoryContext, AuthContext loginContext, WorkspaceConfig wspConfig) throws AccessDeniedException, RepositoryException
repositoryContext - repository contextloginContext - login context containing authenticated subjectwspConfig - workspace configurationAccessDeniedException - if the subject of the given login context
is not granted access to the specified
workspaceRepositoryException - if another error occursprotected XASessionImpl(RepositoryContext repositoryContext, Subject subject, WorkspaceConfig wspConfig) throws AccessDeniedException, RepositoryException
repositoryContext - repository contextsubject - authenticated subjectwspConfig - workspace configurationAccessDeniedException - if the given subject is not granted access
to the specified workspaceRepositoryException - if another error occursprotected InternalVersionManager createVersionManager() throws RepositoryException
createVersionManager in class SessionImplRepositoryExceptionpublic XAResource getXAResource()
getXAResource in interface org.apache.jackrabbit.api.XASessionpublic int getTransactionTimeout()
getTransactionTimeout in interface XAResourcepublic boolean setTransactionTimeout(int seconds)
setTransactionTimeout in interface XAResourcepublic boolean isSameRM(XAResource xares) throws XAException
Two resources belong to the same resource manager if both connections (i.e. sessions) have the same credentials.
isSameRM in interface XAResourceXAExceptionpublic void start(Xid xid, int flags) throws XAException
If TMNOFLAGS is specified, we create a new transaction
context and associate it with this resource.
If TMJOIN is specified, this resource should use the
same transaction context as another, already known transaction.
If TMRESUME is specified, we should resume work on
a transaction context that was suspended earlier.
All other flags generate an XAException of type
XAER_INVAL
start in interface XAResourceXAExceptionpublic void end(Xid xid, int flags) throws XAException
If TMSUCCESS is specified, we disassociate this session
from the transaction specified.
If TMFAIL is specified, we disassociate this session from
the transaction specified and mark the transaction rollback only.
If TMSUSPEND is specified, we disassociate this session
from the transaction specified.
All other flags generate an XAException of type
XAER_INVAL
It is legal for a transaction association to be suspended and then
ended (either with TMSUCCESS or TMFAIL)
without having been resumed again.
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 Xid[] recover(int flags) throws XAException
No recovery support yet.
recover in interface XAResourceXAExceptionpublic void forget(Xid xid) throws XAException
No recovery support yet.
forget in interface XAResourceXAExceptionpublic void associate(TransactionContext tx)
public void logout()
logout in interface Sessionlogout in class SessionImplCopyright © 2004–2024 The Apache Software Foundation. All rights reserved.