use of org.eclipse.persistence.testing.models.employee.relational.EmployeeSystem in project eclipselink by eclipse-ee4j.
the class ManualVerificationModel method addRequiredSystems.
@Override
public void addRequiredSystems() {
addRequiredSystem(new MappingSystem());
addRequiredSystem(new EmployeeSystem());
addRequiredSystem(new InheritanceSystem());
addRequiredSystem(new InsuranceSystem());
addRequiredSystem(new ReadOnlySystem());
}
use of org.eclipse.persistence.testing.models.employee.relational.EmployeeSystem in project eclipselink by eclipse-ee4j.
the class MultipleClientBrokersTestModel method reset.
/**
* Because this changes the database it must put it back to a valid state.
*/
@Override
public void reset() {
getExecutor().removeConfigureSystem(new EmployeeSystem());
getExecutor().getSession().getIdentityMapAccessor().initializeAllIdentityMaps();
}
use of org.eclipse.persistence.testing.models.employee.relational.EmployeeSystem in project eclipselink by eclipse-ee4j.
the class SessionsXMLBasicTestModel method setup.
@Override
public void setup() {
originalSession = getSession();
if ((getSession().getPlatform() instanceof TimesTenPlatform)) {
throw new TestProblemException("This model is not intended for TimesTen databases.");
}
XMLSessionConfigLoader xmlLoader = new XMLSessionConfigLoader("org/eclipse/persistence/testing/models/sessionsxml/sessions.xml");
// Do not login here, login later on.
newXMLSession = SessionManager.getManager().getSession(xmlLoader, "EmployeeSession", getClass().getClassLoader(), false, true);
newXMLSession.setSessionLog(originalSession.getSessionLog());
newXMLSession.setLogLevel(originalSession.getLogLevel());
((DatabaseSession) originalSession).logout();
newXMLSession.getLogin().setPlatform(originalSession.getLogin().getPlatform());
newXMLSession.getLogin().setDriverClassName(originalSession.getLogin().getDriverClassName());
newXMLSession.getLogin().setConnectionString(originalSession.getLogin().getConnectionString());
newXMLSession.getLogin().setUserName(originalSession.getLogin().getUserName());
newXMLSession.getLogin().setEncryptedPassword(originalSession.getLogin().getPassword());
((DatabaseSession) newXMLSession).login();
getExecutor().setSession(newXMLSession);
new EmployeeSystem().createTables((DatabaseSession) newXMLSession);
new EmployeeSystem().populate((DatabaseSession) newXMLSession);
}
use of org.eclipse.persistence.testing.models.employee.relational.EmployeeSystem in project eclipselink by eclipse-ee4j.
the class DatabaseSessionAttemptLoginTwiceTest method test.
@Override
public void test() {
EmployeeSystem employeeSystem = new EmployeeSystem();
DatabaseLogin databaseLogin = (DatabaseLogin) getSession().getLogin().clone();
employeeSystem.project.setLogin(databaseLogin);
DatabaseSession newSession = employeeSystem.project.createDatabaseSession();
newSession.login();
try {
newSession.login();
} catch (org.eclipse.persistence.exceptions.EclipseLinkException e) {
this.caughtException = e;
} finally {
newSession.logout();
}
}
use of org.eclipse.persistence.testing.models.employee.relational.EmployeeSystem in project eclipselink by eclipse-ee4j.
the class DatabaseSessionLogoutThenLoginTest method test.
@Override
public void test() {
EmployeeSystem employeeSystem = new EmployeeSystem();
DatabaseLogin databaseLogin = (DatabaseLogin) getSession().getLogin().clone();
employeeSystem.project.setLogin(databaseLogin);
DatabaseSession newSession = employeeSystem.project.createDatabaseSession();
newSession.login();
try {
newSession.logout();
newSession.login();
} catch (org.eclipse.persistence.exceptions.EclipseLinkException e) {
this.caughtException = e;
} finally {
if (newSession.isConnected()) {
newSession.logout();
}
}
}
Aggregations