public abstract class BaseConnectionFactory extends Object implements ClosableDataSource
Modifier | Constructor and Description |
---|---|
protected |
BaseConnectionFactory(JdbcDataSource ds) |
Modifier and Type | Method and Description |
---|---|
void |
close()
close
|
abstract DataSource |
getDataSource()
getDataSource
|
abstract int |
getLoginTimeout()
getLoginTimeout
|
abstract String |
getUrl()
getUrl
|
abstract String |
getUser()
getUser
|
protected abstract void |
initializePool(JdbcDataSource ds) |
boolean |
isWrapperFor(Class<?> iface)
isWrapperFor
|
abstract void |
setUrl(String url)
setUrl
|
abstract void |
setUser(String user)
setUser
|
<T> T |
unwrap(Class<T> iface)
unwrap
|
protected static void |
validateJdbcUrl(String url) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setIdleTimeout, setLoginTimeout, setMaxPool, setMaxSize, setMinPool
getConnection, getConnection
getLogWriter, getParentLogger, setLogWriter
protected BaseConnectionFactory(JdbcDataSource ds) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException, PropertyVetoException, SQLException
stream
- A configuration file as an InputStream
.dsName
- The data source's name.org.exolab.castor.xml.MarshalException
- if any.org.exolab.castor.xml.ValidationException
- if any.PropertyVetoException
- if any.SQLException
- if any.protected abstract void initializePool(JdbcDataSource ds) throws SQLException
SQLException
public abstract DataSource getDataSource()
getDataSource
DataSource
object.public abstract int getLoginTimeout() throws SQLException
getLoginTimeout
getLoginTimeout
in interface CommonDataSource
SQLException
- if any.public void close()
close
close
in interface Closeable
close
in interface AutoCloseable
close
in interface ClosableDataSource
public <T> T unwrap(Class<T> iface)
unwrap
public boolean isWrapperFor(Class<?> iface)
isWrapperFor
isWrapperFor
in interface Wrapper
iface
- a Class
object.protected static void validateJdbcUrl(String url)
Copyright © 2016. All rights reserved.