Search in sources :

Example 1 with SessionEvent

use of org.eclipse.persistence.sessions.SessionEvent in project eclipselink by eclipse-ee4j.

the class PostAcquireUnitOfWorkTest method setup.

@Override
public void setup() {
    super.setup();
    setDescription("Test the postAcquireUnitOfWork Event");
    SessionEventAdapter tvAdapter = new SessionEventAdapter() {

        // Listen for PostAcquireUnitOfWorkEvents
        @Override
        public void postAcquireUnitOfWork(SessionEvent event) {
            setEventTriggered(true);
        }
    };
    getSession().getEventManager().addListener(tvAdapter);
}
Also used : SessionEvent(org.eclipse.persistence.sessions.SessionEvent) SessionEventAdapter(org.eclipse.persistence.sessions.SessionEventAdapter)

Example 2 with SessionEvent

use of org.eclipse.persistence.sessions.SessionEvent in project eclipselink by eclipse-ee4j.

the class PostCommitUnitOfWorkTest method setup.

@Override
public void setup() {
    super.setup();
    setDescription("Test the postCommitUnitOfWork Event");
    SessionEventAdapter tvAdapter = new SessionEventAdapter() {

        // Listen for PostCommitUnitOfWorkEvents
        @Override
        public void postCommitUnitOfWork(SessionEvent event) {
            setEventTriggered(true);
        }
    };
    getSession().getEventManager().addListener(tvAdapter);
}
Also used : SessionEvent(org.eclipse.persistence.sessions.SessionEvent) SessionEventAdapter(org.eclipse.persistence.sessions.SessionEventAdapter)

Example 3 with SessionEvent

use of org.eclipse.persistence.sessions.SessionEvent in project eclipselink by eclipse-ee4j.

the class PostReleaseUnitOfWorkTest method setup.

@Override
public void setup() {
    super.setup();
    setDescription("Test the postReleaseUnitOfWork Event");
    SessionEventAdapter tvAdapter = new SessionEventAdapter() {

        // Listen for PostReleaseUnitOfWorkEvents
        @Override
        public void postReleaseUnitOfWork(SessionEvent event) {
            setEventTriggered(true);
        }
    };
    getSession().getEventManager().addListener(tvAdapter);
}
Also used : SessionEvent(org.eclipse.persistence.sessions.SessionEvent) SessionEventAdapter(org.eclipse.persistence.sessions.SessionEventAdapter)

Example 4 with SessionEvent

use of org.eclipse.persistence.sessions.SessionEvent in project eclipselink by eclipse-ee4j.

the class PreCommitUnitOfWorkTest method setup.

@Override
public void setup() {
    super.setup();
    setDescription("Test the preCommitUnitOfWork Event");
    SessionEventAdapter tvAdapter = new SessionEventAdapter() {

        // Listen for PreCommitUnitOfWorkEvents
        @Override
        public void preCommitUnitOfWork(SessionEvent event) {
            setEventTriggered(true);
        }
    };
    getSession().getEventManager().addListener(tvAdapter);
}
Also used : SessionEvent(org.eclipse.persistence.sessions.SessionEvent) SessionEventAdapter(org.eclipse.persistence.sessions.SessionEventAdapter)

Example 5 with SessionEvent

use of org.eclipse.persistence.sessions.SessionEvent in project eclipselink by eclipse-ee4j.

the class PreReleaseUnitOfWorkTest method setup.

@Override
public void setup() {
    super.setup();
    setDescription("Test the preReleaseUnitOfWork Event");
    SessionEventAdapter tvAdapter = new SessionEventAdapter() {

        // Listen for PreReleaseUnitOfWorkEvents
        @Override
        public void preReleaseUnitOfWork(SessionEvent event) {
            setEventTriggered(true);
        }
    };
    getSession().getEventManager().addListener(tvAdapter);
}
Also used : SessionEvent(org.eclipse.persistence.sessions.SessionEvent) SessionEventAdapter(org.eclipse.persistence.sessions.SessionEventAdapter)

Aggregations

SessionEvent (org.eclipse.persistence.sessions.SessionEvent)14 SessionEventAdapter (org.eclipse.persistence.sessions.SessionEventAdapter)14 Method (java.lang.reflect.Method)1 Vector (java.util.Vector)1 ClassDescriptor (org.eclipse.persistence.descriptors.ClassDescriptor)1 SerializedObjectPolicy (org.eclipse.persistence.descriptors.SerializedObjectPolicy)1 VersionLockingPolicy (org.eclipse.persistence.descriptors.VersionLockingPolicy)1 ExpressionBuilder (org.eclipse.persistence.expressions.ExpressionBuilder)1 DatabaseField (org.eclipse.persistence.internal.helper.DatabaseField)1 UnitOfWork (org.eclipse.persistence.sessions.UnitOfWork)1 DirectMapMappings (org.eclipse.persistence.testing.models.directmap.DirectMapMappings)1 Employee (org.eclipse.persistence.testing.models.employee.domain.Employee)1 DistributedServer (org.eclipse.persistence.testing.tests.distributedservers.DistributedServer)1