|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectSessionCommandsListener
public class SessionCommandsListener
A ConnectionLifecycleListener
that executes custom SQL commands on connection grab and
release. The SQL commands can contain environment variable references, where the enviroment
variable reference contains a name and an eventual default value.
Parsing rules are:
${
and }
is considered a enviroment variable
reference in the form ${name,defaultvalue}, the default value being optional
$
and }
can be used stand alone only escaped with \
(e.g. \$
and \}
)\
can be used stand alone only escaped with another \
\\
)
}
is reserved, should have been escaped)
Constructor Summary | |
---|---|
SessionCommandsListener(String sqlOnBorrow,
String sqlOnRelease)
|
Method Summary | |
---|---|
void |
onBorrow(JDBCDataStore store,
Connection cx)
Called when the collection is being borrowed from the connection pool |
void |
onCommit(JDBCDataStore store,
Connection cx)
Called when the connection comes to a commit |
void |
onRelease(JDBCDataStore store,
Connection cx)
Called when the collection is being released back to the connection pool |
void |
onRollback(JDBCDataStore store,
Connection cx)
Called when the connection comes to a rollback |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SessionCommandsListener(String sqlOnBorrow, String sqlOnRelease)
Method Detail |
---|
public void onBorrow(JDBCDataStore store, Connection cx) throws SQLException
ConnectionLifecycleListener
onBorrow
in interface ConnectionLifecycleListener
SQLException
public void onRelease(JDBCDataStore store, Connection cx) throws SQLException
ConnectionLifecycleListener
onRelease
in interface ConnectionLifecycleListener
SQLException
public void onCommit(JDBCDataStore store, Connection cx)
ConnectionLifecycleListener
onCommit
in interface ConnectionLifecycleListener
public void onRollback(JDBCDataStore store, Connection cx)
ConnectionLifecycleListener
onRollback
in interface ConnectionLifecycleListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |