Has anyone been able to get a Struts / Hibernate app to work nicely with
Lazy Initialization?

Whenever I have things with Lazy set to true I'm getting a "Failed to lazily
initialize a collection" Exception.

The easiest way to do this is to use the "open session in view" pattern.

If you're using Spring to manage your Hibernate SessionFactory, you can just pop the OpenSessionInViewFilter in web.xml and go. The only thing to watch out for is that any writes back to the database need to be within transactions.

-- Bill
--
Bill Schneider
Chief Architect

Vecna Technologies, Inc.
5004 Lehigh Road, Suite B
College Park, MD 20740
[EMAIL PROTECTED]
t: 301-864-7594
f: 301-699-3180

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to