org.objectweb.jonas.resource
Class MCInfo

java.lang.Object
  extended byorg.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.Vector 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
 java.util.HashSet stmtHash
          This HashSet contains the currently used preparedStatements for this ManagedConnection.
 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
 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()
          Fowards the getResource call to the associated ConnectionManager
 boolean isFreeStmt()
          Determine if the first pStmt is free to remove
 
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.Vector pStmts
This vector will hold any necessary preparedStatements for this ManagedConnection.


stmtHash

public java.util.HashSet stmtHash
This HashSet contains the currently used 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

Method Detail

getState

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

Returns:
The State value

getState

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


isFreeStmt

public boolean isFreeStmt()
Determine if the first pStmt is free to remove


destroy

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

Throws:
java.lang.Exception

getXAResource

public javax.transaction.xa.XAResource getXAResource()
                                              throws javax.resource.ResourceException
Fowards the getResource call to the associated ConnectionManager

Throws:
javax.resource.ResourceException