The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

rvauradkar (9) [Avatar] Offline
#1
When a collection is marked as lazy, is there some way to initialize the collection with zero elements? I have a business object that holds a lazy collection and I need to pass that business object back up to the Servlet layer. Anytime the client code using the business object acceeses the collection an exception is thrown as the session is not alive. The solution the book provides for this would be to copy the object into a value holder and pass it back. This would entail creating parallel class hierarchies that I want to avoid.
Thanks in advance,
Raj Auradkar