public class SessionHandleState
extends java.lang.Object
| Constructor and Description |
|---|
SessionHandleState(XATransactionalResource resource,
javax.transaction.xa.XAResource xaResource) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isActiveInTransaction(CompositeTransaction tx)
Tests if the session is active (enlisted) in the given transaction.
|
boolean |
isErroneous()
Checks if the session has had any errors.
|
boolean |
isInactiveInTransaction(CompositeTransaction tx)
Tests if the session is inactive (delisted) for the given transaction.
|
boolean |
isTerminated()
Checks if the session handle is terminated (i.e., can be discarded) and the
underlying vendor xa connection/session can be reused or destroyed.
|
void |
notifyBeforeUse(CompositeTransaction ct)
Notification that the session handle is about to be used in the current
transaction context (i.e.
|
void |
notifySessionBorrowed()
Notification that the session was gotten from the pool.
|
void |
notifySessionClosed()
Notification that the session handle has been closed by
the application.
|
void |
notifySessionErrorOccurred()
Marks this session as erroneous.
|
void |
notifyTransactionTerminated(CompositeTransaction ct)
Notifies the session that the transaction was terminated.
|
void |
registerSessionHandleStateChangeListener(SessionHandleStateChangeListener listener) |
java.lang.String |
toString() |
void |
unregisterSessionHandleStateChangeListener(SessionHandleStateChangeListener listener) |
public SessionHandleState(XATransactionalResource resource, javax.transaction.xa.XAResource xaResource)
public boolean isTerminated()
public void notifySessionBorrowed()
public void notifySessionClosed()
public void notifyBeforeUse(CompositeTransaction ct) throws InvalidSessionHandleStateException
ct - The current transaction, or null if none.InvalidSessionHandleStateExceptionpublic boolean isErroneous()
public void notifySessionErrorOccurred()
public void notifyTransactionTerminated(CompositeTransaction ct)
ct - public void registerSessionHandleStateChangeListener(SessionHandleStateChangeListener listener)
public void unregisterSessionHandleStateChangeListener(SessionHandleStateChangeListener listener)
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean isActiveInTransaction(CompositeTransaction tx)
tx - public boolean isInactiveInTransaction(CompositeTransaction tx)
tx - Copyright © 2018. All Rights Reserved.