public class SpeedoManagedConnection implements ManagedConnection,javax.resource.spi.LocalTransaction,javax.resource.cci.LocalTransaction,XAResource,ManagedConnectionMetaData(Code)
isSameRM(XAResource resource) Used by JTA in order to verify that it has not already registered a
XAResource to manage this transaction context from this RM.
Constructs a SpeedoManagedConnection.
Parameters: el - The logger into which to produce ManagedConnection-relatedtraces. Parameters: fmcf - The ManagedConnectionFactory that has requested theManagedConnection creation.
Method Detail
addConnectionEventListener
public synchronized void addConnectionEventListener(ConnectionEventListener listener)(Code)
Adds a listener to the listeners list if it has not
already been done. This means that duplicates are ignored.
It first creates this list if needed (creation at first add).
associateConnection
public synchronized void associateConnection(Object o) throws ResourceException(Code)
Associates a new Connection to this ManagedConnection. Nothing is done
if it has already been associated (enforces no duplicate).
begin
public synchronized void begin() throws ResourceException(Code)
Begins the LocalTransaction if it has not already been started.
cleanup
public void cleanup() throws ResourceException(Code)
Cleans up the connection.
commit
public synchronized void commit() throws ResourceException(Code)
Retrieves the right POManagerItf in according the managed connection
state (in a local transaction, in a XA transaction or out of transaction)
a POManagerItf instance (never null).
Used by JTA in order to verify that it has not already registered a
XAResource to manage this transaction context from this RM. If it is the
case, both XAResource are warned of this fact (endWithNoSameRM = false).
This means that these XAResource will be released at "end" time.
Parameters: resource - The resource to be compared against this one wrt RM.
Gets the Xid of distributed transactions to be recovered from the Speedo
manager.
registerSynchronization
public synchronized void registerSynchronization() throws XAException(Code)
Registers the POManagerItf of the current SpeedoXAContext to the current
transaction, if it is not already done.
throws: XAException - if the registering is not possible:- TM not availlable- Pr
removeConnectionEventListener
public synchronized void removeConnectionEventListener(ConnectionEventListener listener)(Code)
Removes a listener from the listeners list. If the list does
not eist (null), or if this listener does not belong to this list,
nothing is done.
rollback
public synchronized void rollback() throws ResourceException(Code)