public void reset() { if (serverSession != null && serverSession.isConnected()) { serverSession.logout(); // If session is logged in, log it out SessionManager.getManager().getSessions().remove(serverSession); serverSession = null; } }
public void test() { XMLSessionConfigLoader loader = new XMLSessionConfigLoader( "org/eclipse/persistence/testing/models/sessionsxml/XMLSchemaServerSession.xml"); // log in the session serverSession = (ServerSession) SessionManager.getManager() .getSession( loader, "ServerSession", getClass().getClassLoader(), false, true); // don't refresh the session }