From: Ate D. (JIRA) <ji...@co...> - 2007-06-26 21:14:14
|
[ http://jira.codehaus.org/browse/JETTY-377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_100640 ] Ate Douma commented on JETTY-377: --------------------------------- Although through session.getAttributeNames() someone could get to this "private" attribute and thus theoretically even remove it, they're self to blame then I guess. So for me its a fine solution too. > Support HttpSession proxying to allow portlet bridges to provide "scoped" session view to dispatched servlets > ------------------------------------------------------------------------------------------------------------- > > Key: JETTY-377 > URL: http://jira.codehaus.org/browse/JETTY-377 > Project: Jetty > Issue Type: Improvement > Components: Servlet > Affects Versions: 6.1.4 > Environment: JDK 1.5, Jetty 6.1.4, Jetspeed-2.1.1-dev > Reporter: Ate Douma > Assignee: Greg Wilkins > Attachments: patch.txt, patch2.txt > > > Apache Portals Bridges provides a neat solution (I wrote myself ;) ) to "scope" HttpSession attributes for a specific Portlet window when it dispatches to a servlet. > See: http://svn.apache.org/viewvc/portals/bridges/trunk/common/src/java/org/apache/portals/bridges/util/ServletPortletSessionProxy.java?view=markup > This solution is needed for transparent "bridging" of existing web development frameworks like Struts, or Wicket (which I'm currently working on) to portlets. > So far, this proxy solution works like a charm and I've tested it successfully on Tomcat, Websphere, WebLogic and GlassFish. > Only with Jetty it fails :( > The reason is simple: AbstractSessionManager uses direct type casting of a provided HttpSession parameter to its inner Session class, so when a proxied version is passed in a ClassCastException is the result. > But the solution is also very simple, small and completely non-intrusive and I've attached a patch for it. > It adds a new interface JettySession with one method: JettySession getJettySession() and applies it to AbstractSessionManager.Session. > That interface allows Jetty to always get back to its own/underlying Session class. > With this patch applied, I can now run Jetspeed-2.1.1 (trunk) fully on Jetty 6.1.4 and we're planning to provide a Jetty based Jetspeed-2 demo installer with the imminent 2.1.1 release including neat hot deployment of war support.. But we will need to provide our own patched version of Jetty until this issue can be resolved. > (NB: I'm also a Jetspeed-2 committer) > So I would very much appreciate if you can review and consider this patch for inclusion in the next version of Jetty so we won't need to use a patched version of Jetty for running Jetspeed-2. > Regards, > Ate -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |