|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opennms.netmgt.config.BaseConnectionFactory
org.opennms.netmgt.config.C3P0ConnectionFactory
public class C3P0ConnectionFactory
C3P0ConnectionFactory class.
| Constructor Summary | |
|---|---|
C3P0ConnectionFactory(InputStream stream,
String dsName)
|
|
C3P0ConnectionFactory(String configFile,
String dsName)
|
|
| Method Summary | |
|---|---|
void |
close()
close |
Connection |
getConnection()
getConnection |
Connection |
getConnection(String username,
String password)
|
DataSource |
getDataSource()
getDataSource |
int |
getLoginTimeout()
getLoginTimeout |
PrintWriter |
getLogWriter()
getLogWriter |
String |
getUrl()
getUrl |
String |
getUser()
getUser |
protected void |
initializePool(JdbcDataSource dataSource)
|
void |
setIdleTimeout(int idleTimeout)
How long, in seconds, an idle connection is kept in the pool before it is removed. |
void |
setLoginTimeout(int seconds)
How long, in seconds, to attempt to make a connection to the database. |
void |
setLogWriter(PrintWriter out)
|
void |
setMaxPool(int maxPool)
The maximum number of pooled connections to retain. |
void |
setMaxSize(int maxSize)
The maximum number of connections that can be created. |
void |
setMinPool(int minPool)
The minimum number of pooled connections to retain. |
void |
setUrl(String url)
setUrl |
void |
setUser(String user)
setUser |
| Methods inherited from class org.opennms.netmgt.config.BaseConnectionFactory |
|---|
isWrapperFor, unwrap |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public C3P0ConnectionFactory(InputStream stream,
String dsName)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
PropertyVetoException,
SQLException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
PropertyVetoException
SQLException
public C3P0ConnectionFactory(String configFile,
String dsName)
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
PropertyVetoException,
SQLException
IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
PropertyVetoException
SQLException| Method Detail |
|---|
protected void initializePool(JdbcDataSource dataSource)
throws SQLException
initializePool in class BaseConnectionFactorySQLException
public Connection getConnection()
throws SQLException
BaseConnectionFactorygetConnection
getConnection in interface DataSourcegetConnection in class BaseConnectionFactoryConnection object.
SQLException - if any.public String getUrl()
BaseConnectionFactorygetUrl
getUrl in class BaseConnectionFactoryString object.public void setUrl(String url)
BaseConnectionFactorysetUrl
setUrl in class BaseConnectionFactoryurl - a String object.public String getUser()
BaseConnectionFactorygetUser
getUser in class BaseConnectionFactoryString object.public void setUser(String user)
BaseConnectionFactorysetUser
setUser in class BaseConnectionFactoryuser - a String object.public DataSource getDataSource()
BaseConnectionFactorygetDataSource
getDataSource in class BaseConnectionFactoryDataSource object.
public Connection getConnection(String username,
String password)
throws SQLException
BaseConnectionFactory
getConnection in interface DataSourcegetConnection in class BaseConnectionFactorySQLException
public PrintWriter getLogWriter()
throws SQLException
BaseConnectionFactorygetLogWriter
getLogWriter in interface CommonDataSourcegetLogWriter in class BaseConnectionFactoryPrintWriter object.
SQLException - if any.
public void setLogWriter(PrintWriter out)
throws SQLException
BaseConnectionFactory
setLogWriter in interface CommonDataSourcesetLogWriter in class BaseConnectionFactorySQLException
public void setLoginTimeout(int seconds)
throws SQLException
BaseConnectionFactory
setLoginTimeout in interface CommonDataSourcesetLoginTimeout in interface ClosableDataSourcesetLoginTimeout in class BaseConnectionFactorySQLException
public int getLoginTimeout()
throws SQLException
BaseConnectionFactorygetLoginTimeout
getLoginTimeout in interface CommonDataSourcegetLoginTimeout in class BaseConnectionFactorySQLException - if any.
public void close()
throws SQLException
BaseConnectionFactoryclose
close in interface ClosableDataSourceclose in class BaseConnectionFactorySQLException - if any.public void setIdleTimeout(int idleTimeout)
ClosableDataSource
public void setMinPool(int minPool)
ClosableDataSource
public void setMaxPool(int maxPool)
ClosableDataSource
public void setMaxSize(int maxSize)
ClosableDataSource
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||