You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Michael Dürig <md...@apache.org> on 2013/09/11 11:19:18 UTC
Re: svn commit: r1518048 - in /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr:
NodeImpl.java delegate/NodeDelegate.java lock/LockImpl.java lock/LockManagerImpl.java
lock/LockOperation.java
Jukka,
On 28.8.13 3:33 , jukka@apache.org wrote:
> Author: jukka
> Date: Wed Aug 28 01:33:21 2013
> New Revision: 1518048
>
> URL: http://svn.apache.org/r1518048
> Log:
> OAK-150: Basic JCR LockManager support
...
>
> @Override
> + public boolean isRefresh() {
> + return true;
> + }
> +
What is the reason for returning true here? Only operations that refresh
the session should return true here. If returning true is necessary
here, you might be exploiting a side effect and we should try to come up
with a more explicit solution.
Michael
Re: svn commit: r1518048 - in /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr:
NodeImpl.java delegate/NodeDelegate.java lock/LockImpl.java lock/LockManagerImpl.java
lock/LockOperation.java
Posted by Michael Dürig <md...@apache.org>.
On 11.9.13 3:38 , Jukka Zitting wrote:
> Hi,
>
> On Wed, Sep 11, 2013 at 5:19 AM, Michael Dürig <md...@apache.org> wrote:
>> What is the reason for returning true here? Only operations that refresh the
>> session should return true here. If returning true is necessary here, you
>> might be exploiting a side effect and we should try to come up with a more
>> explicit solution.
>
> The rationale behind this is that the lock operations (since they are
> inherently cross-session ones) always refresh the session to the
> latest state (see LockOperation.perform). It's not fully correct from
> a strict locking semantics point of view, but achieves the kind of
> "fuzzy locking" functionality I was aiming at.
Makes sense, thanks for clarifying. I initially didn't spot the
overloaded perform(NodeDelegate), which the initial perform delegates to.
Michael
>
> BR,
>
> Jukka
>
Re: svn commit: r1518048 - in /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr:
NodeImpl.java delegate/NodeDelegate.java lock/LockImpl.java
lock/LockManagerImpl.java lock/LockOperation.java
Posted by Jukka Zitting <ju...@gmail.com>.
Hi,
On Wed, Sep 11, 2013 at 5:19 AM, Michael Dürig <md...@apache.org> wrote:
> What is the reason for returning true here? Only operations that refresh the
> session should return true here. If returning true is necessary here, you
> might be exploiting a side effect and we should try to come up with a more
> explicit solution.
The rationale behind this is that the lock operations (since they are
inherently cross-session ones) always refresh the session to the
latest state (see LockOperation.perform). It's not fully correct from
a strict locking semantics point of view, but achieves the kind of
"fuzzy locking" functionality I was aiming at.
BR,
Jukka