hi ruchi

On 5/4/07, ruchi goel <[EMAIL PROTECTED]> wrote:
Hi,
   I locked a node in a session where lock is session scoped. Now I
logout from the session without unlocking .  When I again login by same
user  (or by any other user)  , the  node.isLocked () returns true.

Via jcr-mapping PersistenceManager , I am not able to do save, remove
because checkIfNodeLocked throws back exception.


As per jcr specs , the lock should expire along with the session but
that is not happening.
Even if I logout explicitly, rerun the repository , I still see
jcr:lockOwner property value set to "superuser" who locked the node.
I am using RMI for accessing repsoitory.
Am I missing something ?


i quickly ran a test using the following code snippet:

<code>
Session s = r.login(new SimpleCredentials("johndoe",
"".toCharArray()), wspName);
Node n = s.getRootNode().getNode("lockTest");

Lock lck = n.lock(true, true); // session-scoped, deep lock
tn.setProperty("blah", "blah");
s.logout();

Session s1 = r.login(new SimpleCredentials("johndoe",
"".toCharArray()), wspName);

System.out.println("Lock#isLive=" + lck.isLive());
System.out.println("Node#isLocked=" +
s1.getRootNode().getNode("lockTest").isLocked());
</code>

the (correct) console output is:

Lock#isLive=false
Node#isLocked=false


i am not familiar with the jcr-mapping code. i assume your issue is either
jcr-mapping or jcr-rmi related.

please create a jira issue and attach a simple test case (if possible).

cheers
stefan


help appreciated.

Thanks,
Ruchi




Reply via email to