i thought it could be the cookie handling which is sometimes bad. i mean: 1) new request 2) getSession() 3) tomcat generate a session id 4) this id is sent to the client and stored in a cookie 5) getSession() 6) the client sent with the request the previous session id 7) etc
so if the sent session id by the client is not a session id created by tomcat it will create another session. what i think is the default cookie policy of http client (the lib used to simulate a client in cdi tcks) can maybe corrupt some characters...sometimes. That's why it fails sometimes. Setting the policy to browser compatibility instead of the default one which is a deprecated mode (sorry i forgot the exact ref :() could fix the issue...which is not an issue if it is the correct cause ;). @David: what do you think? - Romain 2011/11/3 David Jencks <[email protected]> > Hi Romain, > > I think I might have encountered this working with geronimo + jcdi tck. > If it's the same problem, the test worked OK run by itself but usually > failed when run in a group. When I investigated the harness appeared to be > arbitrarily creating more http sessions when running in a group than when > running just the one test, in particular it wiped out the first session > from the first request before the second, causing the scoped object to get > lost. I couldn't figure out why the session creation behavior was > different in the two situations. > > hope you have better luck.... > david jencks > > On Nov 2, 2011, at 6:14 PM, Romain Manni-Bucau wrote: > > > Hi, > > > > it seems this tck test can fail depending of the build: > > > > *Failed tests: > > > testSessionContextSharedBetweenServletRequestsInSameHttpSession(org.jboss.jsr299.tck.tests.context.session.SessionContextTest): > > 500 Internal Server Error for > > > http://localhost:33720/org.jboss.jsr299.tck.tests.context.session.SessionContextTest/IntrospectSession* > > > > > > any idea? it just test that when you call twice a servlet you get the > > same session scoped cdi bean. > > > > the error is > > * > > * > > * > > javax.enterprise.context.ContextNotActiveException: WebBeans context with > > scope type annotation @SessionScoped does > > not exist within current thread > > at > > > org.apache.webbeans.container.BeanManagerImpl.getContext(BeanManagerImpl.java:341) > > at > > > org.apache.webbeans.container.InjectableBeanManager.getContext(InjectableBeanManager.java:115) > > * > > > > - Romain > >
