|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opennms.netmgt.config.C3P0ConnectionFactory
public class C3P0ConnectionFactory
C3P0ConnectionFactory class.
| Constructor Summary | |
|---|---|
protected |
C3P0ConnectionFactory(InputStream stream,
String dsName)
Constructor for C3P0ConnectionFactory. |
protected |
C3P0ConnectionFactory(Reader rdr,
String dsName)
Constructor for C3P0ConnectionFactory. |
protected |
C3P0ConnectionFactory(String configFile,
String dsName)
Constructor for C3P0ConnectionFactory. |
| Method Summary | ||
|---|---|---|
void |
close()
close |
|
Connection |
getConnection()
getConnection |
|
Connection |
getConnection(String username,
String password)
|
|
DataSource |
getDataSource()
getDataSource |
|
int |
getLoginTimeout()
getLoginTimeout |
|
PrintWriter |
getLogWriter()
getLogWriter |
|
com.mchange.v2.c3p0.ComboPooledDataSource |
getPool()
getPool |
|
String |
getUrl()
getUrl |
|
String |
getUser()
getUser |
|
boolean |
isWrapperFor(Class<?> iface)
isWrapperFor |
|
static JdbcDataSource |
marshalDataSourceFromConfig(InputStream stream,
String dsName)
marshalDataSourceFromConfig |
|
static JdbcDataSource |
marshalDataSourceFromConfig(Reader rdr,
String dsName)
marshalDataSourceFromConfig |
|
void |
setLoginTimeout(int seconds)
|
|
void |
setLogWriter(PrintWriter out)
|
|
void |
setPool(com.mchange.v2.c3p0.ComboPooledDataSource pool)
setPool |
|
void |
setUrl(String url)
setUrl |
|
void |
setUser(String user)
setUser |
|
|
unwrap(Class<T> iface)
unwrap |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected C3P0ConnectionFactory(InputStream stream,
String dsName)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
PropertyVetoException,
SQLException
Constructor for C3P0ConnectionFactory.
stream - a InputStream object.dsName - a String object.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
PropertyVetoException - if any.
SQLException - if any.
protected C3P0ConnectionFactory(Reader rdr,
String dsName)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
PropertyVetoException,
SQLException
Constructor for C3P0ConnectionFactory.
rdr - a Reader object.dsName - a String object.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
PropertyVetoException - if any.
SQLException - if any.
protected C3P0ConnectionFactory(String configFile,
String dsName)
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
PropertyVetoException,
SQLException
Constructor for C3P0ConnectionFactory.
configFile - a String object.dsName - a String object.
IOException - if any.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
PropertyVetoException - if any.
SQLException - if any.| Method Detail |
|---|
public static JdbcDataSource marshalDataSourceFromConfig(InputStream stream,
String dsName)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
marshalDataSourceFromConfig
stream - a InputStream object.dsName - a String object.
JdbcDataSource object.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
public static JdbcDataSource marshalDataSourceFromConfig(Reader rdr,
String dsName)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
PropertyVetoException,
SQLException
marshalDataSourceFromConfig
rdr - a Reader object.dsName - a String object.
JdbcDataSource object.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
PropertyVetoException - if any.
SQLException - if any.
public Connection getConnection()
throws SQLException
getConnection
getConnection in interface DataSourceConnection object.
SQLException - if any.public com.mchange.v2.c3p0.ComboPooledDataSource getPool()
getPool
ComboPooledDataSource object.public void setPool(com.mchange.v2.c3p0.ComboPooledDataSource pool)
setPool
pool - a ComboPooledDataSource object.public String getUrl()
getUrl
String object.public void setUrl(String url)
setUrl
url - a String object.public String getUser()
getUser
String object.public void setUser(String user)
setUser
user - a String object.public DataSource getDataSource()
getDataSource
DataSource object.
public Connection getConnection(String username,
String password)
throws SQLException
getConnection in interface DataSourceSQLException
public PrintWriter getLogWriter()
throws SQLException
getLogWriter
getLogWriter in interface CommonDataSourcePrintWriter object.
SQLException - if any.
public void setLogWriter(PrintWriter out)
throws SQLException
setLogWriter in interface CommonDataSourceSQLException
public void setLoginTimeout(int seconds)
throws SQLException
setLoginTimeout in interface CommonDataSourceSQLException
public int getLoginTimeout()
throws SQLException
getLoginTimeout
getLoginTimeout in interface CommonDataSourceSQLException - if any.
public void close()
throws SQLException
close
close in interface ClosableDataSourceSQLException - if any.
public <T> T unwrap(Class<T> iface)
throws SQLException
unwrap
unwrap in interface WrapperT - a T object.iface - a Class object.
SQLException - if any.
public boolean isWrapperFor(Class<?> iface)
throws SQLException
isWrapperFor
isWrapperFor in interface Wrapperiface - a Class object.
SQLException - if any.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||