|
||||||||||
| 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 | |
|---|---|
static String |
SYSTEM_PROPERTY_DEFAULT_TRANSACTION_TIMEOUT
System property specifying the default Transaction Timeout |
| Fields inherited from class org.apache.jackrabbit.core.SessionImpl |
|---|
accessMgr, alive, attributes, DISABLE_CLUSTER_SYNC_ON_REFRESH, hierMgr, itemMgr, itemStateMgr, listeners, loginContext, namePathResolver, ntInstanceHandler, ntMgr, rep, subject, userId, valueFactory, versionMgr, wsp |
| Fields inherited from interface javax.jcr.Session |
|---|
ACTION_ADD_NODE, ACTION_READ, ACTION_REMOVE, ACTION_SET_PROPERTY |
| 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,
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(Xid xid,
boolean onePhase)
|
protected InternalVersionManager |
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(Xid xid,
int flags)
If TMSUCCESS is specified, we disassociate this session
from the transaction specified. |
void |
forget(Xid xid)
No recovery support yet. |
LockManager |
getLockManager()
Return the lock manager for this session. |
int |
getTransactionTimeout()
|
XAResource |
getXAResource()
|
boolean |
isSameRM(XAResource xares)
Two resources belong to the same resource manager if both connections (i.e. |
void |
logout()
|
int |
prepare(Xid xid)
|
Xid[] |
recover(int flags)
No recovery support yet. |
void |
rollback(Xid xid)
|
boolean |
setTransactionTimeout(int seconds)
|
void |
start(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 |
| Field Detail |
|---|
public static final String SYSTEM_PROPERTY_DEFAULT_TRANSACTION_TIMEOUT
| Constructor Detail |
|---|
protected XASessionImpl(RepositoryImpl rep,
AuthContext loginContext,
WorkspaceConfig wspConfig)
throws AccessDeniedException,
RepositoryException
rep - repositoryloginContext - login context containing authenticated subjectwspConfig - workspace configuration
AccessDeniedException - if the subject of the given login context
is not granted access to the specified
workspace
RepositoryException - if another error occurs
protected XASessionImpl(RepositoryImpl rep,
Subject subject,
WorkspaceConfig wspConfig)
throws AccessDeniedException,
RepositoryException
rep - repositorysubject - authenticated subjectwspConfig - workspace configuration
AccessDeniedException - if the given subject is not granted access
to the specified workspace
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 InternalVersionManager createVersionManager(RepositoryImpl rep)
throws RepositoryException
createVersionManager in class SessionImplRepositoryException
public LockManager getLockManager()
throws RepositoryException
getLockManager in class SessionImplRepositoryExceptionpublic XAResource getXAResource()
getXAResource in interface XASessionpublic int getTransactionTimeout()
getTransactionTimeout in interface XAResourcepublic boolean setTransactionTimeout(int seconds)
setTransactionTimeout in interface XAResource
public boolean isSameRM(XAResource xares)
throws XAException
isSameRM in interface XAResourceXAException
public void start(Xid xid,
int flags)
throws 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 XAResourceXAException
public void end(Xid xid,
int flags)
throws 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 XAResourceXAException
public int prepare(Xid xid)
throws XAException
prepare in interface XAResourceXAException
public void commit(Xid xid,
boolean onePhase)
throws XAException
commit in interface XAResourceXAException
public void rollback(Xid xid)
throws XAException
rollback in interface XAResourceXAException
public Xid[] recover(int flags)
throws XAException
recover in interface XAResourceXAException
public void forget(Xid xid)
throws XAException
forget in interface XAResourceXAExceptionpublic void associate(TransactionContext tx)
public void logout()
logout in interface Sessionlogout in class SessionImpl
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||