public Connection getConnection() throws SQLException { LrcConnectionHandle lrcConnectionHandle = new LrcConnectionHandle(xaResource, connection); return (Connection) Proxy.newProxyInstance(ClassLoaderUtils.getClassLoader(), new Class[] { Connection.class }, lrcConnectionHandle); }
public ResultSet getResultSet() throws SQLException { return (ResultSet) Proxy.newProxyInstance(ClassLoaderUtils.getClassLoader(), new Class[]{ResultSet.class}, new JdbcResultSetHandle(delegate.getResultSet(), this)); }
public ResultSet executeQuery(String sql) throws SQLException { return (ResultSet) Proxy.newProxyInstance(ClassLoaderUtils.getClassLoader(), new Class[]{ResultSet.class}, new JdbcResultSetHandle(delegate.executeQuery(sql), this)); }
public Connection getConnection() throws SQLException { LrcConnectionHandle lrcConnectionHandle = new LrcConnectionHandle(xaResource, connection); return (Connection) Proxy.newProxyInstance(ClassLoaderUtils.getClassLoader(), new Class[] { Connection.class }, lrcConnectionHandle); }
private void fireCloseEvent() { if (log.isDebugEnabled()) log.debug("notifying " + connectionEventListeners.size() + " connectionEventListeners(s) about closing of " + this); for (ConnectionEventListener connectionEventListener : connectionEventListeners) { XAConnection conn = (XAConnection) Proxy.newProxyInstance(ClassLoaderUtils.getClassLoader(), new Class[]{XAConnection.class}, this); connectionEventListener.connectionClosed(new ConnectionEvent(conn)); } }
private void fireCloseEvent() { if (log.isDebugEnabled()) log.debug("notifying " + connectionEventListeners.size() + " connectionEventListeners(s) about closing of " + this); for (ConnectionEventListener connectionEventListener : connectionEventListeners) { XAConnection conn = (XAConnection) Proxy.newProxyInstance(ClassLoaderUtils.getClassLoader(), new Class[]{XAConnection.class}, this); connectionEventListener.connectionClosed(new ConnectionEvent(conn)); } }
public XAConnection getXAConnection(String user, String password) throws SQLException { try { Class driverClazz = ClassLoaderUtils.loadClass(driverClassName); Driver driver = (Driver) driverClazz.newInstance(); Properties props = new Properties(); props.setProperty("user", user); props.setProperty("password", password); Connection connection = driver.connect(url, props); LrcXAConnection lrcXAConnection = new LrcXAConnection(connection); return (XAConnection) Proxy.newProxyInstance(ClassLoaderUtils.getClassLoader(), new Class[] { XAConnection.class }, lrcXAConnection); } catch (Exception ex) { throw (SQLException) new SQLException("unable to connect to non-XA resource " + driverClassName).initCause(ex); } }
public ResultSet getGeneratedKeys() throws SQLException { return (ResultSet) Proxy.newProxyInstance(ClassLoaderUtils.getClassLoader(), new Class[]{ResultSet.class}, new JdbcResultSetHandle(delegate.getGeneratedKeys(), this)); }
public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException { enlistResource(); Statement statement = getDelegate().createStatement(resultSetType, resultSetConcurrency); jdbcPooledConnection.registerUncachedStatement(statement); JdbcStatementHandle statementHandle = new JdbcStatementHandle(statement, jdbcPooledConnection); return (Statement) Proxy.newProxyInstance(ClassLoaderUtils.getClassLoader(), new Class[]{Statement.class}, statementHandle); }
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException { enlistResource(); CallableStatement statement = getDelegate().prepareCall(sql, resultSetType, resultSetConcurrency); jdbcPooledConnection.registerUncachedStatement(statement); JdbcCallableStatementHandle statementHandle = new JdbcCallableStatementHandle(statement, jdbcPooledConnection); return (CallableStatement) Proxy.newProxyInstance(ClassLoaderUtils.getClassLoader(), new Class[]{CallableStatement.class}, statementHandle); }
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { enlistResource(); CallableStatement statement = getDelegate().prepareCall(sql, resultSetType, resultSetConcurrency, resultSetHoldability); jdbcPooledConnection.registerUncachedStatement(statement); JdbcCallableStatementHandle statementHandle = new JdbcCallableStatementHandle(statement, jdbcPooledConnection); return (CallableStatement) Proxy.newProxyInstance(ClassLoaderUtils.getClassLoader(), new Class[]{CallableStatement.class}, statementHandle); }
public CallableStatement prepareCall(String sql) throws SQLException { enlistResource(); CallableStatement statement = getDelegate().prepareCall(sql); jdbcPooledConnection.registerUncachedStatement(statement); JdbcCallableStatementHandle statementHandle = new JdbcCallableStatementHandle(statement, jdbcPooledConnection); return (CallableStatement) Proxy.newProxyInstance(ClassLoaderUtils.getClassLoader(), new Class[]{CallableStatement.class}, statementHandle); }
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { enlistResource(); CallableStatement statement = getDelegate().prepareCall(sql, resultSetType, resultSetConcurrency, resultSetHoldability); jdbcPooledConnection.registerUncachedStatement(statement); JdbcCallableStatementHandle statementHandle = new JdbcCallableStatementHandle(statement, jdbcPooledConnection); return (CallableStatement) Proxy.newProxyInstance(ClassLoaderUtils.getClassLoader(), new Class[]{CallableStatement.class}, statementHandle); }
public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException { enlistResource(); Statement statement = getDelegate().createStatement(resultSetType, resultSetConcurrency); jdbcPooledConnection.registerUncachedStatement(statement); JdbcStatementHandle statementHandle = new JdbcStatementHandle(statement, jdbcPooledConnection); return (Statement) Proxy.newProxyInstance(ClassLoaderUtils.getClassLoader(), new Class[]{Statement.class}, statementHandle); }
public CallableStatement prepareCall(String sql) throws SQLException { enlistResource(); CallableStatement statement = getDelegate().prepareCall(sql); jdbcPooledConnection.registerUncachedStatement(statement); JdbcCallableStatementHandle statementHandle = new JdbcCallableStatementHandle(statement, jdbcPooledConnection); return (CallableStatement) Proxy.newProxyInstance(ClassLoaderUtils.getClassLoader(), new Class[]{CallableStatement.class}, statementHandle); }
public Statement createStatement() throws SQLException { enlistResource(); Statement statement = getDelegate().createStatement(); jdbcPooledConnection.registerUncachedStatement(statement); JdbcStatementHandle statementHandle = new JdbcStatementHandle(statement, jdbcPooledConnection); return (Statement) Proxy.newProxyInstance(ClassLoaderUtils.getClassLoader(), new Class[]{Statement.class}, statementHandle); }
public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { enlistResource(); Statement statement = getDelegate().createStatement(resultSetType, resultSetConcurrency, resultSetHoldability); jdbcPooledConnection.registerUncachedStatement(statement); JdbcStatementHandle statementHandle = new JdbcStatementHandle(statement, jdbcPooledConnection); return (Statement) Proxy.newProxyInstance(ClassLoaderUtils.getClassLoader(), new Class[]{Statement.class}, statementHandle); }
public Statement createStatement() throws SQLException { enlistResource(); Statement statement = getDelegate().createStatement(); jdbcPooledConnection.registerUncachedStatement(statement); JdbcStatementHandle statementHandle = new JdbcStatementHandle(statement, jdbcPooledConnection); return (Statement) Proxy.newProxyInstance(ClassLoaderUtils.getClassLoader(), new Class[]{Statement.class}, statementHandle); }
public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { enlistResource(); Statement statement = getDelegate().createStatement(resultSetType, resultSetConcurrency, resultSetHoldability); jdbcPooledConnection.registerUncachedStatement(statement); JdbcStatementHandle statementHandle = new JdbcStatementHandle(statement, jdbcPooledConnection); return (Statement) Proxy.newProxyInstance(ClassLoaderUtils.getClassLoader(), new Class[]{Statement.class}, statementHandle); }
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException { enlistResource(); CallableStatement statement = getDelegate().prepareCall(sql, resultSetType, resultSetConcurrency); jdbcPooledConnection.registerUncachedStatement(statement); JdbcCallableStatementHandle statementHandle = new JdbcCallableStatementHandle(statement, jdbcPooledConnection); return (CallableStatement) Proxy.newProxyInstance(ClassLoaderUtils.getClassLoader(), new Class[]{CallableStatement.class}, statementHandle); }