Because of a "limitation" (which is rather a bug) of Hibernate 4, I need
to switch to an open-session-in-view pattern in struts2
I was hoping that setting the right spring configuration in my web.xml
would do the trick (see below)
The session still dies before the view layer (ognl) has any chance to
lazy fetch from the database.
Is there anything struts-specific to make OSIV work?
I use Spring 3 and the EntityManager is from my JPA provider (hibernate).
- Mounir
<filter>
<filter-name>OpenEntityManagerInViewFilter</filter-name>
<filter-class>
org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter
</filter-class>
<init-param>
<param-name>entityManagerFactory</param-name>
<param-value>entityManagerFactory</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>OpenEntityManagerInViewFilter</filter-name>
<url-pattern>/public/*</url-pattern>
</filter-mapping>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org