JcrChildNode (List) with lazy=true throws an exception on modify (session closed)

4 views
Skip to first unread message

decebal

unread,
Sep 3, 2009, 5:39:34 PM9/3/09
to jcrom
Hello,

I think that I found a bug related to the lazy mechanism.
I used jcrom to modify an entity with a list property annotated with
JcrChildNode(lazy = true). My application uses spring-modules 0.9 to
do the management of the jcr sessions. In a few words, I found that
jcrom stores a reference of the session that loads the entity. When I
want to modify the entity (transactional method in my service layer -
each transaction creates a new jcr session) jcrom tries to use for the
lazy list property the same session that was used for load and which
is now closed.
What can you say about this?

Thanks,
Decebal

Wulf Rowek | THESISdigital

unread,
Sep 4, 2009, 2:48:33 AM9/4/09
to jc...@googlegroups.com
Hi,

this was an issue for us as well. no chance to use lazy over different
sessions.

We patched jcrom for our project and introduced a mechanism for lazy
loading like hibernate offer: a static jcrom.getCurrentSession() and
uses that in the lazy proxys.

Attached you will find a patch against the current trunk. There are also
some other changes included. sorry for the format changes, we used
another formatter in our project.

regards,
wulf

decebal schrieb:
--
THESIS digital GmbH | Wulf Rowek

Boxhagener Straße 76-78, 10245 Berlin
Aufgang 3, 4. Obergeschoss

Fon (030) 91 68 44-55
Fax (030) 91 68 44-99
Gsm (0170) 541 38 39
Mail ro...@thesisdigital.de
Web www.thesisdigital.de
seamantics_jcrom_changes.zip
Reply all
Reply to author
Forward
0 new messages