/** * INTERNAL: * This method is called in case externalConnectionPooling is used * right after the accessor is connected. * Used by the session to rise an appropriate event. */ public void postConnectExternalConnection(Accessor accessor) { if (this.eventManager != null) { this.eventManager.postAcquireConnection(accessor); } }
/** * INTERNAL: * This method is called in case externalConnectionPooling is used * right after the accessor is connected. * Used by the session to rise an appropriate event. */ public void postConnectExternalConnection(Accessor accessor) { if (this.eventManager != null) { this.eventManager.postAcquireConnection(accessor); } }
/** * INTERNAL: * Return a read connection from the read pool. * Note that depending on the type of pool this may be a shared or exclusive connection. * Each query execution is assigned a read connection. */ public Accessor allocateReadConnection() { Accessor connection = this.readConnectionPool.acquireConnection(); //if connection is using external connection pooling then the event will be risen right after it connects. if (!connection.usesExternalConnectionPooling()) { if (this.eventManager != null) { this.eventManager.postAcquireConnection(connection); } } return connection; }
/** * INTERNAL: * Return a read connection from the read pool. * Note that depending on the type of pool this may be a shared or exclusive connection. * Each query execution is assigned a read connection. */ public Accessor allocateReadConnection() { Accessor connection = this.readConnectionPool.acquireConnection(); //if connection is using external connection pooling then the event will be risen right after it connects. if (!connection.usesExternalConnectionPooling()) { if (this.eventManager != null) { this.eventManager.postAcquireConnection(connection); } } return connection; }
/** * INTERNAL: * Return a read connection from the read pool. * Note that depending on the type of pool this may be a shared or exclusive connection. * Each query execution is assigned a read connection. */ public Accessor allocateReadConnection() { Accessor connection = getReadConnectionPool().acquireConnection(); //if connection is using external connection pooling then the event will be risen right after it connects. if (!connection.usesExternalConnectionPooling()) { if (this.eventManager != null) { this.eventManager.postAcquireConnection(connection); } } return connection; }
/** * INTERNAL: * This method rises appropriate for the session event(s) * right after connection is acquired. */ public void postAcquireConnection(Accessor accessor) { if (getProject().hasVPDIdentifier(this)) { if (getPlatform().supportsVPD()) { DatabaseQuery query = getPlatform().getVPDSetIdentifierQuery(getProject().getVPDIdentifier()); List argValues = new ArrayList(); query.addArgument(getProject().getVPDIdentifier()); argValues.add(getProperty(getProject().getVPDIdentifier())); executeQuery(query, argValues); } else { throw ValidationException.vpdNotSupported(getPlatform().getClass().getName()); } } if (this.eventManager != null) { this.eventManager.postAcquireConnection(accessor); } }
/** * INTERNAL: * This method rises appropriate for the session event(s) * right after connection is acquired. */ public void postAcquireConnection(Accessor accessor) { if (getProject().hasVPDIdentifier(this)) { if (getPlatform().supportsVPD()) { DatabaseQuery query = getPlatform().getVPDSetIdentifierQuery(getProject().getVPDIdentifier()); List argValues = new ArrayList(); query.addArgument(getProject().getVPDIdentifier()); argValues.add(getProperty(getProject().getVPDIdentifier())); executeQuery(query, argValues); } else { throw ValidationException.vpdNotSupported(getPlatform().getClass().getName()); } } if (this.eventManager != null) { this.eventManager.postAcquireConnection(accessor); } }
clientSession.getEventManager().postAcquireConnection(connection); clientSession.getEventManager().postAcquireConnection(clientSession.getWriteConnection()); if (clientSession.isExclusiveIsolatedClientSession()) { getEventManager().postAcquireExclusiveConnection(clientSession, clientSession.getWriteConnection());
this.eventManager.postAcquireConnection(accessor);
this.eventManager.postAcquireConnection(accessor);