Class ClosingDataSource
java.lang.Object
org.flowable.common.engine.impl.test.ClosingDataSource
- All Implemented Interfaces:
Wrapper,CommonDataSource,DataSource,EngineLifecycleListener
A
DataSource implementation for test purposes that wraps another DataSource
and makes sure that the DataSource is closed when a Flowable engine gets closed.- Author:
- Joram Barrez
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetConnection(String username, String password) intbooleanisWrapperFor(Class<?> iface) voidonEngineBuilt(Engine engine) Called right after the engine has been built.voidonEngineClosed(Engine engine) Called right after the engine has been closed.voidsetLoginTimeout(int seconds) voidsetLogWriter(PrintWriter out) <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
-
Field Details
-
dataSource
-
-
Constructor Details
-
ClosingDataSource
-
-
Method Details
-
onEngineBuilt
Description copied from interface:EngineLifecycleListenerCalled right after the engine has been built.- Specified by:
onEngineBuiltin interfaceEngineLifecycleListener
-
onEngineClosed
Description copied from interface:EngineLifecycleListenerCalled right after the engine has been closed.- Specified by:
onEngineClosedin interfaceEngineLifecycleListener
-
getConnection
- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLException
-
getConnection
- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLException
-
unwrap
- Specified by:
unwrapin interfaceWrapper- Throws:
SQLException
-
isWrapperFor
- Specified by:
isWrapperForin interfaceWrapper- Throws:
SQLException
-
getLogWriter
- Specified by:
getLogWriterin interfaceCommonDataSource- Specified by:
getLogWriterin interfaceDataSource- Throws:
SQLException
-
setLogWriter
- Specified by:
setLogWriterin interfaceCommonDataSource- Specified by:
setLogWriterin interfaceDataSource- Throws:
SQLException
-
setLoginTimeout
- Specified by:
setLoginTimeoutin interfaceCommonDataSource- Specified by:
setLoginTimeoutin interfaceDataSource- Throws:
SQLException
-
getLoginTimeout
- Specified by:
getLoginTimeoutin interfaceCommonDataSource- Specified by:
getLoginTimeoutin interfaceDataSource- Throws:
SQLException
-
getParentLogger
- Specified by:
getParentLoggerin interfaceCommonDataSource- Throws:
SQLFeatureNotSupportedException
-