Class TestUtils


  • public final class TestUtils
    extends java.lang.Object
    • 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