public TransactionContext(JDBCPersistenceAdapter persistenceAdapter) throws IOException { this.persistenceAdapter = persistenceAdapter; this.dataSource = persistenceAdapter.getDataSource(); }
public DataSource getLockDataSource() throws IOException { if (lockDataSource == null) { lockDataSource = getDataSource(); if (lockDataSource == null) { throw new IllegalArgumentException( "No dataSource property has been configured"); } } return lockDataSource; }
@Override public synchronized void doStop(ServiceStopper stopper) throws Exception { if (cleanupTicket != null) { cleanupTicket.cancel(true); cleanupTicket = null; } closeDataSource(getDataSource()); }
@Override public void checkpoint(boolean sync) throws IOException { // by pass TransactionContext to avoid IO Exception handler Connection connection = null; try { connection = getDataSource().getConnection(); if (!connection.isValid(10)) { throw new IOException("isValid(10) failed for: " + connection); } } catch (SQLException e) { LOG.debug("Could not get JDBC connection for checkpoint: " + e); throw IOExceptionSupport.create(e); } finally { if (connection != null) { try { connection.close(); } catch (Throwable ignored) { } } } }
public TransactionContext(JDBCPersistenceAdapter persistenceAdapter) throws IOException { this.persistenceAdapter = persistenceAdapter; this.dataSource = persistenceAdapter.getDataSource(); }
public TransactionContext(JDBCPersistenceAdapter persistenceAdapter) throws IOException { this.persistenceAdapter = persistenceAdapter; this.dataSource = persistenceAdapter.getDataSource(); }
public TransactionContext(JDBCPersistenceAdapter persistenceAdapter) throws IOException { this.persistenceAdapter = persistenceAdapter; this.dataSource = persistenceAdapter.getDataSource(); }
public TransactionContext(JDBCPersistenceAdapter persistenceAdapter) throws IOException { this.persistenceAdapter = persistenceAdapter; this.dataSource = persistenceAdapter.getDataSource(); }
public DataSource getLockDataSource() throws IOException { if (lockDataSource == null) { lockDataSource = getDataSource(); if (lockDataSource == null) { throw new IllegalArgumentException( "No dataSource property has been configured"); } } return lockDataSource; }
public DataSource getLockDataSource() throws IOException { if (lockDataSource == null) { lockDataSource = getDataSource(); if (lockDataSource == null) { throw new IllegalArgumentException( "No dataSource property has been configured"); } } return lockDataSource; }
public DataSource getLockDataSource() throws IOException { if (lockDataSource == null) { lockDataSource = getDataSource(); if (lockDataSource == null) { throw new IllegalArgumentException( "No dataSource property has been configured"); } } return lockDataSource; }
public DataSource getLockDataSource() throws IOException { if (lockDataSource == null) { lockDataSource = getDataSource(); if (lockDataSource == null) { throw new IllegalArgumentException( "No dataSource property has been configured"); } } else { LOG.info("Using a separate dataSource for locking: " + lockDataSource); } return lockDataSource; }
@Override public synchronized void doStop(ServiceStopper stopper) throws Exception { if (cleanupTicket != null) { cleanupTicket.cancel(true); cleanupTicket = null; } closeDataSource(getDataSource()); }
@Override public synchronized void doStop(ServiceStopper stopper) throws Exception { if (cleanupTicket != null) { cleanupTicket.cancel(true); cleanupTicket = null; } closeDataSource(getDataSource()); }
@Override public synchronized void doStop(ServiceStopper stopper) throws Exception { if (cleanupTicket != null) { cleanupTicket.cancel(true); cleanupTicket = null; } closeDataSource(getDataSource()); }
public void checkpoint(boolean sync) throws IOException { // by pass TransactionContext to avoid IO Exception handler Connection connection = null; try { connection = getDataSource().getConnection(); } catch (SQLException e) { LOG.debug("Could not get JDBC connection for checkpoint: " + e); throw IOExceptionSupport.create(e); } finally { if (connection != null) { try { connection.close(); } catch (Throwable ignored) { } } } }
@Override public void checkpoint(boolean sync) throws IOException { // by pass TransactionContext to avoid IO Exception handler Connection connection = null; try { connection = getDataSource().getConnection(); if (!connection.isValid(10)) { throw new IOException("isValid(10) failed for: " + connection); } } catch (SQLException e) { LOG.debug("Could not get JDBC connection for checkpoint: " + e); throw IOExceptionSupport.create(e); } finally { if (connection != null) { try { connection.close(); } catch (Throwable ignored) { } } } }
@Override public void checkpoint(boolean sync) throws IOException { // by pass TransactionContext to avoid IO Exception handler Connection connection = null; try { connection = getDataSource().getConnection(); if (!connection.isValid(10)) { throw new IOException("isValid(10) failed for: " + connection); } } catch (SQLException e) { LOG.debug("Could not get JDBC connection for checkpoint: " + e); throw IOExceptionSupport.create(e); } finally { if (connection != null) { try { connection.close(); } catch (Throwable ignored) { } } } }
@Override public void checkpoint(boolean sync) throws IOException { // by pass TransactionContext to avoid IO Exception handler Connection connection = null; try { connection = getDataSource().getConnection(); if (!connection.isValid(10)) { throw new IOException("isValid(10) failed for: " + connection); } } catch (SQLException e) { LOG.debug("Could not get JDBC connection for checkpoint: " + e); throw IOExceptionSupport.create(e); } finally { if (connection != null) { try { connection.close(); } catch (Throwable ignored) { } } } }