filters are executed in the order they are defined, so put the osiv
filter declaration before wicket.

-igor

On Thu, Aug 27, 2009 at 8:08 AM, Dane Laverty<danelave...@gmail.com> wrote:
> Thanks for the suggestion. I've actually already got OpenSessionInViewFilter
> in my web.xml, like so:
>
>    <filter>
>        <filter-name>wicket.filter</filter-name>
>
> <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
>        <init-param>
>            <param-name>applicationFactoryClassName</param-name>
>
> <param-value>org.apache.wicket.spring.SpringWebApplicationFactory</param-value>
>        </init-param>
>    </filter>
>
>    <filter>
>       <filter-name>open.hibernate.session.in.view</filter-name>
>
> <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
>    </filter>
>
>    <!-- Important! This filter mapping must come before Wickets! -->
>    <filter-mapping>
>       <filter-name>open.hibernate.session.in.view</filter-name>
>       <url-pattern>/*</url-pattern>
>    </filter-mapping>
>
>    <filter-mapping>
>        <filter-name>wicket.filter</filter-name>
>        <url-pattern>/*</url-pattern>
>    </filter-mapping>
>
> Is there anything else I need to do in order to make OSIV work? Everything
> I've read says it just needs to be placed in the web.xml.
>
> Thanks,
>
> Dane
>
>
>
> On Wed, Aug 26, 2009 at 7:58 PM, Igor Vaynberg <igor.vaynb...@gmail.com>wrote:
>
>> On Wed, Aug 26, 2009 at 6:30 PM, Dane Laverty<danelave...@gmail.com>
>> wrote:
>> > As I understand it, the LazyInitializationException is thrown because the
>> > Hibernate session closes after I call EntityDao.load(). But if that's the
>> > problem, then why should an LDM help? Won't the Hibernate session close
>> > again as soon as the LDM's load() is called?
>>
>> google OpenSessionInViewFilter, it keeps the hibernate session open
>> for the entire request.
>>
>> -igor
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to