|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.objectweb.jonas.dbm.ConnectionManager
JOnAS generic implementation of DataSource to manage an underlying JDBC-XA driver (XADataSource, XAConnection, XAResource, ...) This class acts as a factory for Connection objects. Its main goal is to manage a pool of XAConnection objects, to avoid closing the actual Connection on DBMS, and to deal with distributed transactions. This DataSource is registered in JNDI (=> implements Referenceable)
| Constructor Summary | |
ConnectionManager()
Constructor for Factory |
|
| Method Summary | |
java.lang.String |
_getDSName()
|
void |
_setDSName(java.lang.String s)
|
void |
closeAllConnection()
|
void |
connectionClosed(javax.sql.ConnectionEvent event)
Invoked when the application calls close() on its representation of the connection. |
void |
connectionErrorOccurred(javax.sql.ConnectionEvent event)
Invoked when a fatal connection error occurs, just before an SQLException is thrown to the application. |
java.lang.String |
getClassName()
|
java.sql.Connection |
getConnection()
Attempt to establish a database connection. |
java.sql.Connection |
getConnection(java.lang.String username,
java.lang.String password)
Attempt to establish a database connection. |
static ConnectionManager |
getConnectionManager(java.lang.String dsname)
get the ConnectionManager matching the DataSource name |
java.lang.Integer |
getCurrentNumberOfJDBCConnectionOpen()
MBean method: |
java.lang.String |
getDataSourceDescription()
MBean Method: |
java.lang.String |
getDataSourceFactory()
MBean method: |
java.lang.String |
getDatasourceName()
|
java.lang.String |
getDataSourceType()
Mbean Method: return the type of this data source |
java.lang.String |
getDataSourceXADataName()
MBean method: |
java.lang.String |
getDSName()
MBean method: |
java.lang.Integer |
getJDBCConnCheckLevel()
MBean method: |
java.lang.Integer |
getJDBCConnMaxAge()
MBean method: |
java.lang.Integer |
getJDBCDeadLockPool()
MBean method: |
java.lang.Integer |
getJDBCLoopWaitPool()
MBean method: |
java.lang.Integer |
getJDBCMaxConnPool()
MBean method: |
java.lang.Integer |
getJDBCMinConnPool()
MBean method: |
java.lang.Integer |
getJDBCSleepTimeOut()
MBean method: |
java.lang.String |
getJDBCTestStatement()
MBean method: |
int |
getLoginTimeout()
Gets the maximum time in seconds that this data source can wait while attempting to connect to a database. |
java.io.PrintWriter |
getLogWriter()
Get the log writer for this data source. |
java.lang.String |
getMapperName()
|
java.lang.String |
getPassword()
|
javax.naming.Reference |
getReference()
Retrieves the Reference of this object. |
static org.objectweb.transaction.api.ResourceManagerEventListener |
getResourceManagerEventListener()
|
java.lang.String |
getTransactionIsolation()
|
java.lang.String |
getUrl()
|
java.lang.String |
getUserName()
|
void |
poolConfigure(java.lang.String connchecklevel,
java.lang.String connmaxage,
java.lang.String connteststmt)
Configure the Connection pool. |
void |
setClassName(java.lang.String s)
|
void |
setDataSourceDescription(java.lang.String dsDesc)
Management Method: |
void |
setDatasourceName(java.lang.String s)
|
void |
setDataSourceXADataName(java.lang.String xaName)
Management method: |
void |
setDSName(java.lang.String s)
|
void |
setJDBCConnCheckLevel(java.lang.Integer level)
MBean method: |
void |
setJDBCConnMaxAge(java.lang.Integer age)
MBean method: |
void |
setJDBCDeadLockPool(java.lang.Integer size)
MBean method: do nothing |
void |
setJDBCLoopWaitPool(java.lang.Integer size)
MBean method: do nothing |
void |
setJDBCMaxConnPool(java.lang.Integer max)
MBean method: do nothing |
void |
setJDBCMinConnPool(java.lang.Integer min)
MBean method: do nothing |
void |
setJDBCSleepTimeOut(java.lang.Integer timeOut)
MBean method: do nothing |
void |
setJDBCTestStatement(java.lang.String test)
MBean method: |
void |
setLoginTimeout(int seconds)
Sets the maximum time in seconds that this data source will wait while attempting to connect to a database. |
void |
setLogWriter(java.io.PrintWriter out)
Set the log writer for this data source. |
void |
setMapperName(java.lang.String mappername)
|
void |
setPassword(java.lang.String s)
|
void |
setRMEListener(org.objectweb.transaction.api.ResourceManagerEventListener rmel)
|
void |
setTransactionIsolation(java.lang.String level)
|
void |
setUrl(java.lang.String s)
|
void |
setUserName(java.lang.String s)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ConnectionManager()
| Method Detail |
public void setRMEListener(org.objectweb.transaction.api.ResourceManagerEventListener rmel)
public java.lang.String _getDSName()
public void _setDSName(java.lang.String s)
s - jndi name for the datasourcepublic java.lang.String getUrl()
getUrl in interface JmxDataSourceMBeanorg.objectweb.jonas.dbm.JmxDataSourceMBeanpublic void setUrl(java.lang.String s)
public java.lang.String getClassName()
getClassName in interface JmxDataSourceMBeanorg.objectweb.jonas.dbm.JmxDataSourceMBeanpublic void setClassName(java.lang.String s)
public java.lang.String getUserName()
getUserName in interface JmxDataSourceMBeanorg.objectweb.jonas.dbm.JmxDataSourceMBeanpublic void setUserName(java.lang.String s)
public java.lang.String getPassword()
getPassword in interface JmxDataSourceMBeanorg.objectweb.jonas.dbm.JmxDataSourceMBeanpublic void setPassword(java.lang.String s)
public void setTransactionIsolation(java.lang.String level)
public java.lang.String getTransactionIsolation()
public void setMapperName(java.lang.String mappername)
public java.lang.String getMapperName()
public void poolConfigure(java.lang.String connchecklevel,
java.lang.String connmaxage,
java.lang.String connteststmt)
public java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in interface javax.sql.DataSourcejava.sql.SQLException - - if a database-access error occurs.
public java.sql.Connection getConnection(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
getConnection in interface javax.sql.DataSourceuser - - the database user on whose behalf the Connection is being madepassword - - the user's passwordjava.sql.SQLException - - if a database-access error occurs.
public java.io.PrintWriter getLogWriter()
throws java.sql.SQLException
getLogWriter in interface javax.sql.DataSourcejava.sql.SQLException - - if a database-access error occurs.
public void setLogWriter(java.io.PrintWriter out)
throws java.sql.SQLException
setLogWriter in interface javax.sql.DataSourceout - - the new log writer; to disable, set to nulljava.sql.SQLException - - if a database-access error occurs.
public void setLoginTimeout(int seconds)
throws java.sql.SQLException
setLoginTimeout in interface javax.sql.DataSourceseconds - - the data source login time limitjava.sql.SQLException - - if a database access error occurs.
public int getLoginTimeout()
throws java.sql.SQLException
getLoginTimeout in interface javax.sql.DataSourcejava.sql.SQLException - - if a database access error occurs.public void connectionClosed(javax.sql.ConnectionEvent event)
connectionClosed in interface javax.sql.ConnectionEventListenerevent - - an event object describing the source of the eventpublic void connectionErrorOccurred(javax.sql.ConnectionEvent event)
connectionErrorOccurred in interface javax.sql.ConnectionEventListenerevent - - an event object describing the source of the event
public javax.naming.Reference getReference()
throws javax.naming.NamingException
getReference in interface javax.naming.Referenceablejavax.naming.NamingException - If a naming exception was encountered while
retrieving the reference.public static ConnectionManager getConnectionManager(java.lang.String dsname)
public void closeAllConnection()
public static org.objectweb.transaction.api.ResourceManagerEventListener getResourceManagerEventListener()
public java.lang.Integer getCurrentNumberOfJDBCConnectionOpen()
getCurrentNumberOfJDBCConnectionOpen in interface JmxDataSourceMBeanpublic java.lang.String getDSName()
getDSName in interface JmxDataSourceMBeanpublic void setDSName(java.lang.String s)
s - Jndi name of the datasourcepublic java.lang.String getDatasourceName()
getDatasourceName in interface JmxDataSourceMBeanpublic void setDatasourceName(java.lang.String s)
s - datasource namepublic java.lang.String getDataSourceFactory()
getDataSourceFactory in interface JmxDataSourceMBeanpublic void setDataSourceXADataName(java.lang.String xaName)
the - DataSourceXANamepublic java.lang.String getDataSourceXADataName()
getDataSourceXADataName in interface JmxDataSourceMBeanpublic java.lang.Integer getJDBCConnCheckLevel()
getJDBCConnCheckLevel in interface JmxDataSourceMBeanpublic void setJDBCConnCheckLevel(java.lang.Integer level)
setJDBCConnCheckLevel in interface JmxDataSourceMBeanconnection - levelpublic java.lang.Integer getJDBCConnMaxAge()
getJDBCConnMaxAge in interface JmxDataSourceMBeanpublic void setJDBCConnMaxAge(java.lang.Integer age)
setJDBCConnMaxAge in interface JmxDataSourceMBeanconnection - max agepublic java.lang.String getJDBCTestStatement()
getJDBCTestStatement in interface JmxDataSourceMBeanpublic void setJDBCTestStatement(java.lang.String test)
setJDBCTestStatement in interface JmxDataSourceMBeantest - statementpublic java.lang.String getDataSourceType()
getDataSourceType in interface JmxDataSourceMBeanpublic java.lang.String getDataSourceDescription()
getDataSourceDescription in interface JmxDataSourceMBeanpublic void setDataSourceDescription(java.lang.String dsDesc)
the - desrciption of this datasourcepublic java.lang.Integer getJDBCMinConnPool()
getJDBCMinConnPool in interface JmxDataSourceMBeanpublic void setJDBCMinConnPool(java.lang.Integer min)
setJDBCMinConnPool in interface JmxDataSourceMBeanmin - public java.lang.Integer getJDBCMaxConnPool()
getJDBCMaxConnPool in interface JmxDataSourceMBeanpublic void setJDBCMaxConnPool(java.lang.Integer max)
setJDBCMaxConnPool in interface JmxDataSourceMBeanmax - public java.lang.Integer getJDBCSleepTimeOut()
getJDBCSleepTimeOut in interface JmxDataSourceMBeanpublic void setJDBCSleepTimeOut(java.lang.Integer timeOut)
setJDBCSleepTimeOut in interface JmxDataSourceMBeantimeout - public java.lang.Integer getJDBCDeadLockPool()
getJDBCDeadLockPool in interface JmxDataSourceMBeanpublic void setJDBCDeadLockPool(java.lang.Integer size)
setJDBCDeadLockPool in interface JmxDataSourceMBeansize - public java.lang.Integer getJDBCLoopWaitPool()
getJDBCLoopWaitPool in interface JmxDataSourceMBeanpublic void setJDBCLoopWaitPool(java.lang.Integer size)
setJDBCLoopWaitPool in interface JmxDataSourceMBeansize -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||