bitronix.tm.resource.common
Class RecoveryXAResourceHolder

java.lang.Object
  extended by bitronix.tm.resource.common.AbstractXAStatefulHolder
      extended by bitronix.tm.resource.common.AbstractXAResourceHolder
          extended by bitronix.tm.resource.common.RecoveryXAResourceHolder
All Implemented Interfaces:
XAResourceHolder, XAStatefulHolder

public class RecoveryXAResourceHolder
extends AbstractXAResourceHolder

XAResourceHolder created by an XAResourceProducer that is used to perform recovery. Objects of this class cannot be used outside recovery scope.

© Bitronix Software

Author:
lorban

Field Summary
 
Fields inherited from interface bitronix.tm.resource.common.XAStatefulHolder
STATE_ACCESSIBLE, STATE_CLOSED, STATE_IN_POOL, STATE_NOT_ACCESSIBLE
 
Constructor Summary
RecoveryXAResourceHolder(XAResourceHolder xaResourceHolder)
           
 
Method Summary
 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.
 javax.transaction.xa.XAResource getXAResource()
          Get the vendor's XAResource implementation of the wrapped resource.
 java.util.List getXAResourceHolders()
          Get the list of XAResourceHolders created by this XAStatefulHolder that are still open.
 
Methods inherited from class bitronix.tm.resource.common.AbstractXAResourceHolder
getXAResourceHolderState, hasStateForXAResource, isParticipatingInActiveGlobalTransaction, removeXAResourceHolderState, setXAResourceHolderState
 
Methods inherited from class bitronix.tm.resource.common.AbstractXAStatefulHolder
addStateChangeEventListener, getState, removeStateChangeEventListener, setState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface bitronix.tm.resource.common.XAStatefulHolder
addStateChangeEventListener, getState, removeStateChangeEventListener, setState
 

Constructor Detail

RecoveryXAResourceHolder

public RecoveryXAResourceHolder(XAResourceHolder xaResourceHolder)
Method Detail

close

public void close()
           throws java.lang.Exception
Description copied from interface: XAStatefulHolder
Close the physical connection that this XAStatefulHolder represents.

Throws:
java.lang.Exception - a resource-specific exception thrown when there is an error closing the physical connection.

getLastReleaseDate

public java.util.Date getLastReleaseDate()
Description copied from interface: XAStatefulHolder
Get the date at which this object was last released to the pool. This is required to check if it is eligible for discard when the containing pool needs to shrink.

Returns:
the date at which this object was last released to the pool or null if it never left the pool.

getXAResource

public javax.transaction.xa.XAResource getXAResource()
Description copied from interface: XAResourceHolder
Get the vendor's XAResource implementation of the wrapped resource.

Returns:
the vendor's XAResource implementation.

getXAResourceHolders

public java.util.List getXAResourceHolders()
Description copied from interface: XAStatefulHolder
Get the list of XAResourceHolders created by this XAStatefulHolder that are still open.

This method is thread-safe.

Returns:
the list of XAResourceHolders created by this XAStatefulHolder that are still open.

getConnectionHandle

public java.lang.Object getConnectionHandle()
                                     throws java.lang.Exception
Description copied from interface: XAStatefulHolder
Create a disposable handler used to drive a pooled instance of XAStatefulHolder.

This method is thread-safe.

Returns:
a resource-specific disaposable connection object.
Throws:
java.lang.Exception - a resource-specific exception thrown when the disaposable connection cannot be created.