org.ow2.jonas.resource.internal.cm
Class ManagedConnectionInfo

java.lang.Object
  extended by org.ow2.jonas.resource.internal.cm.ManagedConnectionInfo

public class ManagedConnectionInfo
extends Object

A ManagedConnection and its Information

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

Field Summary
 boolean connectionEventListener
          Has the ConnectionEventListener been set
 boolean localTransaction
          Is the the managedConnection is inside a local transaction
 LocalXAResource lw
          If local transaction is used, then here is the LocalXAWrapper to use instead of an XA object
 ManagedConnection mc
          The managedConnection
protected static org.objectweb.util.monolog.api.Logger myLogger
           
 PreparedStatementCache pStmts
          Prepared statement cache for this ManagedConnection.
 JResourceManagerEvent rme
          The event used for the later enlisting into transaction
 boolean rmeCalled
          Has the ResourceManagerEvent Listener been called
 Synchronization synchro
          The current Synchronisation object used for the later enlisting into the global transaction
 Vector usedCs
          The list of used Connections
 
Constructor Summary
ManagedConnectionInfo(ManagedConnection mc, int maxCacheSize, String pstmtCachePolicy, PreparedStatementCacheStatistics pstmtStats, org.objectweb.util.monolog.api.Logger logger)
          Constructor for the ManagedConnectionInfo object
 
Method Summary
 void destroy()
          Fowards the detroy call on the ManagedConnection
 Object getGlobalTx()
           
 JResourceManagerEvent getResourceManagementEvent()
           
 String getState()
          Gets the State attribute of the ManagedConnectionInfo object
 String getState(String prefix)
          Gets the State attribute of the ManagedConnectionInfo object
 XAResource getXAResource()
          Gets the associated XAResource
 boolean isCacheEnabled()
           
 void setGlobalTx(Object tx)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mc

public ManagedConnection mc
The managedConnection


usedCs

public Vector usedCs
The list of used Connections


rme

public JResourceManagerEvent 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 LocalXAResource lw
If local transaction is used, then here is the LocalXAWrapper to use instead of an XA object


synchro

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


pStmts

public PreparedStatementCache pStmts
Prepared statement cache for this ManagedConnection.


myLogger

protected static org.objectweb.util.monolog.api.Logger myLogger

connectionEventListener

public boolean connectionEventListener
Has the ConnectionEventListener been set

Constructor Detail

ManagedConnectionInfo

public ManagedConnectionInfo(ManagedConnection mc,
                             int maxCacheSize,
                             String pstmtCachePolicy,
                             PreparedStatementCacheStatistics pstmtStats,
                             org.objectweb.util.monolog.api.Logger logger)
Constructor for the ManagedConnectionInfo object

Parameters:
mc - ManagedConnection to associate with
Method Detail

setGlobalTx

public void setGlobalTx(Object tx)

getGlobalTx

public Object getGlobalTx()

getState

public String getState(String prefix)
Gets the State attribute of the ManagedConnectionInfo object

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

getState

public String getState()
Gets the State attribute of the ManagedConnectionInfo object

Returns:
String current state

destroy

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

Throws:
Exception - if an Exception occurs

getXAResource

public XAResource getXAResource()
                         throws ResourceException
Gets the associated XAResource

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

getResourceManagementEvent

public JResourceManagerEvent getResourceManagementEvent()
Returns:
the rme

isCacheEnabled

public boolean isCacheEnabled()
Returns:
true if Prepared statement cache is enabled


Copyright © 2011 OW2 Consortium. All Rights Reserved.