Module org.eclipse.persistence.jpa
Class DataSourceImpl
java.lang.Object
org.eclipse.persistence.internal.jpa.jdbc.DataSourceImpl
- All Implemented Interfaces:
Wrapper,CommonDataSource,DataSource
A stubbed out impl of DataSource that can be used for testing.
Does not support multiple threads or multiple usernames/passwords.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetConnection(String userName, String password) intgetName()internalGetConnection(String userName, String password) booleanbooleanisWrapperFor(Class<?> iface) voidsetLoginTimeout(int seconds) voidsetLogWriter(PrintWriter out) void<T> TMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilderMethods inherited from interface javax.sql.DataSource
createConnectionBuilder
-
Constructor Details
-
DataSourceImpl
-
-
Method Details
-
getName
-
setTransactionManager
-
internalGetConnection
- Throws:
SQLException
-
internalGetConnection
- Throws:
SQLException
-
isTransactional
public boolean isTransactional() -
getConnection
- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLException
-
getConnection
- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLException
-
getLogWriter
- Specified by:
getLogWriterin interfaceCommonDataSource- Specified by:
getLogWriterin interfaceDataSource- Throws:
SQLException
-
setLogWriter
- Specified by:
setLogWriterin interfaceCommonDataSource- Specified by:
setLogWriterin interfaceDataSource- Throws:
SQLException
-
getLoginTimeout
- Specified by:
getLoginTimeoutin interfaceCommonDataSource- Specified by:
getLoginTimeoutin interfaceDataSource- Throws:
SQLException
-
setLoginTimeout
- Specified by:
setLoginTimeoutin interfaceCommonDataSource- Specified by:
setLoginTimeoutin interfaceDataSource- Throws:
SQLException
-
unwrap
- Specified by:
unwrapin interfaceWrapper- Throws:
SQLException
-
isWrapperFor
- Specified by:
isWrapperForin interfaceWrapper- Throws:
SQLException
-
getParentLogger
- Specified by:
getParentLoggerin interfaceCommonDataSource
-