com.evolveum.midpoint.repo.sql.util
Class MidPointConnectionCustomizer
java.lang.Object
com.mchange.v2.c3p0.AbstractConnectionCustomizer
com.evolveum.midpoint.repo.sql.util.MidPointConnectionCustomizer
- All Implemented Interfaces:
- com.mchange.v2.c3p0.ConnectionCustomizer
public class MidPointConnectionCustomizer
- extends com.mchange.v2.c3p0.AbstractConnectionCustomizer
This connection customizer forces transaction isolation level to Connection.TRANSACTION_SERIALIZABLE
for all connections. Because of some H2 bug, transaction isolation level has to be set
ConnectionCustomizer.onCheckOut(java.sql.Connection, String)
when using H2. With other databases connection is updated during
ConnectionCustomizer.onAcquire(java.sql.Connection, String)
- Author:
- lazyman
Method Summary |
void |
onAcquire(java.sql.Connection connection,
java.lang.String parentDataSourceIdentityToken)
|
void |
onCheckOut(java.sql.Connection connection,
java.lang.String parentDataSourceIdentityToken)
|
Methods inherited from class com.mchange.v2.c3p0.AbstractConnectionCustomizer |
onCheckIn, onDestroy |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MidPointConnectionCustomizer
public MidPointConnectionCustomizer()
onAcquire
public void onAcquire(java.sql.Connection connection,
java.lang.String parentDataSourceIdentityToken)
throws java.lang.Exception
- Specified by:
onAcquire
in interface com.mchange.v2.c3p0.ConnectionCustomizer
- Overrides:
onAcquire
in class com.mchange.v2.c3p0.AbstractConnectionCustomizer
- Throws:
java.lang.Exception
onCheckOut
public void onCheckOut(java.sql.Connection connection,
java.lang.String parentDataSourceIdentityToken)
throws java.lang.Exception
- Specified by:
onCheckOut
in interface com.mchange.v2.c3p0.ConnectionCustomizer
- Overrides:
onCheckOut
in class com.mchange.v2.c3p0.AbstractConnectionCustomizer
- Throws:
java.lang.Exception
Copyright © 2012 evolveum. All Rights Reserved.