|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.jonas.resource.ConnectionManagerImpl
Description of the ConnectionManagerImpl
Field Summary | |
static java.lang.String |
LOCAL_TRANS_SUPPORT
|
static java.lang.String |
LOGGER
This constant is used in the by the init method |
static java.lang.String |
LOGGER_FACTORY
This constant is used in the by the init method |
protected java.util.Hashtable |
mc2mci
This hashtable allows to find the list of connection handle associated to a ManagedConnection |
protected javax.resource.spi.ManagedConnectionFactory |
mcf
The ManagedConnectionFactory instance which represents the resource adapter. |
protected int |
mcMaxPoolSize
The max pool size of ManagedConnection. |
protected int |
mcMinPoolSize
The min pool size of ManagedConnection. |
protected java.util.Vector |
mcs
The list of managedConnection used without transaction |
static java.lang.String |
NO_TRANS_SUPPORT
These constants define the different transaction support values |
protected Pool |
poolMCs
The pool of ManagedConnections associated to a ManagedConnectionFactory |
static java.lang.String |
PRINT_WRITER
This constant is used in the by the init method |
static java.lang.String |
RESOURCE_ADAPTER
This constant is used in the by the init method |
static java.lang.String |
RESOURCE_BUNDLE_NAME
This constant is used in the by the init method |
static java.lang.String |
RESOURCE_MANAGER_EVENT_LISTENER
This constant is used in the by the init method |
protected java.lang.String |
resourceBundleName
|
protected org.objectweb.transaction.api.ResourceManagerEventListener |
rmel
This variable is used by the server to register connections when no transactionnal context exists |
protected ResourceSpec |
rs
This is a cache to the last instance of ResourceSpec used by the ConnectionManager. |
protected java.util.Vector |
synchros
The list of Synchronisation instance managed in this ConnectionManager |
protected javax.transaction.TransactionManager |
tm
The transaction manager in server |
protected org.objectweb.util.monolog.api.Logger |
trace
The Logger instance where messages are written. |
static java.lang.String |
TRANSACTION_MANAGER
This constant is used in the by the init method |
protected java.lang.String |
transSupport
The holds the transaction support level for the associated RAR file |
protected java.util.Hashtable |
usedMCs
The list of used ManagedConnections key = transaction reference value = MCInfo |
static java.lang.String |
XA_TRANS_SUPPORT
|
Constructor Summary | |
ConnectionManagerImpl(java.lang.String _transSupport)
|
Method Summary | |
java.lang.Object |
allocateConnection(javax.resource.spi.ManagedConnectionFactory _mcf,
javax.resource.spi.ConnectionRequestInfo cxRequestInfo)
The method allocateConnection gets called by the resource adapter's connection factory instance. see javax.resource.cci.ConnectionManager |
void |
checkManagedConnection(javax.resource.spi.ManagedConnectionFactory mcf,
javax.resource.spi.ManagedConnection current,
java.lang.Object connection,
javax.resource.spi.ConnectionRequestInfo cri)
see org.objectweb.transaction.api..ConnectionManager |
void |
cleanResourceAdapter()
Description of the Method |
void |
connectionClosed(javax.resource.spi.ConnectionEvent event)
IMPLEMENTATION OF INTERFACE ConnectionEventListener * A ManagedConnection instance calls the connectionClosed method to notify its registered set of listeners when an application component closes a connection handle. |
void |
connectionErrorOccurred(javax.resource.spi.ConnectionEvent event)
The connectionErrorOccurred method indicates that the associated ManagedConnection instance is now invalid and unusable. |
java.lang.Object |
createResource(java.lang.Object hints)
Call the ManagedConnectionFactory in order to create a new instance. of ManagedConnection. |
protected java.lang.String |
getState(java.lang.String prefix)
Gets the State attribute of the ConnectionManagerImpl object |
void |
init(javax.naming.Context ctx)
This method permits to initialize the ConnectionManager with the following parameter: RESOURCE_BUNDLE_NAME: The name of the resource bundle in order to internationalize the logging LOGGER: The logger instance where events are logged LOGGER_FACTORY: A logger factory to obtain a logger PRINT_WRITER: The printwriter where event are logged TRANSACTION_MANAGER: The Transaction manager linked to this resource manager RESOURCE_MANAGER_EVENT_LISTENER: The resource manage event listener which subscribed to later connection enlistement. |
void |
localTransactionCommitted(javax.resource.spi.ConnectionEvent event)
Notifies that a Resource Manager Local Transaction was committed on the ManagedConnection instance. see javax.resource.spi.ConnectionEventListener |
void |
localTransactionRolledback(javax.resource.spi.ConnectionEvent event)
Notifies that a Resource Manager Local Transaction was rolled back on the ManagedConnection instance. see javax.resource.spi.ConnectionEventListener |
void |
localTransactionStarted(javax.resource.spi.ConnectionEvent event)
Notifies that a Resource Manager Local Transaction was started on the ManagedConnection instance. see javax.resource.spi.ConnectionEventListener |
boolean |
matchResource(java.lang.Object res,
java.lang.Object hints)
All method of the pool match to the right type of ManagedConnection because there is one pool by ManagedConnectionFactory. see org.objectweb.util.pool.api.PoolMatchFactory |
java.lang.Object |
matchResource(java.util.Set res,
java.lang.Object hints)
All method of the pool match to the right type of ManagedConnection because there is one pool by ManagedConnectionFactory. see org.objectweb.util.pool.api.PoolMatchFactory |
void |
setLogger(org.objectweb.util.monolog.api.Logger l)
Setters method to initialize the ConnectionManager The logger instance where events are logged |
void |
setLoggerFactory(org.objectweb.util.monolog.api.LoggerFactory lf)
Setters method to initialize the ConnectionManager A logger factory to obtain a logger |
void |
setPrintWriter(java.io.PrintWriter pw)
Setters method to initialize the ConnectionManager The printwriter where event are logged |
void |
setResourceAdapter(javax.resource.spi.ManagedConnectionFactory _mcf)
Setters method to initialize the ConnectionManager The managedConnectionFactory instance of the resource which must be maneged by this connectionManager |
void |
setResourceAdapter(javax.resource.spi.ManagedConnectionFactory _mcf,
int initPoolSize,
int minPoolSize,
int maxPoolSize)
Setters method to initialize the ConnectionManager The managedConnectionFactory instance of the resource which must be maneged by this connectionManager |
void |
setResourceManagerEventListener(org.objectweb.transaction.api.ResourceManagerEventListener _rmel)
Setters method to initialize the ConnectionManager The logger instance where events are logged |
void |
setTransactionManager(javax.transaction.TransactionManager _tm)
Setters method to initialize the ConnectionManager The Transaction manager linked to this resource managed |
java.lang.String |
toString()
Description of the Method |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected org.objectweb.util.monolog.api.Logger trace
protected org.objectweb.transaction.api.ResourceManagerEventListener rmel
protected java.lang.String resourceBundleName
protected javax.transaction.TransactionManager tm
protected java.util.Hashtable mc2mci
protected int mcMaxPoolSize
protected int mcMinPoolSize
protected javax.resource.spi.ManagedConnectionFactory mcf
protected Pool poolMCs
protected java.util.Hashtable usedMCs
protected java.util.Vector mcs
protected java.util.Vector synchros
protected ResourceSpec rs
protected java.lang.String transSupport
public static final java.lang.String RESOURCE_BUNDLE_NAME
public static final java.lang.String LOGGER
public static final java.lang.String LOGGER_FACTORY
public static final java.lang.String TRANSACTION_MANAGER
public static final java.lang.String RESOURCE_MANAGER_EVENT_LISTENER
public static final java.lang.String RESOURCE_ADAPTER
public static final java.lang.String PRINT_WRITER
public static final java.lang.String NO_TRANS_SUPPORT
public static final java.lang.String LOCAL_TRANS_SUPPORT
public static final java.lang.String XA_TRANS_SUPPORT
Constructor Detail |
public ConnectionManagerImpl(java.lang.String _transSupport)
Method Detail |
public void setLogger(org.objectweb.util.monolog.api.Logger l)
l
- The new Logger valuepublic void setLoggerFactory(org.objectweb.util.monolog.api.LoggerFactory lf)
lf
- The new LoggerFactory valuepublic void setPrintWriter(java.io.PrintWriter pw)
pw
- The new PrintWriter valuepublic void setResourceManagerEventListener(org.objectweb.transaction.api.ResourceManagerEventListener _rmel)
_rmel
- The new ResourceManagerEventListener valuepublic void setTransactionManager(javax.transaction.TransactionManager _tm)
_tm
- The new TransactionManager valuepublic void setResourceAdapter(javax.resource.spi.ManagedConnectionFactory _mcf) throws java.lang.Exception
_mcf
- The new ResourceAdapter valuejava.lang.Exception
- Description of Exceptionpublic void setResourceAdapter(javax.resource.spi.ManagedConnectionFactory _mcf, int initPoolSize, int minPoolSize, int maxPoolSize) throws java.lang.Exception
_mcf
- The new ResourceAdapter valueinitPoolSize
- The initial pool size int to set for non-pool providerminPoolSize
- The min pool size int to set for non-pool providermaxPoolSize
- The max pool size int to set for non-pool providerjava.lang.Exception
- Description of Exceptionpublic void init(javax.naming.Context ctx) throws java.lang.Exception
ctx
- Description of Parameterjava.lang.Exception
- Description of Exceptionpublic void cleanResourceAdapter() throws javax.resource.ResourceException
javax.resource.ResourceException
- Description of Exceptionpublic java.lang.Object allocateConnection(javax.resource.spi.ManagedConnectionFactory _mcf, javax.resource.spi.ConnectionRequestInfo cxRequestInfo) throws javax.resource.ResourceException
allocateConnection
in interface javax.resource.spi.ConnectionManager
public void checkManagedConnection(javax.resource.spi.ManagedConnectionFactory mcf, javax.resource.spi.ManagedConnection current, java.lang.Object connection, javax.resource.spi.ConnectionRequestInfo cri) throws javax.resource.ResourceException
checkManagedConnection
in interface org.objectweb.transaction.api.ConnectionManager
public boolean matchResource(java.lang.Object res, java.lang.Object hints)
matchResource
in interface PoolMatchFactory
org.objectweb.jonas.resource.pool.api.PoolMatchFactory
pr
- The Object to test its matching with some
"properties" specified by hints.hints
- The "properties" that the Object specified by pr
should match.public java.lang.Object matchResource(java.util.Set res, java.lang.Object hints) throws java.lang.Exception
matchResource
in interface PoolMatchFactory
org.objectweb.jonas.resource.pool.api.PoolMatchFactory
res
- A set of Objects to test if matching with some
"properties" specified by hints.hints
- The "properties" that the Object specified by pr
should match.java.lang.Exception
- Description of Exceptionpublic java.lang.Object createResource(java.lang.Object hints) throws java.lang.Exception
createResource
in interface PoolMatchFactory
org.objectweb.jonas.resource.pool.api.PoolMatchFactory
hints
- The "properties" that the created Object should
conform to.public void connectionClosed(javax.resource.spi.ConnectionEvent event)
connectionClosed
in interface javax.resource.spi.ConnectionEventListener
public void connectionErrorOccurred(javax.resource.spi.ConnectionEvent event)
connectionErrorOccurred
in interface javax.resource.spi.ConnectionEventListener
public void localTransactionCommitted(javax.resource.spi.ConnectionEvent event)
localTransactionCommitted
in interface javax.resource.spi.ConnectionEventListener
public void localTransactionRolledback(javax.resource.spi.ConnectionEvent event)
localTransactionRolledback
in interface javax.resource.spi.ConnectionEventListener
public void localTransactionStarted(javax.resource.spi.ConnectionEvent event)
localTransactionStarted
in interface javax.resource.spi.ConnectionEventListener
public java.lang.String toString()
toString
in class java.lang.Object
protected java.lang.String getState(java.lang.String prefix)
prefix
- Description of Parameter
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |