org.objectweb.jonas.resource
Class ConnectionManagerImpl

java.lang.Object
  extended byorg.objectweb.jonas.resource.ConnectionManagerImpl
All Implemented Interfaces:
javax.resource.spi.ConnectionEventListener, javax.resource.spi.ConnectionManager, java.util.EventListener, PoolMatchFactory, java.io.Serializable, SQLManager, org.objectweb.jotm.TransactionResourceManager

public class ConnectionManagerImpl
extends java.lang.Object
implements javax.resource.spi.ConnectionEventListener, javax.resource.spi.ConnectionManager, PoolMatchFactory, SQLManager, org.objectweb.jotm.TransactionResourceManager

Description of the ConnectionManagerImpl

Author:
chassand created 15 novembre 2001
See Also:
Serialized Form

Field Summary
static int JDBC_CHECK_CONNECTION
           
static int JDBC_KEEP_ALIVE
           
static int JDBC_NO_TEST
          Constants for use with JDBC connection level
static int JDBC_SEND_STATEMENT
           
static java.lang.String LOCAL_TRANS_SUPPORT
          Rar supports local transactions
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  java.util.Vector mcs
          The list of managedConnection used without transaction
static java.lang.String NO_TRANS_SUPPORT
          Rar doesn't support transactions
static java.lang.String POOL_LOGGER
          This constant is used in the by the init method
protected  Pool poolMCs
          The pool of ManagedConnections associated to a ManagedConnectionFactory There's one instance of pool by instance for one instance of this class (ConnectionManagerImpl).
protected static org.objectweb.util.monolog.api.Logger poolTrace
          Pool infomation logger
static java.lang.String PRINT_WRITER
          This constant is used in the by the init method
static int PSWRAP_1
          Constants to determine which PreparedStatement types to call
static int PSWRAP_2
           
static int PSWRAP_3
           
static int PSWRAP_4
           
static int PSWRAP_5
           
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  org.objectweb.transaction.jta.ResourceManagerEventListener rmel
          Used by the server to register connections when no transactionnal context exists
protected  java.util.Vector synchros
          The list of Synchronisation instance managed in this ConnectionManager
protected  org.objectweb.transaction.jta.TransactionManager tm
          The transaction manager in server
protected static org.objectweb.util.monolog.api.Logger trace
          Main logger
static java.lang.String TRANSACTION_MANAGER
          This constant is used in the by the init method
protected  java.util.Hashtable usedMCs
          The list of used ManagedConnections key = transaction reference value = MCInfo
static java.lang.String XA_TRANS_SUPPORT
          Rar supports XA transactions
 
Constructor Summary
ConnectionManagerImpl(java.lang.String transSupport)
          ConnectionManagerImpl constructor
 
Method Summary
 java.lang.Object allocateConnection(javax.resource.spi.ManagedConnectionFactory pMcf, javax.resource.spi.ConnectionRequestInfo cxRequestInfo)
          The method allocateConnection gets called by the resource adapter's connection factory instance.
 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.
 void destroyPStmts(MCInfo mcinfo)
          Destroying of the PreparedStatement objects of the Pool
 int getCheckLevel()
           
 int getCurrentInTx()
           
 int getMaxPstmtPoolSize()
           
 Pool getPool()
           
 java.sql.PreparedStatement getPStatement(MCInfo mcinfo, java.lang.Object conn, java.lang.String user, java.lang.String sql)
          IMPLEMENTATION OF INTERFACE SQLManager
 java.sql.PreparedStatement getPStatement(MCInfo mcinfo, java.lang.Object conn, java.lang.String user, java.lang.String sql, int autoGeneratedKeys)
          Get the specified PreparedStatement
 java.sql.PreparedStatement getPStatement(MCInfo mcinfo, java.lang.Object conn, java.lang.String user, java.lang.String sql, int[] columnIndexes)
          Get the specified PreparedStatement
 java.sql.PreparedStatement getPStatement(MCInfo mcinfo, java.lang.Object conn, java.lang.String user, java.lang.String sql, int resultSetType, int resultSetConcurrency)
          Get the specified PreparedStatement
 java.sql.PreparedStatement getPStatement(MCInfo mcinfo, java.lang.Object conn, java.lang.String user, java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
          Get the specified PreparedStatement
 java.sql.PreparedStatement getPStatement(MCInfo mcinfo, java.lang.Object conn, java.lang.String user, java.lang.String sql, java.lang.String[] columnNames)
          Get the specified PreparedStatement
protected  java.lang.String getState(java.lang.String prefix)
          Gets the State attribute of the ConnectionManagerImpl object
 java.lang.String getTestStatement()
           
 java.lang.String getXAName()
          Get the XAName to use
 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.
 void localTransactionRolledback(javax.resource.spi.ConnectionEvent event)
          Notifies that a Resource Manager Local Transaction was rolled back on the ManagedConnection instance.
 void localTransactionStarted(javax.resource.spi.ConnectionEvent event)
          Notifies that a Resource Manager Local Transaction was started on the ManagedConnection instance.
 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.
 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.
 void registerXAResource(java.util.Properties tmProp)
          Register an XAResource with JOTM for recovery
 void releaseResource(java.lang.Object rMc)
          Release the ManagedConnection object resource
 void returnXAResource(java.lang.String rmName, javax.transaction.xa.XAResource rmXares)
          Called from JOTM to free the XAResource and associated Managed Connection when recovery is complete
 void setCheckLevel(int level)
           
 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 setMaxPstmtPoolSize(int maxPstmtPoolSize)
           
 void setPrintWriter(java.io.PrintWriter pw)
          Setters method to initialize the ConnectionManager The printwriter where event are logged
 void setResourceAdapter(javax.resource.spi.ManagedConnectionFactory tmcf)
          Setters method to initialize the ConnectionManager The managedConnectionFactory instance of the resource which must be managed by this connectionManager
 void setResourceAdapter(javax.resource.spi.ManagedConnectionFactory tmcf, ConnectionManagerPoolParams cmpp)
          Setters method to initialize the ConnectionManager The managedConnectionFactory instance of the resource which must be maneged by this connectionManager
 void setResourceManagerEventListener(org.objectweb.transaction.jta.ResourceManagerEventListener rmel)
          Setters method to initialize the ConnectionManager The logger instance where events are logged
 void setTestStatement(java.lang.String stmt)
           
 void setTransactionManager(org.objectweb.transaction.jta.TransactionManager tm)
          Setters method to initialize the ConnectionManager The Transaction manager linked to this resource managed
 void setXAName(java.lang.String xanm)
          Set the XAName to use
 java.lang.String toString()
          Description of the Method
 void validateResource(java.util.Set res)
          If supported, call the ManagedConnectionFactory to validate the ManagedConnections
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

trace

protected static org.objectweb.util.monolog.api.Logger trace
Main logger


poolTrace

protected static org.objectweb.util.monolog.api.Logger poolTrace
Pool infomation logger


rmel

protected org.objectweb.transaction.jta.ResourceManagerEventListener rmel
Used by the server to register connections when no transactionnal context exists


tm

protected org.objectweb.transaction.jta.TransactionManager tm
The transaction manager in server


mc2mci

protected java.util.Hashtable mc2mci
This hashtable allows to find the list of connection handle associated to a ManagedConnection


poolMCs

protected Pool poolMCs
The pool of ManagedConnections associated to a ManagedConnectionFactory There's one instance of pool by instance for one instance of this class (ConnectionManagerImpl). The synchronization of the methods of this are ensured through synchronized blocks on the poolMCs instance. Thus, the lock are shared between the two objects and that avoids deadlock issues when the poolMCs.getRessource() is waiting for a connection releasing (max nb of instances is reached in the pool).


usedMCs

protected java.util.Hashtable usedMCs
The list of used ManagedConnections key = transaction reference value = MCInfo


mcs

protected java.util.Vector mcs
The list of managedConnection used without transaction


synchros

protected java.util.Vector synchros
The list of Synchronisation instance managed in this ConnectionManager


RESOURCE_BUNDLE_NAME

public static final java.lang.String RESOURCE_BUNDLE_NAME
This constant is used in the by the init method

See Also:
Constant Field Values

LOGGER

public static final java.lang.String LOGGER
This constant is used in the by the init method

See Also:
Constant Field Values

POOL_LOGGER

public static final java.lang.String POOL_LOGGER
This constant is used in the by the init method

See Also:
Constant Field Values

LOGGER_FACTORY

public static final java.lang.String LOGGER_FACTORY
This constant is used in the by the init method

See Also:
Constant Field Values

TRANSACTION_MANAGER

public static final java.lang.String TRANSACTION_MANAGER
This constant is used in the by the init method

See Also:
Constant Field Values

RESOURCE_MANAGER_EVENT_LISTENER

public static final java.lang.String RESOURCE_MANAGER_EVENT_LISTENER
This constant is used in the by the init method

See Also:
Constant Field Values

RESOURCE_ADAPTER

public static final java.lang.String RESOURCE_ADAPTER
This constant is used in the by the init method

See Also:
Constant Field Values

PRINT_WRITER

public static final java.lang.String PRINT_WRITER
This constant is used in the by the init method

See Also:
Constant Field Values

NO_TRANS_SUPPORT

public static final java.lang.String NO_TRANS_SUPPORT
Rar doesn't support transactions

See Also:
Constant Field Values

LOCAL_TRANS_SUPPORT

public static final java.lang.String LOCAL_TRANS_SUPPORT
Rar supports local transactions

See Also:
Constant Field Values

XA_TRANS_SUPPORT

public static final java.lang.String XA_TRANS_SUPPORT
Rar supports XA transactions

See Also:
Constant Field Values

PSWRAP_1

public static final int PSWRAP_1
Constants to determine which PreparedStatement types to call

See Also:
Constant Field Values

PSWRAP_2

public static final int PSWRAP_2
See Also:
Constant Field Values

PSWRAP_3

public static final int PSWRAP_3
See Also:
Constant Field Values

PSWRAP_4

public static final int PSWRAP_4
See Also:
Constant Field Values

PSWRAP_5

public static final int PSWRAP_5
See Also:
Constant Field Values

JDBC_NO_TEST

public static final int JDBC_NO_TEST
Constants for use with JDBC connection level

See Also:
Constant Field Values

JDBC_CHECK_CONNECTION

public static final int JDBC_CHECK_CONNECTION
See Also:
Constant Field Values

JDBC_SEND_STATEMENT

public static final int JDBC_SEND_STATEMENT
See Also:
Constant Field Values

JDBC_KEEP_ALIVE

public static final int JDBC_KEEP_ALIVE
See Also:
Constant Field Values
Constructor Detail

ConnectionManagerImpl

public ConnectionManagerImpl(java.lang.String transSupport)
ConnectionManagerImpl constructor

Parameters:
transSupport - String defining level of support needed
Method Detail

setLogger

public void setLogger(org.objectweb.util.monolog.api.Logger l)
Setters method to initialize the ConnectionManager The logger instance where events are logged

Parameters:
l - The new Logger value

setLoggerFactory

public void setLoggerFactory(org.objectweb.util.monolog.api.LoggerFactory lf)
Setters method to initialize the ConnectionManager A logger factory to obtain a logger

Parameters:
lf - The new LoggerFactory value

setPrintWriter

public void setPrintWriter(java.io.PrintWriter pw)
Setters method to initialize the ConnectionManager The printwriter where event are logged

Parameters:
pw - The new PrintWriter value

setResourceManagerEventListener

public void setResourceManagerEventListener(org.objectweb.transaction.jta.ResourceManagerEventListener rmel)
Setters method to initialize the ConnectionManager The logger instance where events are logged

Parameters:
rmel - The new ResourceManagerEventListener value

setTransactionManager

public void setTransactionManager(org.objectweb.transaction.jta.TransactionManager tm)
Setters method to initialize the ConnectionManager The Transaction manager linked to this resource managed

Parameters:
tm - TransactionManager value

setResourceAdapter

public void setResourceAdapter(javax.resource.spi.ManagedConnectionFactory tmcf)
                        throws java.lang.Exception
Setters method to initialize the ConnectionManager The managedConnectionFactory instance of the resource which must be managed by this connectionManager

Parameters:
tmcf - The new ResourceAdapter value
Throws:
java.lang.Exception - Description of Exception

setResourceAdapter

public void setResourceAdapter(javax.resource.spi.ManagedConnectionFactory tmcf,
                               ConnectionManagerPoolParams cmpp)
                        throws java.lang.Exception
Setters method to initialize the ConnectionManager The managedConnectionFactory instance of the resource which must be maneged by this connectionManager

Parameters:
tmcf - The ManagedConnectionFactory object
cmpp - The pool parameters
Throws:
java.lang.Exception - Description of Exception

init

public void init(javax.naming.Context ctx)
          throws java.lang.Exception
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. RESOURCE_ADAPTER: The managedConnectionFactory instance of the resource which must be maneged by this connectionManager

Parameters:
ctx - Description of Parameter
Throws:
java.lang.Exception - Description of Exception

cleanResourceAdapter

public void cleanResourceAdapter()
                          throws javax.resource.ResourceException
Description of the Method

Throws:
javax.resource.ResourceException - Description of Exception

allocateConnection

public java.lang.Object allocateConnection(javax.resource.spi.ManagedConnectionFactory pMcf,
                                           javax.resource.spi.ConnectionRequestInfo cxRequestInfo)
                                    throws javax.resource.ResourceException
The method allocateConnection gets called by the resource adapter's connection factory instance.

Specified by:
allocateConnection in interface javax.resource.spi.ConnectionManager
Throws:
javax.resource.ResourceException
See Also:
javax.resource.cci.ConnectionManager

matchResource

public 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.

Specified by:
matchResource in interface PoolMatchFactory
Parameters:
res - The Object to test its matching with some "properties" specified by hints.
hints - The "properties" that the Object specified by pr should match.
Returns:
true if the pr Object matches the hints "properties".
See Also:
org.objectweb.util.pool.api.PoolMatchFactory

matchResource

public java.lang.Object matchResource(java.util.Set res,
                                      java.lang.Object hints)
                               throws java.lang.Exception
All method of the pool match to the right type of ManagedConnection because there is one pool by ManagedConnectionFactory.

Specified by:
matchResource in interface PoolMatchFactory
Parameters:
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.
Returns:
Object that matches the hints "properties". or null if no match.
Throws:
java.lang.Exception - Description of Exception
See Also:
org.objectweb.util.pool.api.PoolMatchFactory

createResource

public java.lang.Object createResource(java.lang.Object hints)
                                throws java.lang.Exception
Call the ManagedConnectionFactory in order to create a new instance. of ManagedConnection. The Object is a ManagedConnection instance. The hints is a local structure: ResourceSpec

Specified by:
createResource in interface PoolMatchFactory
Parameters:
hints - The "properties" that the created Object should conform to.
Returns:
The created Object.
Throws:
java.lang.Exception - if an error occurs
See Also:
org.objectweb.util.pool.api.PoolMatchFactory

validateResource

public void validateResource(java.util.Set res)
                      throws java.lang.Exception
If supported, call the ManagedConnectionFactory to validate the ManagedConnections

Specified by:
validateResource in interface PoolMatchFactory
Parameters:
res - A set of Objects to test if matching with some "properties" specified by hints.
Throws:
java.lang.Exception - Description of Exception
See Also:
org.objectweb.util.pool.api.PoolMatchFactory

getPStatement

public java.sql.PreparedStatement getPStatement(MCInfo mcinfo,
                                                java.lang.Object conn,
                                                java.lang.String user,
                                                java.lang.String sql)
                                         throws java.sql.SQLException
IMPLEMENTATION OF INTERFACE SQLManager

Specified by:
getPStatement in interface SQLManager
Parameters:
mcinfo - MCInfo
conn - Object connection
user - String
sql - String
Returns:
PreparedStatment
Throws:
java.sql.SQLException - if an Exception occurs

getPStatement

public java.sql.PreparedStatement getPStatement(MCInfo mcinfo,
                                                java.lang.Object conn,
                                                java.lang.String user,
                                                java.lang.String sql,
                                                int resultSetType,
                                                int resultSetConcurrency)
                                         throws java.sql.SQLException
Description copied from interface: SQLManager
Get the specified PreparedStatement

Specified by:
getPStatement in interface SQLManager
Parameters:
mcinfo - MCInfo
conn - Object connection
user - String
sql - String
resultSetType - int
resultSetConcurrency - int
Returns:
PreparedStatment
Throws:
java.sql.SQLException - if an Exception occurs

getPStatement

public java.sql.PreparedStatement getPStatement(MCInfo mcinfo,
                                                java.lang.Object conn,
                                                java.lang.String user,
                                                java.lang.String sql,
                                                int resultSetType,
                                                int resultSetConcurrency,
                                                int resultSetHoldability)
                                         throws java.sql.SQLException
Description copied from interface: SQLManager
Get the specified PreparedStatement

Specified by:
getPStatement in interface SQLManager
Parameters:
mcinfo - MCInfo
conn - Object connection
user - String
sql - String
resultSetType - int
resultSetConcurrency - int
resultSetHoldability - int
Returns:
PreparedStatment
Throws:
java.sql.SQLException - if an Exception occurs

getPStatement

public java.sql.PreparedStatement getPStatement(MCInfo mcinfo,
                                                java.lang.Object conn,
                                                java.lang.String user,
                                                java.lang.String sql,
                                                int autoGeneratedKeys)
                                         throws java.sql.SQLException
Description copied from interface: SQLManager
Get the specified PreparedStatement

Specified by:
getPStatement in interface SQLManager
Parameters:
mcinfo - MCInfo
conn - Object connection
user - String
sql - String
autoGeneratedKeys - key
Returns:
PreparedStatment
Throws:
java.sql.SQLException - if an Exception occurs

getPStatement

public java.sql.PreparedStatement getPStatement(MCInfo mcinfo,
                                                java.lang.Object conn,
                                                java.lang.String user,
                                                java.lang.String sql,
                                                int[] columnIndexes)
                                         throws java.sql.SQLException
Description copied from interface: SQLManager
Get the specified PreparedStatement

Specified by:
getPStatement in interface SQLManager
Parameters:
mcinfo - MCInfo
conn - Object connection
user - String
sql - String
columnIndexes - int []
Returns:
PreparedStatment
Throws:
java.sql.SQLException - if an Exception occurs

getPStatement

public java.sql.PreparedStatement getPStatement(MCInfo mcinfo,
                                                java.lang.Object conn,
                                                java.lang.String user,
                                                java.lang.String sql,
                                                java.lang.String[] columnNames)
                                         throws java.sql.SQLException
Description copied from interface: SQLManager
Get the specified PreparedStatement

Specified by:
getPStatement in interface SQLManager
Parameters:
mcinfo - MCInfo
conn - Object connection
user - String
sql - String
columnNames - String []
Returns:
PreparedStatment
Throws:
java.sql.SQLException - if an Exception occurs

releaseResource

public void releaseResource(java.lang.Object rMc)
                     throws java.lang.Exception
Release the ManagedConnection object resource

Specified by:
releaseResource in interface PoolMatchFactory
Parameters:
rMc - Object to release
Throws:
java.lang.Exception - if an Exception occurs

destroyPStmts

public void destroyPStmts(MCInfo mcinfo)
                   throws java.lang.Exception
Destroying of the PreparedStatement objects of the Pool

Parameters:
mcinfo - ManagedConnection information
Throws:
java.lang.Exception - Exception

connectionClosed

public 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. The application server uses this connection close event to make a decision on whether or not to put the ManagedConnection instance back into the connection pool.

Specified by:
connectionClosed in interface javax.resource.spi.ConnectionEventListener
See Also:
ConnectionEventListener

connectionErrorOccurred

public void connectionErrorOccurred(javax.resource.spi.ConnectionEvent event)
The connectionErrorOccurred method indicates that the associated ManagedConnection instance is now invalid and unusable. The application server handles the connection error event notification by initiating application server-specific cleanup (for example, removing ManagedConnection instance from the connection pool) and then calling ManagedConnection.destroy method to destroy the physical connection..

Specified by:
connectionErrorOccurred in interface javax.resource.spi.ConnectionEventListener
See Also:
ConnectionEventListener

localTransactionCommitted

public void localTransactionCommitted(javax.resource.spi.ConnectionEvent event)
Notifies that a Resource Manager Local Transaction was committed on the ManagedConnection instance.

Specified by:
localTransactionCommitted in interface javax.resource.spi.ConnectionEventListener
See Also:
ConnectionEventListener

localTransactionRolledback

public void localTransactionRolledback(javax.resource.spi.ConnectionEvent event)
Notifies that a Resource Manager Local Transaction was rolled back on the ManagedConnection instance.

Specified by:
localTransactionRolledback in interface javax.resource.spi.ConnectionEventListener
See Also:
ConnectionEventListener

localTransactionStarted

public void localTransactionStarted(javax.resource.spi.ConnectionEvent event)
Notifies that a Resource Manager Local Transaction was started on the ManagedConnection instance.

Specified by:
localTransactionStarted in interface javax.resource.spi.ConnectionEventListener
See Also:
ConnectionEventListener

toString

public java.lang.String toString()
Description of the Method

Returns:
Description of the Returned Value

getState

protected java.lang.String getState(java.lang.String prefix)
Gets the State attribute of the ConnectionManagerImpl object

Parameters:
prefix - Description of Parameter
Returns:
The State value

setXAName

public void setXAName(java.lang.String xanm)
Set the XAName to use

Parameters:
xanm - String of XA Name

getXAName

public java.lang.String getXAName()
Get the XAName to use

Returns:
String of XA Name

registerXAResource

public void registerXAResource(java.util.Properties tmProp)
Register an XAResource with JOTM for recovery


returnXAResource

public void returnXAResource(java.lang.String rmName,
                             javax.transaction.xa.XAResource rmXares)
Called from JOTM to free the XAResource and associated Managed Connection when recovery is complete

Specified by:
returnXAResource in interface org.objectweb.jotm.TransactionResourceManager
Parameters:
rmName - The Resource Manager to be unregistered.
rmXares - XAResource to be returned

getPool

public Pool getPool()

getCheckLevel

public int getCheckLevel()

setCheckLevel

public void setCheckLevel(int level)

getTestStatement

public java.lang.String getTestStatement()

setTestStatement

public void setTestStatement(java.lang.String stmt)

getCurrentInTx

public int getCurrentInTx()

getMaxPstmtPoolSize

public int getMaxPstmtPoolSize()
Specified by:
getMaxPstmtPoolSize in interface SQLManager
Returns:
Returns the maxPstmtPoolSize.

setMaxPstmtPoolSize

public void setMaxPstmtPoolSize(int maxPstmtPoolSize)
Parameters:
maxPstmtPoolSize - The maxPstmtPoolSize to set.