protected final Connection connectionProxy() { return logicalConnection().getShareableConnectionProxy(); }
protected final Connection connectionProxy() { return logicalConnection().getShareableConnectionProxy(); }
private PreparedStatement buildBatchStatement(String sql, boolean callable) { sql = jdbcCoordinator.getTransactionCoordinator().getTransactionContext().onPrepareStatement( sql ); try { if ( callable ) { return jdbcCoordinator.getLogicalConnection().getShareableConnectionProxy().prepareCall( sql ); } else { return jdbcCoordinator.getLogicalConnection().getShareableConnectionProxy().prepareStatement( sql ); } } catch ( SQLException sqle ) { LOG.sqlExceptionEscapedProxy( sqle ); throw sqlExceptionHelper().convert( sqle, "could not prepare batch statement", sql ); } }
private PreparedStatement buildBatchStatement(String sql, boolean callable) { sql = jdbcCoordinator.getTransactionCoordinator().getTransactionContext().onPrepareStatement( sql ); try { if ( callable ) { return jdbcCoordinator.getLogicalConnection().getShareableConnectionProxy().prepareCall( sql ); } else { return jdbcCoordinator.getLogicalConnection().getShareableConnectionProxy().prepareStatement( sql ); } } catch ( SQLException sqle ) { LOG.sqlExceptionEscapedProxy( sqle ); throw sqlExceptionHelper().convert( sqle, "could not prepare batch statement", sql ); } }
.getJdbcCoordinator() .getLogicalConnection() .getShareableConnectionProxy(); work.execute( connection ); session.getTransactionCoordinator()
.getJdbcCoordinator() .getLogicalConnection() .getShareableConnectionProxy(); work.execute( connection ); session.getTransactionCoordinator()
protected void createTemporaryTableIfNecessary(final Queryable persister, final SessionImplementor session) { // Don't really know all the codes required to adequately decipher returned jdbc exceptions here. // simply allow the failure to be eaten and the subsequent insert-selects/deletes should fail TemporaryTableCreationWork work = new TemporaryTableCreationWork( persister ); if ( shouldIsolateTemporaryTableDDL() ) { session.getTransactionCoordinator() .getTransaction() .createIsolationDelegate() .delegateWork( work, getFactory().getSettings().isDataDefinitionInTransactionSupported() ); } else { final Connection connection = session.getTransactionCoordinator() .getJdbcCoordinator() .getLogicalConnection() .getShareableConnectionProxy(); work.execute( connection ); session.getTransactionCoordinator() .getJdbcCoordinator() .getLogicalConnection() .afterStatementExecution(); } }
protected void createTemporaryTableIfNecessary(final Queryable persister, final SessionImplementor session) { // Don't really know all the codes required to adequately decipher returned jdbc exceptions here. // simply allow the failure to be eaten and the subsequent insert-selects/deletes should fail TemporaryTableCreationWork work = new TemporaryTableCreationWork( persister ); if ( shouldIsolateTemporaryTableDDL() ) { session.getTransactionCoordinator() .getTransaction() .createIsolationDelegate() .delegateWork( work, getFactory().getSettings().isDataDefinitionInTransactionSupported() ); } else { final Connection connection = session.getTransactionCoordinator() .getJdbcCoordinator() .getLogicalConnection() .getShareableConnectionProxy(); work.execute( connection ); session.getTransactionCoordinator() .getJdbcCoordinator() .getLogicalConnection() .afterStatementExecution(); } }