public interface XAStatefulHolder
XAStatefulHolder interface. It defines all the services
that must be implemented by the connection as well as the pooling lifecycle states.
Instances of this interface have to create and manage XAResourceHolders.| Modifier and Type | Field and Description |
|---|---|
static int |
STATE_ACCESSIBLE
The state in which the resource is when it out of the pool but accessible by the application.
|
static int |
STATE_CLOSED
The state in which the resource is when it is closed and unusable.
|
static int |
STATE_IN_POOL
The state in which the resource is when it is available in the pool.
|
static int |
STATE_NOT_ACCESSIBLE
The state in which the resource is when it out of the pool but not accessible by the application.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addStateChangeEventListener(StateChangeListener listener)
Register an implementation of
StateChangeListener. |
void |
close()
Close the physical connection that this
XAStatefulHolder represents. |
java.lang.Object |
getConnectionHandle()
Create a disposable handler used to drive a pooled instance of
XAStatefulHolder. |
java.util.Date |
getLastReleaseDate()
Get the date at which this object was last released to the pool.
|
int |
getState()
Get the current resource state.
|
java.util.List<XAResourceHolder> |
getXAResourceHolders()
Get the list of
XAResourceHolders created by this
XAStatefulHolder that are still open. |
void |
removeStateChangeEventListener(StateChangeListener listener)
Unregister an implementation of
StateChangeListener. |
void |
setState(int state)
Set the current resource state.
|
static final int STATE_CLOSED
static final int STATE_IN_POOL
static final int STATE_ACCESSIBLE
static final int STATE_NOT_ACCESSIBLE
int getState()
This method is thread-safe.
void setState(int state)
This method is thread-safe.
state - the current resource state.void addStateChangeEventListener(StateChangeListener listener)
StateChangeListener.listener - the StateChangeListener implementation to register.void removeStateChangeEventListener(StateChangeListener listener)
StateChangeListener.listener - the StateChangeListener implementation to unregister.java.util.List<XAResourceHolder> getXAResourceHolders()
XAResourceHolders created by this
XAStatefulHolder that are still open.
This method is thread-safe.
XAResourceHolders created by this
XAStatefulHolder that are still open.java.lang.Object getConnectionHandle()
throws java.lang.Exception
XAStatefulHolder.
This method is thread-safe.
java.lang.Exception - a resource-specific exception thrown when the disaposable connection cannot be created.void close()
throws java.lang.Exception
XAStatefulHolder represents.java.lang.Exception - a resource-specific exception thrown when there is an error closing the physical connection.java.util.Date getLastReleaseDate()
Copyright © 2006-2021 Bitronix Software. All Rights Reserved.