assertTrue(o1.isDestroyed());
scopeContext.stop();
}
public void testSessionIsolation() throws Exception {
WorkContext workContext = new WorkContextImpl();
HttpSessionScopeContainer scopeContext = new HttpSessionScopeContainer(workContext);
scopeContext.start();
SystemAtomicComponent atomicContext = createContext(scopeContext);
Object session1 = new Object();
workContext.setIdentifier(HttpSessionScopeContainer.HTTP_IDENTIFIER, session1);
SessionScopeInitDestroyComponent o1 =
(SessionScopeInitDestroyComponent) scopeContext.getInstance(atomicContext);
assertTrue(o1.isInitialized());
Object session2 = new Object();
workContext.setIdentifier(HttpSessionScopeContainer.HTTP_IDENTIFIER, session2);
SessionScopeInitDestroyComponent o2 =
(SessionScopeInitDestroyComponent) scopeContext.getInstance(atomicContext);
assertNotSame(o1, o2);
scopeContext.onEvent(new HttpSessionEnd(this, session1));