本文整理汇总了Java中com.mysql.jdbc.Util.handleNewInstance方法的典型用法代码示例。如果您正苦于以下问题:Java Util.handleNewInstance方法的具体用法?Java Util.handleNewInstance怎么用?Java Util.handleNewInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.mysql.jdbc.Util
的用法示例。
在下文中一共展示了Util.handleNewInstance方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getInstance
import com.mysql.jdbc.Util; //导入方法依赖的package包/类
protected static SuspendableXAConnection getInstance(Connection mysqlConnection) throws SQLException {
if (!Util.isJdbc4()) {
return new SuspendableXAConnection(mysqlConnection);
}
return (SuspendableXAConnection) Util.handleNewInstance(JDBC_4_XA_CONNECTION_WRAPPER_CTOR, new Object[] { mysqlConnection },
mysqlConnection.getExceptionInterceptor());
}
示例2: getInstance
import com.mysql.jdbc.Util; //导入方法依赖的package包/类
protected static CallableStatementWrapper getInstance(ConnectionWrapper c, MysqlPooledConnection conn, CallableStatement toWrap) throws SQLException {
if (!Util.isJdbc4()) {
return new CallableStatementWrapper(c, conn, toWrap);
}
return (CallableStatementWrapper) Util.handleNewInstance(JDBC_4_CALLABLE_STATEMENT_WRAPPER_CTOR, new Object[] { c, conn, toWrap },
conn.getExceptionInterceptor());
}
示例3: getInstance
import com.mysql.jdbc.Util; //导入方法依赖的package包/类
protected static PreparedStatementWrapper getInstance(ConnectionWrapper c, MysqlPooledConnection conn, PreparedStatement toWrap) throws SQLException {
if (!Util.isJdbc4()) {
return new PreparedStatementWrapper(c, conn, toWrap);
}
return (PreparedStatementWrapper) Util.handleNewInstance(JDBC_4_PREPARED_STATEMENT_WRAPPER_CTOR, new Object[] { c, conn, toWrap },
conn.getExceptionInterceptor());
}
示例4: getInstance
import com.mysql.jdbc.Util; //导入方法依赖的package包/类
protected static StatementWrapper getInstance(ConnectionWrapper c, MysqlPooledConnection conn, Statement toWrap) throws SQLException {
if (!Util.isJdbc4()) {
return new StatementWrapper(c, conn, toWrap);
}
return (StatementWrapper) Util.handleNewInstance(JDBC_4_STATEMENT_WRAPPER_CTOR, new Object[] { c, conn, toWrap }, conn.getExceptionInterceptor());
}
示例5: getInstance
import com.mysql.jdbc.Util; //导入方法依赖的package包/类
protected static MysqlPooledConnection getInstance(com.mysql.jdbc.Connection connection) throws SQLException {
if (!Util.isJdbc4()) {
return new MysqlPooledConnection(connection);
}
return (MysqlPooledConnection) Util.handleNewInstance(JDBC_4_POOLED_CONNECTION_WRAPPER_CTOR, new Object[] { connection },
connection.getExceptionInterceptor());
}
示例6: getInstance
import com.mysql.jdbc.Util; //导入方法依赖的package包/类
protected static MysqlXAConnection getInstance(com.mysql.jdbc.Connection mysqlConnection, boolean logXaCommands) throws SQLException {
if (!Util.isJdbc4()) {
return new MysqlXAConnection(mysqlConnection, logXaCommands);
}
return (MysqlXAConnection) Util.handleNewInstance(JDBC_4_XA_CONNECTION_WRAPPER_CTOR, new Object[] { mysqlConnection, Boolean.valueOf(logXaCommands) },
mysqlConnection.getExceptionInterceptor());
}