public class ConnectionResetter
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
protected static java.lang.String |
MUTATOR_PREFIX |
We use this to guess if we are changing a property that will need resetting
|
protected static boolean |
triggerResetException |
Modifier | Constructor | Description |
---|---|---|
protected |
ConnectionResetter(org.apache.commons.logging.Log log,
java.lang.String driverName) |
Pass in the log to use
|
Modifier and Type | Method | Description |
---|---|---|
protected void |
initialise(java.sql.Connection connection) |
This gets called every time we make a Connection.
|
protected boolean |
reset(java.sql.Connection connection,
java.lang.String id) |
Reset this connection to its default values.
|
protected static void |
setTriggerResetException(boolean triggerResetException) |
Called by a unit test.
|
protected static final java.lang.String MUTATOR_PREFIX
protected static boolean triggerResetException
isTriggerResetException()
protected ConnectionResetter(org.apache.commons.logging.Log log, java.lang.String driverName)
log
- debug information sent hereprotected void initialise(java.sql.Connection connection)
connection
- this will be used to get all the default valuesprotected boolean reset(java.sql.Connection connection, java.lang.String id)
connection
- to be resetid
- used in log messagesprotected static void setTriggerResetException(boolean triggerResetException)
triggerResetException
- true it we should trigger a pretend exception.isTriggerResetException()