Thread:
 web.xml filters don't work 
 mschipperheyn   10 Sep 2005, 19:53 
 Spring's OpenSessionInViewFilter 
 rlubbat   13 Sep 2005, 03:46 
 Re: web.xml filters don't work 
 mgj2   13 Sep 2005, 11:44 
 Re: web.xml filters don't work 
 pksiv   14 Oct 2005, 13:27 
 ThreadLocal Sessions and jsp:include 
 rbellia   25 Oct 2005, 11:41 

Comment
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
From: mschipperheyn (10 Sep 2005, 19:53) Replies: 4, Views: 40983
Subject: web.xml filters don't work
I think too much emphasis is placed on using servlet filters to 
implement this pattern. When you use includes etc, you will have 
multiple sessions on a single request, basically rendering this 
pattern **useless**. You would expect a filter to surround an entire 
request but it doesn't and as far as I can see this can't be 
implemented this way in a reliable way.

In Struts the only right way to implement this pattern is by extending 
the requestprocessor and closing the hibernate session after the 
action has been processed (process method in the request processor). 
For other frameworks it will be much the same. 

Marc
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
© Copyright 2006, Red Hat Middleware, LLC. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc. [Privacy Policy]