Methods Summary |
---|
public void | addListener(oracle.toplink.essentials.sessions.SessionEventListener listener)PUBLIC:
Add the event listener to the session.
The listner will receive all events raised by this session.
Also unit of works acquire from this session will inherit the listenrs.
getListeners().addElement(listener);
|
public java.lang.Object | clone()INTERNAL:
try {
return super.clone();
} catch (Exception e) {
return null;
}
|
public oracle.toplink.essentials.sessions.SessionEventManager | clone(oracle.toplink.essentials.sessions.Session newSession)INTERNAL:
SessionEventManager newManager = (SessionEventManager)clone();
newManager.setSession(newSession);
Vector newListeners = (Vector)(this.getListeners().clone());
newManager.setListeners(newListeners);
return newManager;
|
protected void | endOperationProfile()INTERNAL:
End call
if (getSession().isInProfile()) {
getSession().getProfiler().endOperationProfile(SessionProfiler.SessionEvent);
}
|
public java.util.Vector | getListeners()PUBLIC:
The event listners will receive all events raised by this session.
Also unit of works acquire from this session will inherit the listenrs.
return listeners;
|
public oracle.toplink.essentials.sessions.Session | getSession()INTERNAL:
Get the session for this session event manager
return session;
|
public boolean | hasListeners()PUBLIC:
Check if there are any event listeners.
return !getListeners().isEmpty();
|
public void | missingDescriptor(java.lang.Class missingClass)INTERNAL:
Raised for missing descriptors for lazy registration.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.MissingDescriptor, getSession());
event.setResult(missingClass);
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).missingDescriptor(event);
}
endOperationProfile();
|
public void | moreRowsDetected(oracle.toplink.essentials.internal.databaseaccess.DatabaseCall call)INTERNAL:
Raised for stored proc output parameters.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.MoreRowsDetected, getSession());
event.setResult(call);
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).moreRowsDetected(event);
}
endOperationProfile();
|
public void | noRowsModified(oracle.toplink.essentials.queryframework.ModifyQuery query, java.lang.Object object)INTERNAL:
Raised for stored proc output parameters.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.NoRowsModified, getSession());
event.setQuery(query);
event.setResult(object);
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).noRowsModified(event);
}
endOperationProfile();
|
public void | outputParametersDetected(oracle.toplink.essentials.internal.sessions.AbstractRecord outputRow, oracle.toplink.essentials.internal.databaseaccess.DatasourceCall call)INTERNAL:
Raised for stored proc output parameters.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.OutputParametersDetected, getSession());
event.setResult(outputRow);
event.setProperty("call", call);
event.setQuery(call.getQuery());
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).outputParametersDetected(event);
}
endOperationProfile();
|
public void | postAcquireClientSession()INTERNAL:
Post acquire client session.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.PostAcquireClientSession, getSession());
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).postAcquireClientSession(event);
}
endOperationProfile();
|
public void | postAcquireConnection(oracle.toplink.essentials.internal.databaseaccess.Accessor accessor)INTERNAL:
Raised after acquire a connection from a connection pool.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.PostAcquireConnection, getSession());
event.setResult(accessor);
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).postAcquireConnection(event);
}
endOperationProfile();
|
public void | postAcquireExclusiveConnection(oracle.toplink.essentials.threetier.ClientSession clientSession, oracle.toplink.essentials.internal.databaseaccess.Accessor accessor)INTERNAL:
Raised after acquire a connection from a connection pool.
if (!hasListeners()) {
return;
}
SessionEvent event = new SessionEvent(SessionEvent.PostAcquireExclusiveConnection, clientSession);
event.setResult(accessor);
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).postAcquireExclusiveConnection(event);
}
|
public void | postAcquireUnitOfWork()INTERNAL:
Post acquire unit of work.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.PostAcquireUnitOfWork, getSession());
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).postAcquireUnitOfWork(event);
}
endOperationProfile();
|
public void | postBeginTransaction()INTERNAL:
Post begin transaction.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.PostBeginTransaction, getSession());
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).postBeginTransaction(event);
}
endOperationProfile();
|
public void | postCalculateUnitOfWorkChangeSet(oracle.toplink.essentials.internal.sessions.UnitOfWorkChangeSet changeSet)INTERNAL:
Post calculate UnitOfWork Change Set.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.PostCalculateUnitOfWorkChangeSet, getSession());
event.setProperty("UnitOfWorkChangeSet", changeSet);
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).postCalculateUnitOfWorkChangeSet(event);
}
endOperationProfile();
|
public void | postCommitTransaction()INTERNAL:
Post commit transaction.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.PostCommitTransaction, getSession());
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).postCommitTransaction(event);
}
endOperationProfile();
|
public void | postCommitUnitOfWork()INTERNAL:
Post commit unit of work.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.PostCommitUnitOfWork, getSession());
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).postCommitUnitOfWork(event);
}
endOperationProfile();
|
public void | postConnect(oracle.toplink.essentials.internal.databaseaccess.Accessor accessor)INTERNAL:
Raised after connecting.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.PostConnect, getSession());
event.setResult(accessor);
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).postConnect(event);
}
endOperationProfile();
|
public void | postDistributedMergeUnitOfWorkChangeSet(oracle.toplink.essentials.internal.sessions.UnitOfWorkChangeSet changeSet)INTERNAL:
Pre execute query.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.PostDistributedMergeUnitOfWorkChangeSet, getSession());
event.setProperty("UnitOfWorkChangeSet", changeSet);
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).postDistributedMergeUnitOfWorkChangeSet(event);
}
endOperationProfile();
|
public void | postExecuteQuery(oracle.toplink.essentials.queryframework.DatabaseQuery query, java.lang.Object result)INTERNAL:
Post execute query.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.PostExecuteQuery, getSession());
event.setQuery(query);
event.setResult(result);
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).postExecuteQuery(event);
}
endOperationProfile();
|
public void | postLogin(oracle.toplink.essentials.sessions.Session session)INTERNAL:
post login to the session.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.PostLogin, session);
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).postLogin(event);
}
endOperationProfile();
|
public void | postMergeUnitOfWorkChangeSet(oracle.toplink.essentials.internal.sessions.UnitOfWorkChangeSet changeSet)INTERNAL:
Pre execute query.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.PostMergeUnitOfWorkChangeSet, getSession());
event.setProperty("UnitOfWorkChangeSet", changeSet);
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).postMergeUnitOfWorkChangeSet(event);
}
endOperationProfile();
|
public void | postReleaseClientSession()INTERNAL:
Post release client session.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.PostReleaseClientSession, getSession());
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).postReleaseClientSession(event);
}
endOperationProfile();
|
public void | postReleaseUnitOfWork()INTERNAL:
Post release unit of work.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.PostReleaseUnitOfWork, getSession());
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).postReleaseUnitOfWork(event);
}
endOperationProfile();
|
public void | postResumeUnitOfWork()INTERNAL:
Post resume unit of work.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.PostResumeUnitOfWork, getSession());
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).postResumeUnitOfWork(event);
}
endOperationProfile();
|
public void | postRollbackTransaction()INTERNAL:
Post rollback transaction.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.PostRollbackTransaction, getSession());
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).postRollbackTransaction(event);
}
endOperationProfile();
|
public void | preBeginTransaction()INTERNAL:
Pre begin transaction.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.PreBeginTransaction, getSession());
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).preBeginTransaction(event);
}
endOperationProfile();
|
public void | preCalculateUnitOfWorkChangeSet()INTERNAL:
Pre calculate UnitOfWork Change Set.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.PreCalculateUnitOfWorkChangeSet, getSession());
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).preCalculateUnitOfWorkChangeSet(event);
}
endOperationProfile();
|
public void | preCommitTransaction()INTERNAL:
Pre commit transaction.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.PreCommitTransaction, getSession());
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).preCommitTransaction(event);
}
endOperationProfile();
|
public void | preCommitUnitOfWork()INTERNAL:
Pre commit unit of work.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.PreCommitUnitOfWork, getSession());
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).preCommitUnitOfWork(event);
}
endOperationProfile();
|
public void | preDistributedMergeUnitOfWorkChangeSet(oracle.toplink.essentials.internal.sessions.UnitOfWorkChangeSet changeSet)INTERNAL:
Pre merge Distributed UnitOfWorkChangeSet
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.PreDistributedMergeUnitOfWorkChangeSet, getSession());
event.setProperty("UnitOfWorkChangeSet", changeSet);
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).preDistributedMergeUnitOfWorkChangeSet(event);
}
endOperationProfile();
|
public void | preExecuteQuery(oracle.toplink.essentials.queryframework.DatabaseQuery query)INTERNAL:
Pre execute query.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.PreExecuteQuery, getSession());
event.setQuery(query);
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).preExecuteQuery(event);
}
endOperationProfile();
|
public void | preLogin(oracle.toplink.essentials.sessions.Session session)INTERNAL:
Pre login to the session.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.PreLogin, session);
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).preLogin(event);
}
endOperationProfile();
|
public void | preMergeUnitOfWorkChangeSet(oracle.toplink.essentials.internal.sessions.UnitOfWorkChangeSet changeSet)INTERNAL:
Pre merge UnitOfWorkChangeSet
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.PreMergeUnitOfWorkChangeSet, getSession());
event.setProperty("UnitOfWorkChangeSet", changeSet);
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).preMergeUnitOfWorkChangeSet(event);
}
endOperationProfile();
|
public void | preReleaseClientSession()INTERNAL:
Pre release client session.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.PreReleaseClientSession, getSession());
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).preReleaseClientSession(event);
}
endOperationProfile();
|
public void | preReleaseConnection(oracle.toplink.essentials.internal.databaseaccess.Accessor accessor)INTERNAL:
Raised before release a connection to a connection pool.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.PreReleaseConnection, getSession());
event.setResult(accessor);
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).preReleaseConnection(event);
}
endOperationProfile();
|
public void | preReleaseExclusiveConnection(oracle.toplink.essentials.threetier.ClientSession clientSession, oracle.toplink.essentials.internal.databaseaccess.Accessor accessor)INTERNAL:
This event is fired just before a Client Session, with isolated data,
releases its Exclusive Connection
if (!hasListeners()) {
return;
}
SessionEvent event = new SessionEvent(SessionEvent.PreReleaseExclusiveConnection, clientSession);
event.setResult(accessor);
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).preReleaseExclusiveConnection(event);
}
|
public void | preReleaseUnitOfWork()INTERNAL:
Pre release unit of work.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.PreReleaseUnitOfWork, getSession());
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).preReleaseUnitOfWork(event);
}
endOperationProfile();
|
public void | preRollbackTransaction()INTERNAL:
Pre rollback transaction.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.PreRollbackTransaction, getSession());
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).preRollbackTransaction(event);
}
endOperationProfile();
|
public void | prepareUnitOfWork()INTERNAL:
Prepare unit of work.
if (!hasListeners()) {
return;
}
startOperationProfile();
SessionEvent event = new SessionEvent(SessionEvent.PrepareUnitOfWork, getSession());
for (Enumeration listenerEnum = getListeners().elements(); listenerEnum.hasMoreElements();) {
((SessionEventListener)listenerEnum.nextElement()).prepareUnitOfWork(event);
}
endOperationProfile();
|
public void | removeListener(oracle.toplink.essentials.sessions.SessionEventListener listener)PUBLIC:
Remove the event listener from the session.
getListeners().removeElement(listener);
|
protected void | setListeners(java.util.Vector listeners)The event listners will receive all events raised by this session.
Also unit of works acquire from this session will inherit the listenrs.
this.listeners = listeners;
|
public void | setSession(oracle.toplink.essentials.sessions.Session session)INTERNAL:
Set the session for this session event manager
this.session = session;
|
protected void | startOperationProfile()INTERNAL:
Start call
if (getSession().isInProfile()) {
getSession().getProfiler().startOperationProfile(SessionProfiler.SessionEvent);
}
|