|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XAStatefulHolder
Any pooled connection class must implement the 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 XAResourceHolder
s.
Field Summary | |
---|---|
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. |
Method Summary | |
---|---|
void |
addStateChangeEventListener(StateChangeListener listener)
Register an implementation of StateChangeListener . |
void |
close()
Close the physical connection that this XAStatefulHolder represents. |
Object |
getConnectionHandle()
Create a disposable handler used to drive a pooled instance of XAStatefulHolder . |
Date |
getLastReleaseDate()
Get the date at which this object was last released to the pool. |
int |
getState()
Get the current resource state. |
List |
getXAResourceHolders()
Get the list of XAResourceHolder s 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. |
Field Detail |
---|
static final int STATE_CLOSED
static final int STATE_IN_POOL
static final int STATE_ACCESSIBLE
static final int STATE_NOT_ACCESSIBLE
Method Detail |
---|
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.List getXAResourceHolders()
XAResourceHolder
s created by this
XAStatefulHolder
that are still open.
This method is thread-safe.
XAResourceHolder
s created by this
XAStatefulHolder
that are still open.Object getConnectionHandle() throws Exception
XAStatefulHolder
.
This method is thread-safe.
Exception
- a resource-specific exception thrown when the disaposable connection cannot be created.void close() throws Exception
XAStatefulHolder
represents.
Exception
- a resource-specific exception thrown when there is an error closing the physical connection.Date getLastReleaseDate()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |