You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Christina Kaskoura <ch...@eurodyn.com> on 2010/04/21 10:48:08 UTC
Lock token not being added to session
Hello.
I am using Jackrabbit 1.6.1 and I have the following problem:
I am locking a node (setting isSessionScoped to false) and store the
lock token in order to be able to later modify/unlock the node from
another session. The first time I login to the repository everything
works fine and I am able to add the stored lock token to a new session
and modify the node. However, when I close this session (with
session.logout()) and open a new one I am not able to add the lock token
to the new session (I call addLockToken on the new session and right
after this call the session does not hold any lock tokens, so the lock
token is not being added). If at the time when I first add the lock
token to a session I have also another session open which never closes
everything works fine. I am using Glassfish v3 application server both
for the jackrabbit repository and the application that uses it.
Has anybody had similar problems or knows what causes this behavior?
Thank you,
Christina
Re: Lock token not being added to session
Posted by Christina Kaskoura <ch...@eurodyn.com>.
Angela Schreiber wrote:
>
>
>> I am using Jackrabbit 1.6.1 and I have the following problem:
>> I am locking a node (setting isSessionScoped to false) and store the
>> lock token in order to be able to later modify/unlock the node from
>> another session. The first time I login to the repository everything
>> works fine and I am able to add the stored lock token to a new
>> session and modify the node. However, when I close this session (with
>> session.logout()) and open a new one I am not able to add the lock
>> token to the new session (I call addLockToken on the new session and
>> right after this call the session does not hold any lock tokens, so
>> the lock token is not being added).
>
> before calling logout on the initial lock holding session,
> you should remove the lock tokens it helds. otherwise the
> tokens cannot be added to another session. at least not in
> the default implementation... in other words: you need the
> lock tokens to be transferred (moved) to the other session.
>
> regards
> angela
>
Thanks for your answer. I tried removing all lock tokens before closing
each session and it works without any problems.
I'm just being curious now but would you also happen to know why keeping
a session open seemed to bypass this problem?
Thanks again,
Christina
Re: Lock token not being added to session
Posted by Angela Schreiber <an...@day.com>.
> I am using Jackrabbit 1.6.1 and I have the following problem:
> I am locking a node (setting isSessionScoped to false) and store the
> lock token in order to be able to later modify/unlock the node from
> another session. The first time I login to the repository everything
> works fine and I am able to add the stored lock token to a new session
> and modify the node. However, when I close this session (with
> session.logout()) and open a new one I am not able to add the lock token
> to the new session (I call addLockToken on the new session and right
> after this call the session does not hold any lock tokens, so the lock
> token is not being added).
before calling logout on the initial lock holding session,
you should remove the lock tokens it helds. otherwise the
tokens cannot be added to another session. at least not in
the default implementation... in other words: you need the
lock tokens to be transferred (moved) to the other session.
regards
angela