-
1. Re: Session replication does not copy session attributes
brian.stansberry Feb 9, 2006 5:48 PM (in response to tremalnaik)This is a bug.
As a workaround (haven't tried this but should work):Manager manager = request.getContext().getManager(); Session[] sessions = manager.findSessions(); for (int j =0; j < sessions.length; j++) { sessions[j] = manager.findSession(sessions[j].getId()); }
The findSession(String) call causes the local session object to be updated from the cache. This step is skipped in findSessions(), which is the bug. -
2. Re: Session replication does not copy session attributes
ben.wang Feb 10, 2006 12:13 AM (in response to tremalnaik)While this is a bug that we need to fix. I am not sure if you to obtain a session list is a good idea though since this is Tomcat specific.
-Ben -
3. Re: Session replication does not copy session attributes
tremalnaik Feb 10, 2006 4:56 AM (in response to tremalnaik)Thanks to bstansberry, his tip worked nicely.
To ben.wang: I'm using the code above into a Tomcat Valve, so this solution doesn't add more specificity to my application. I'm managing to keep all Jboss/Tomcat specific code into a well defined package. Using interfaces and patterns should give me the flessibility to deal with a different deployment environment. I have some clients who don't like Open Source solutions like Jboss, so they may ask for a Web Sphere version of my application, but even IBM now is using Tomcat as web tier of his AS. So...
Thanks to everybody