jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edgar Poce" <edgarp...@gmail.com>
Subject Re: running JCA connector
Date Tue, 04 Jul 2006 13:46:41 GMT
hi Giota,

On 7/4/06, Giota Karadimitriou <Giota.Karadimitriou@eurodyn.com> wrote:
> Hello,
> 1)       When  creating Node a, session.save() has been called but
> changes have not been persisted because the end of the transaction
> has not yet been reached (the end of the transaction will take place at
> the end of createStructure method). Therefore the node 'a' in reality
> does not exist.
> 2)       When trying to create Node b with Node a as parent, the code
> fails at
> parentNode = rn.getNode(parentPath.substring(1));
>  with a PathNotFoundException in resolvePath method of
> HierarchyManagerImpl.

 IMHO that's the expected behaviour. I agree that it throws the
exception because the session bean Manager2 is creating a new jcr
session on each call, it causes that on the second call the new jcr
Session doesn't see the transient changes made by the previous one.

I think one possible fix is to create the jcr Session in Manager1 and
pass it as a parameter to Manager2.

>      The above code used to work without the jca changes I applied from
> trunk + the diff patch of 463.
>      I think changes of 463 (Uncommitted changes or connection leak with
> Container Managed Transactions) (diff patch) have something to do with
> it
>      as the session handle close is now bound to the *active*
> transaction.

Not sure, but I think that it probably worked before because you
probably closed the connection in Manager2 on each call, and on the
new call you got the same connection from the pool with the transient
changes in it because the session wasn't cleaned up correctly when it
was put back to the pool (JCR-461).


>      Just thought to report it and in the meantime I will see if I can
> provide more feedback/test case etc.
> A workaround for me currently is to create 'a' and 'b' together on a
> single call to createNode method but there is some additional
> information I need (from a database) which forces me to do it in 2
> steps.
>      Edgar and rest if you can provide me with some feedback please do.
> Thank you.
>     Regards
>     Giota

View raw message