Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Accessing a lazy-field of a managed entity in another thread

På torsdag 26. februar 2015 kl. 16:05:44, skrev andrei ilitchev <andrei.ilitchev@xxxxxxxxxx>:
That's correct - instantiating a lazy collection on a managed entity should not be done in another thread.
However I believe that in Eclipselink that could be done on a detached entity (though the spec doesn't require support for lazy attributes instantiation on detached entity)
 
Thanks!
One of the reasons we switched to EL from Hibernate was EL's excellent support for lazy-fields, also on detached entities.
 
What I'm afraid of is resource-leaks (Connections, ResultSets, PreparedStatements). Will EL clean up correctly when passing a detached entity to another (or several) thread and that thread instantiates a lazy-collection (creating a read-only connection)?
 
--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
 

Back to the top