org.objectweb.jonas.resource
Class MCInfo

java.lang.Object
  extended by org.objectweb.jonas.resource.MCInfo

public class MCInfo
extends java.lang.Object

A ManagedConnection and its Information

Author:
sebastien.chassande@inrialpes.fr, Eric.Hardesty@bull.com

Field Summary
 boolean connectionEventListener
          Has the ConnectionEventListener been set
 java.lang.Object ctx
          The Context linked to the managedConnection instance There are three state possible global transaction : ctx= the reference to the transaction instance local transaction: ctx=null / localTransaction = true other ctx = null;
 boolean localTransaction
          Is the the managedConnection is inside a local transaction
 LocalXAWrapper lw
          If local transaction is used, then here is the LocalXAWrapper to use instead of an XA object
 javax.resource.spi.ManagedConnection mc
          The managedConnection
 java.util.List pStmts
          This vector will hold any necessary preparedStatements for this ManagedConnection.
 org.objectweb.jonas.resource.RMEImpl rme
          The event used for the later enlisting into transaction
 boolean rmeCalled
          Has the ResourceManagerEvent Listener been called
 javax.transaction.Synchronization synchro
          The current Synchronisation object used for the later enlisting into the global transaction
 java.util.Vector usedCs
          The list of used Connections
 
Constructor Summary
MCInfo(javax.resource.spi.ManagedConnection mc)
          Constructor for the MCInfo object
 
Method Summary
 void destroy()
          Fowards the detroy call on the ManagedConnection
 int findFreeStmt()
          Determine if there is a pStmt to remove The method calling this code should use synchronized block
 java.lang.String getState()
          Gets the State attribute of the MCInfo object
 java.lang.String getState(java.lang.String prefix)
          Gets the State attribute of the MCInfo object
 javax.transaction.xa.XAResource getXAResource()
          Gets the associated XAResource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mc

public javax.resource.spi.ManagedConnection mc
The managedConnection


usedCs

public java.util.Vector usedCs
The list of used Connections


rme

public org.objectweb.jonas.resource.RMEImpl rme
The event used for the later enlisting into transaction


rmeCalled

public boolean rmeCalled
Has the ResourceManagerEvent Listener been called


localTransaction

public boolean localTransaction
Is the the managedConnection is inside a local transaction


lw

public LocalXAWrapper lw
If local transaction is used, then here is the LocalXAWrapper to use instead of an XA object


ctx

public java.lang.Object ctx
The Context linked to the managedConnection instance There are three state possible global transaction : ctx= the reference to the transaction instance local transaction: ctx=null / localTransaction = true other ctx = null;


synchro

public javax.transaction.Synchronization synchro
The current Synchronisation object used for the later enlisting into the global transaction


pStmts

public java.util.List pStmts
This vector will hold any necessary preparedStatements for this ManagedConnection.


connectionEventListener

public boolean connectionEventListener
Has the ConnectionEventListener been set

Constructor Detail

MCInfo

public MCInfo(javax.resource.spi.ManagedConnection mc)
Constructor for the MCInfo object

Parameters:
mc - ManagedConnection to associate with
Method Detail

getState

public java.lang.String getState(java.lang.String prefix)
Gets the State attribute of the MCInfo object

Parameters:
prefix - String to print out
Returns:
The State value

getState

public java.lang.String getState()
Gets the State attribute of the MCInfo object

Returns:
String current state

findFreeStmt

public int findFreeStmt()
Determine if there is a pStmt to remove The method calling this code should use synchronized block

Returns:
int offset of the first free entry

destroy

public void destroy()
             throws java.lang.Exception
Fowards the detroy call on the ManagedConnection

Throws:
java.lang.Exception - if an Exception occurs

getXAResource

public javax.transaction.xa.XAResource getXAResource()
                                              throws javax.resource.ResourceException
Gets the associated XAResource

Returns:
XAResource associated with this object
Throws:
javax.resource.ResourceException - if an Exception occurs