Package org.apache.openjpa.jdbc.schema
Class SimpleDriverDataSource
java.lang.Object
org.apache.openjpa.jdbc.schema.SimpleDriverDataSource
- All Implemented Interfaces:
Wrapper
,CommonDataSource
,DataSource
,DriverDataSource
- Direct Known Subclasses:
DBCPDriverDataSource
Non-pooling driver data source.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionProvide any built-in decorators; may be null.Classloader for loading driver class, etc.getConnection
(String username, String password) getConnection
(Properties props) Driver class name.Configuration of datasource properties.protected String
Configuration of connection.JDBC URL.JDBC user name.int
protected Connection
getSimpleConnection
(Properties props) protected Driver
void
initDBDictionary
(DBDictionary dict) Initialize self and dictionary once available.boolean
isWrapperFor
(Class<?> iface) void
setClassLoader
(ClassLoader classLoader) JDBC password.void
setConnectionDriverName
(String connectionDriverName) Driver class name.void
Configuration of datasource properties.void
setConnectionPassword
(String connectionPassword) JDBC password.void
Configuration of connection.void
setConnectionURL
(String connectionURL) JDBC URL.void
setConnectionUserName
(String connectionUserName) JDBC user name.void
setLoginTimeout
(int seconds) void
setLogWriter
(PrintWriter out) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilder
Methods inherited from interface javax.sql.DataSource
createConnectionBuilder
-
Field Details
-
_loc
-
_eloc
-
-
Constructor Details
-
SimpleDriverDataSource
public SimpleDriverDataSource()
-
-
Method Details
-
getConnection
- Specified by:
getConnection
in interfaceDataSource
- Throws:
SQLException
-
getConnection
- Specified by:
getConnection
in interfaceDataSource
- Throws:
SQLException
-
getConnection
- Throws:
SQLException
-
getSimpleConnection
- Throws:
SQLException
-
getLoginTimeout
public int getLoginTimeout()- Specified by:
getLoginTimeout
in interfaceCommonDataSource
- Specified by:
getLoginTimeout
in interfaceDataSource
-
setLoginTimeout
public void setLoginTimeout(int seconds) - Specified by:
setLoginTimeout
in interfaceCommonDataSource
- Specified by:
setLoginTimeout
in interfaceDataSource
-
getLogWriter
- Specified by:
getLogWriter
in interfaceCommonDataSource
- Specified by:
getLogWriter
in interfaceDataSource
-
setLogWriter
- Specified by:
setLogWriter
in interfaceCommonDataSource
- Specified by:
setLogWriter
in interfaceDataSource
-
initDBDictionary
Description copied from interface:DriverDataSource
Initialize self and dictionary once available.- Specified by:
initDBDictionary
in interfaceDriverDataSource
-
setConnectionURL
Description copied from interface:DriverDataSource
JDBC URL.- Specified by:
setConnectionURL
in interfaceDriverDataSource
-
getConnectionURL
Description copied from interface:DriverDataSource
JDBC URL.- Specified by:
getConnectionURL
in interfaceDriverDataSource
-
setConnectionUserName
Description copied from interface:DriverDataSource
JDBC user name.- Specified by:
setConnectionUserName
in interfaceDriverDataSource
-
getConnectionUserName
Description copied from interface:DriverDataSource
JDBC user name.- Specified by:
getConnectionUserName
in interfaceDriverDataSource
-
setConnectionPassword
Description copied from interface:DriverDataSource
JDBC password.- Specified by:
setConnectionPassword
in interfaceDriverDataSource
-
getConnectionPassword
-
setConnectionProperties
Description copied from interface:DriverDataSource
Configuration of connection.- Specified by:
setConnectionProperties
in interfaceDriverDataSource
-
getConnectionProperties
Description copied from interface:DriverDataSource
Configuration of connection.- Specified by:
getConnectionProperties
in interfaceDriverDataSource
-
setConnectionFactoryProperties
Description copied from interface:DriverDataSource
Configuration of datasource properties.- Specified by:
setConnectionFactoryProperties
in interfaceDriverDataSource
-
getConnectionFactoryProperties
Description copied from interface:DriverDataSource
Configuration of datasource properties.- Specified by:
getConnectionFactoryProperties
in interfaceDriverDataSource
-
createConnectionDecorators
Description copied from interface:DriverDataSource
Provide any built-in decorators; may be null.- Specified by:
createConnectionDecorators
in interfaceDriverDataSource
-
setClassLoader
Description copied from interface:DriverDataSource
JDBC password.- Specified by:
setClassLoader
in interfaceDriverDataSource
-
getClassLoader
Description copied from interface:DriverDataSource
Classloader for loading driver class, etc.- Specified by:
getClassLoader
in interfaceDriverDataSource
-
setConnectionDriverName
Description copied from interface:DriverDataSource
Driver class name.- Specified by:
setConnectionDriverName
in interfaceDriverDataSource
-
getConnectionDriverName
Description copied from interface:DriverDataSource
Driver class name.- Specified by:
getConnectionDriverName
in interfaceDriverDataSource
-
getSimpleDriver
-
isWrapperFor
- Specified by:
isWrapperFor
in interfaceWrapper
-
unwrap
-
getParentLogger
- Specified by:
getParentLogger
in interfaceCommonDataSource
- Throws:
SQLFeatureNotSupportedException
-