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 a specified value
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
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(Connection connection,
String parentDataSourceIdentityToken)
throws Exception
- Specified by:
onAcquire
in interface com.mchange.v2.c3p0.ConnectionCustomizer
- Overrides:
onAcquire
in class com.mchange.v2.c3p0.AbstractConnectionCustomizer
- Throws:
Exception
onCheckOut
public void onCheckOut(Connection connection,
String parentDataSourceIdentityToken)
throws Exception
- Specified by:
onCheckOut
in interface com.mchange.v2.c3p0.ConnectionCustomizer
- Overrides:
onCheckOut
in class com.mchange.v2.c3p0.AbstractConnectionCustomizer
- Throws:
Exception
getTransactionIsolation
public static TransactionIsolation getTransactionIsolation()
setTransactionIsolation
public static void setTransactionIsolation(TransactionIsolation transactionIsolation)
Copyright © 2013 evolveum. All Rights Reserved.