jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Guggisberg" <stefan.guggisb...@gmail.com>
Subject Re: Getting lock manager object
Date Wed, 23 May 2007 08:44:44 GMT
hi sridhar,

On 5/22/07, Sridhar Raman <sridhar.raman@gmail.com> wrote:
> I am designing a UI-based system that does the following:
> On going to a particular screen, the node is locked, and later, even if the
> user were to drift out the screen, and come back, he should be able to
> modify the node.
> But once the node is locked, other sessions shouldn't be allowed to enter
> the screen.
> To trap this, I check whether the node is locked every time a user enters
> the screen.  But the fault in this method is that the session holding the
> lock also is filtered away.  The workaround for this is to get the

try this:

Node n = ...;
if (n.isLocked() && n.getLock().getLockToken() != null) {
    // current session owns the lock in effect on node n


> lockmanager, and see whether the node is locked by the session or not.  But
> there seems to be no getLockManager() method implementation in jackrabbit.
> Is it there?  Or, is there another way of getting it?
> Thanks,
> Sridhar

View raw message