@Override protected RefCountConnection connectInternal() throws SQLException { List<Connection> list = new ArrayList<Connection>(); for (SliceStoreManager slice : _slices) list.add(slice.getConnection()); DistributedConnection con = new DistributedConnection(list); return new RefCountConnection(con); }
public void free() { // ensure that we do not close the underlying connection // multiple times; this could happen if someone (e.g., an // Extent) holds a RefConnection, and then closes it (e.g., in // the finalizer) after the StoreManager has already been closed. if (_freed) return; try { getDelegate().close(); } catch (SQLException se) { } _freed = true; _conn = null; }
public Collection flush(Collection sms) { try { if (_conn != null && _conn.getInnermostDelegate().isReadOnly()) _conn.setReadOnly(false); } catch (SQLException e) { } return _conf.getUpdateManagerInstance().flush(sms, this); }
/** * Connect to the db. */ private void connect(boolean ref) { _ctx.lock(); try { // connect if the connection is currently null, or if // the connection has been closed out from under us if (_conn == null) _conn = connectInternal(); if (ref) _conn.ref(); } catch (SQLException se) { throw SQLExceptions.getStore(se, _dict); } finally { _ctx.unlock(); } }
/** * Connect to the db. */ private void connect(boolean ref) { _ctx.lock(); try { // connect if the connection is currently null, or if // the connection has been closed out from under us if (_conn == null) _conn = connectInternal(); if (ref) _conn.ref(); } catch (SQLException se) { throw SQLExceptions.getStore(se, _dict); } finally { _ctx.unlock(); } }
/** * Connect to the db. */ private void connect(boolean ref) { _ctx.lock(); try { // connect if the connection is currently null, or if // the connection has been closed out from under us if (_conn == null) _conn = connectInternal(); if (ref) _conn.ref(); } catch (SQLException se) { throw SQLExceptions.getStore(se, _dict); } finally { _ctx.unlock(); } }
/** * Connect to the db. */ private void connect(boolean ref) { _ctx.lock(); try { // connect if the connection is currently null, or if // the connection has been closed out from under us if (_conn == null) _conn = connectInternal(); if (ref) _conn.ref(); } catch (SQLException se) { throw SQLExceptions.getStore(se, _dict); } finally { _ctx.unlock(); } }
/** * Connect to the db. */ private void connect(boolean ref) { _ctx.lock(); try { // connect if the connection is currently null, or if // the connection has been closed out from under us if (_conn == null) _conn = connectInternal(); if (ref) _conn.ref(); } catch (SQLException se) { throw SQLExceptions.getStore(se, _dict); } finally { _ctx.unlock(); } }
public void rollback() { // already rolled back ourselves? if (!_active) return; try { if (_conn != null && (!_ctx.isManaged() || !_conf .isConnectionFactoryModeManaged())) _conn.rollback(); } catch (SQLException se) { throw SQLExceptions.getStore(se, _dict); } finally { _active = false; } }
public void rollback() { // already rolled back ourselves? if (!_active) return; try { if (_conn != null && (!_ctx.isManaged() || !_conf .isConnectionFactoryModeManaged())) _conn.rollback(); } catch (SQLException se) { throw SQLExceptions.getStore(se, _dict); } finally { _active = false; } }
public void rollback() { // already rolled back ourselves? if (!_active) return; try { if (_conn != null && (!_ctx.isManaged() || !_conf .isConnectionFactoryModeManaged())) _conn.rollback(); } catch (SQLException se) { throw SQLExceptions.getStore(se, _dict); } finally { _active = false; } }
public void rollback() { // already rolled back ourselves? if (!_active) return; try { if (_conn != null && (!_ctx.isManaged() || !_conf .isConnectionFactoryModeManaged())) _conn.rollback(); } catch (SQLException se) { throw SQLExceptions.getStore(se, _dict); } finally { _active = false; } }
public void free() { // ensure that we do not close the underlying connection // multiple times; this could happen if someone (e.g., an // Extent) holds a RefConnection, and then closes it (e.g., in // the finalizer) after the StoreManager has already been closed. if (_freed) return; try { getDelegate().close(); } catch (SQLException se) { } _freed = true; _conn = null; }
public void rollback() { // already rolled back ourselves? if (!_active) return; try { if (_conn != null && (!_ctx.isManaged() || !_conf .isConnectionFactoryModeManaged())) _conn.rollback(); } catch (SQLException se) { throw SQLExceptions.getStore(se, _dict); } finally { _active = false; } }
public void free() { // ensure that we do not close the underlying connection // multiple times; this could happen if someone (e.g., an // Extent) holds a RefConnection, and then closes it (e.g., in // the finalizer) after the StoreManager has already been closed. if (_freed) return; try { getDelegate().close(); } catch (SQLException se) { } _freed = true; _conn = null; }
public void free() { // ensure that we do not close the underlying connection // multiple times; this could happen if someone (e.g., an // Extent) holds a RefConnection, and then closes it (e.g., in // the finalizer) after the StoreManager has already been closed. if (_freed) return; try { getDelegate().close(); } catch (SQLException se) { } _freed = true; _conn = null; }
public void free() { // ensure that we do not close the underlying connection // multiple times; this could happen if someone (e.g., an // Extent) holds a RefConnection, and then closes it (e.g., in // the finalizer) after the StoreManager has already been closed. if (_freed) return; try { getDelegate().close(); } catch (SQLException se) { } _freed = true; _conn = null; }
public void close() { if (_conn != null) _conn.free(); }
public void releaseConnection() { if (_conn != null) _conn.setRetain(false); }