Package com.mchange.v2.c3p0.util
Class TestUtils
- java.lang.Object
-
- com.mchange.v2.c3p0.util.TestUtils
-
public final class TestUtils extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isPhysicalConnectionForProxy(java.sql.Connection physicalConnection, C3P0ProxyConnection proxy)
static int
physicalConnectionIdentityHashCode(C3P0ProxyConnection conn)
static boolean
samePhysicalConnection(C3P0ProxyConnection con1, C3P0ProxyConnection con2)
In general, if this method returns true for two distinct C3P0ProxyConnections, it indicates a c3p0 bug.static javax.sql.DataSource
unreliableCommitDataSource(javax.sql.DataSource ds)
-
-
-
Method Detail
-
samePhysicalConnection
public static boolean samePhysicalConnection(C3P0ProxyConnection con1, C3P0ProxyConnection con2) throws java.sql.SQLException
In general, if this method returns true for two distinct C3P0ProxyConnections, it indicates a c3p0 bug. Once a proxy Connection is close()ed, it should not permit any sort of operation. Prior to Connection close(), there should be at most one valid proxy Connection associated with a given physical Connection.- Throws:
java.sql.SQLException
-
isPhysicalConnectionForProxy
public static boolean isPhysicalConnectionForProxy(java.sql.Connection physicalConnection, C3P0ProxyConnection proxy) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
physicalConnectionIdentityHashCode
public static int physicalConnectionIdentityHashCode(C3P0ProxyConnection conn) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
unreliableCommitDataSource
public static javax.sql.DataSource unreliableCommitDataSource(javax.sql.DataSource ds) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-