|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.commons.AbstractSession
org.apache.jackrabbit.core.SessionImpl
org.apache.jackrabbit.core.XASessionImpl
public class XASessionImpl
Session extension that provides XA support.
| Field Summary |
|---|
| Fields inherited from class org.apache.jackrabbit.core.SessionImpl |
|---|
accessMgr, ADD_NODE_ACTION, alive, attributes, hierMgr, itemMgr, itemStateMgr, listeners, lockTokens, loginContext, namePathResolver, ntMgr, READ_ACTION, REMOVE_ACTION, rep, SET_PROPERTY_ACTION, subject, userId, valueFactory, versionMgr, wsp |
| Fields inherited from interface javax.transaction.xa.XAResource |
|---|
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY |
| Constructor Summary | |
|---|---|
protected |
XASessionImpl(RepositoryImpl rep,
AuthContext loginContext,
WorkspaceConfig wspConfig)
Create a new instance of this class. |
protected |
XASessionImpl(RepositoryImpl rep,
javax.security.auth.Subject subject,
WorkspaceConfig wspConfig)
Create a new instance of this class. |
| Method Summary | |
|---|---|
void |
associate(TransactionContext tx)
Associate this session with a global transaction. |
void |
commit(javax.transaction.xa.Xid xid,
boolean onePhase)
|
protected VersionManager |
createVersionManager(RepositoryImpl rep)
Create the version manager. |
protected WorkspaceImpl |
createWorkspaceInstance(WorkspaceConfig wspConfig,
SharedItemStateManager stateMgr,
RepositoryImpl rep,
SessionImpl session)
Creates the workspace instance backing this session. |
void |
end(javax.transaction.xa.Xid xid,
int flags)
If TMSUCCESS is specified, we disassociate this session
from the transaction specified. |
void |
forget(javax.transaction.xa.Xid xid)
No recovery support yet. |
LockManager |
getLockManager()
Return the lock manager for this session. |
int |
getTransactionTimeout()
|
javax.transaction.xa.XAResource |
getXAResource()
Retrieves an XAResource object that the transaction manager
will use to manage this XASession object's participation in
a distributed transaction. |
boolean |
isSameRM(javax.transaction.xa.XAResource xares)
Two resources belong to the same resource manager if both connections (i.e. |
void |
logout()
Clears the local namespace mappings. |
int |
prepare(javax.transaction.xa.Xid xid)
|
javax.transaction.xa.Xid[] |
recover(int flags)
No recovery support yet. |
void |
rollback(javax.transaction.xa.Xid xid)
|
boolean |
setTransactionTimeout(int seconds)
|
void |
start(javax.transaction.xa.Xid xid,
int flags)
If TMNOFLAGS is specified, we create a new transaction
context and associate it with this resource. |
| Methods inherited from class org.apache.jackrabbit.commons.AbstractSession |
|---|
exportDocumentView, exportDocumentView, exportSystemView, exportSystemView, getNamespacePrefix, getNamespacePrefixes, getNamespaceURI, importXML |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.jcr.Session |
|---|
addLockToken, checkPermission, exportDocumentView, exportDocumentView, exportSystemView, exportSystemView, getAttribute, getAttributeNames, getImportContentHandler, getItem, getLockTokens, getNamespacePrefix, getNamespacePrefixes, getNamespaceURI, getNodeByUUID, getRepository, getRootNode, getUserID, getValueFactory, getWorkspace, hasPendingChanges, impersonate, importXML, isLive, itemExists, move, refresh, removeLockToken, save, setNamespacePrefix |
| Constructor Detail |
|---|
protected XASessionImpl(RepositoryImpl rep,
AuthContext loginContext,
WorkspaceConfig wspConfig)
throws javax.jcr.AccessDeniedException,
javax.jcr.RepositoryException
rep - repositoryloginContext - login context containing authenticated subjectwspConfig - workspace configuration
javax.jcr.AccessDeniedException - if the subject of the given login context
is not granted access to the specified
workspace
javax.jcr.RepositoryException - if another error occurs
protected XASessionImpl(RepositoryImpl rep,
javax.security.auth.Subject subject,
WorkspaceConfig wspConfig)
throws javax.jcr.AccessDeniedException,
javax.jcr.RepositoryException
rep - repositorysubject - authenticated subjectwspConfig - workspace configuration
javax.jcr.AccessDeniedException - if the given subject is not granted access
to the specified workspace
javax.jcr.RepositoryException - if another error occurs| Method Detail |
|---|
protected WorkspaceImpl createWorkspaceInstance(WorkspaceConfig wspConfig,
SharedItemStateManager stateMgr,
RepositoryImpl rep,
SessionImpl session)
createWorkspaceInstance in class SessionImplwspConfig - The workspace configurationstateMgr - The shared item state managerrep - The repositorysession - The session
WorkspaceImpl class or an extension
thereof.
protected VersionManager createVersionManager(RepositoryImpl rep)
throws javax.jcr.RepositoryException
createVersionManager in class SessionImpljavax.jcr.RepositoryException
public LockManager getLockManager()
throws javax.jcr.RepositoryException
getLockManager in class SessionImpljavax.jcr.RepositoryExceptionpublic javax.transaction.xa.XAResource getXAResource()
XAResource object that the transaction manager
will use to manage this XASession object's participation in
a distributed transaction.
getXAResource in interface XASessionXAResource object.public int getTransactionTimeout()
getTransactionTimeout in interface javax.transaction.xa.XAResourcepublic boolean setTransactionTimeout(int seconds)
setTransactionTimeout in interface javax.transaction.xa.XAResource
public boolean isSameRM(javax.transaction.xa.XAResource xares)
throws javax.transaction.xa.XAException
isSameRM in interface javax.transaction.xa.XAResourcejavax.transaction.xa.XAException
public void start(javax.transaction.xa.Xid xid,
int flags)
throws javax.transaction.xa.XAException
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 javax.transaction.xa.XAResourcejavax.transaction.xa.XAException
public void end(javax.transaction.xa.Xid xid,
int flags)
throws javax.transaction.xa.XAException
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 javax.transaction.xa.XAResourcejavax.transaction.xa.XAException
public int prepare(javax.transaction.xa.Xid xid)
throws javax.transaction.xa.XAException
prepare in interface javax.transaction.xa.XAResourcejavax.transaction.xa.XAException
public void commit(javax.transaction.xa.Xid xid,
boolean onePhase)
throws javax.transaction.xa.XAException
commit in interface javax.transaction.xa.XAResourcejavax.transaction.xa.XAException
public void rollback(javax.transaction.xa.Xid xid)
throws javax.transaction.xa.XAException
rollback in interface javax.transaction.xa.XAResourcejavax.transaction.xa.XAException
public javax.transaction.xa.Xid[] recover(int flags)
throws javax.transaction.xa.XAException
recover in interface javax.transaction.xa.XAResourcejavax.transaction.xa.XAException
public void forget(javax.transaction.xa.Xid xid)
throws javax.transaction.xa.XAException
forget in interface javax.transaction.xa.XAResourcejavax.transaction.xa.XAExceptionpublic void associate(TransactionContext tx)
public void logout()
super.logout() when overriding this method to avoid
namespace mappings to be carried over to a new session.
logout in interface javax.jcr.Sessionlogout in class SessionImpl
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||