entityManager.getTransaction().begin(); UnitOfWork unitOfWork = (UnitOfWork)((JpaEntityManager)entityManager.getDelegate()).getActiveSession(); unitOfWork.beginEarlyTransaction(); Accessor accessor = unitOfWork.getAccessor(); accessor.incrementCallCount(unitOfWork.getParent()); accessor.decrementCallCount(); java.sql.Connection connection = accessor.getConnection(); ... entityManager.getTransaction().commit();
connection.incrementCallCount(getOwner()); return connection; Accessor connection = buildConnection(); this.connectionsAvailable.add(connection); connection.incrementCallCount(getOwner()); return connection; leastBusyConnection.incrementCallCount(getOwner()); return leastBusyConnection;
Accessor accessor = unitOfWork.getAccessor(); accessor.incrementCallCount(unitOfWork.getParent()); accessor.decrementCallCount(); return (T) accessor.getConnection(); Accessor accessor = unitOfWork.getAccessor(); accessor.incrementCallCount(unitOfWork.getParent()); accessor.decrementCallCount(); return (T) accessor.getDatasourceConnection();
leastBusyConnection.incrementCallCount(getOwner()); if (this.owner.shouldLog(SessionLog.FINEST, SessionLog.CONNECTION)) { Object[] args = new Object[1];
leastBusyConnection.incrementCallCount(getOwner()); if (this.owner.shouldLog(SessionLog.FINEST, SessionLog.CONNECTION)) { Object[] args = new Object[1];
accessor.incrementCallCount(databaseSession); try { OracleConnection connection = (OracleConnection)databaseSession.getServerPlatform().unwrapConnection(accessor.getConnection());
accessor.incrementCallCount(databaseSession); try { OracleConnection connection = (OracleConnection)databaseSession.getServerPlatform().unwrapConnection(accessor.getConnection());
/** * INTERNAL: * Remove the event listener from the database. */ public void remove(Session session) { if (this.register == null) { return; } AbstractSession databaseSession = (AbstractSession)session; Accessor accessor = databaseSession.getAccessor(); accessor.incrementCallCount(databaseSession); try { OracleConnection connection = (OracleConnection)databaseSession.getServerPlatform().unwrapConnection(accessor.getConnection()); databaseSession.log(SessionLog.FINEST, SessionLog.CONNECTION, "dcn_unregister"); try { connection.unregisterDatabaseChangeNotification(this.register); } catch (SQLException exception) { throw DatabaseException.sqlException(exception, databaseSession.getAccessor(), databaseSession, false); } } finally { accessor.decrementCallCount(); } }
/** * INTERNAL: * Remove the event listener from the database. */ @Override public void remove(Session session) { if (this.register == null) { return; } AbstractSession databaseSession = (AbstractSession)session; Accessor accessor = databaseSession.getAccessor(); accessor.incrementCallCount(databaseSession); try { OracleConnection connection = (OracleConnection)databaseSession.getServerPlatform().unwrapConnection(accessor.getConnection()); databaseSession.log(SessionLog.FINEST, SessionLog.CONNECTION, "dcn_unregister"); try { connection.unregisterDatabaseChangeNotification(this.register); } catch (SQLException exception) { throw DatabaseException.sqlException(exception, databaseSession.getAccessor(), databaseSession, false); } } finally { accessor.decrementCallCount(); } }