Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Re: Struts 2.0.6, Spring 2.0.2, Hibernate 3.2 Issue

Dave Newton

2007-03-07

Replies:

--- Ravi Mangalagiri <ravi.mangalagiri@(protected)>
wrote:
> When I debug ..... looks like the
OpenSessionInViewFilter
> keeps the session open after the jsp is painted. I
don't
> understand why the session is not kept open around
the actual
> action method executed.

This is a Hibernate issue, not S2.

I am using the OpenSessionInView filter with no
difficulties;
the issues I have had in the past have been related to
either
how the DAOs are generated (I modified the default
HibernateTools
templates) and Hibernate configuration.

> <filter>
>   <filter-name>lazyLoadingFilter</filter-name>
>   <filter-class>
>  
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
>   </filter-class>
> </filter>

FWIW, you may want to consider definined both
sessionFactoryBeanName and singleSession
filter init-params.

> [filter-mappings]

Also FWIW, I have the viewSession filter at the
beginning of
my filter-mappings so I know it will wrap everything.
If you
define it after the struts filter that could cause a
problem.
(Note: I don't *know* that it would cause a problem.)

d.




____________________________________________________________________________________
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.