You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by bu...@apache.org on 2005/03/17 03:07:10 UTC

DO NOT REPLY [Bug 34047] New: - A request of the LockDiscoveryProperty on a locked resource returns no owner

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34047>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34047

           Summary: A request of the LockDiscoveryProperty on a locked
                    resource returns no owner
           Product: Slide
           Version: Nightly
          Platform: Other
        OS/Version: HP-UX
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Stores
        AssignedTo: slide-dev@jakarta.apache.org
        ReportedBy: paul_manofsky@stercomm.com


Found in:  WCK 2.2pre1

I don't know if the problem I am experiencing is a bug, or by design.   I am 
using Eclipse as a client and have created a custom store to 
retreive/lock/edit resources in a database.   I can lock and retreive the 
resources without any problem.  Although, when I try to retreive a resource 
that has been locked, I want to display a message stating that the resource is 
locked and show the owner of the lock.   I can retreive the 
LockDiscoveryProperty object, but the owner is missing.  Here is
what I have found within the WCK source.  

The WebdavStoreAdapter class (specifically the inner class 
TransactionId.enumerateLocks(WebdavStoreAdapter.java:892) calls my custom 
store to get the lock on the specified resource.  The 
WebdavStoreLockExtension.Lock[] that is returned from my store
is used to create a NodeLock. 

for (int i = 0; i < ids.length; i++) {
     WebdavStoreLockExtension.Lock lockId = ids[i];
     NodeLock lock = new NodeLock(lockId.getId(), uri.toString(),              
lockId.getSubject(), "/actions/write", lockId.getExpirationDate(), 
lockId.isInheritable(), lockId.isExclusive());

     locks.add(lock);
}

The LockDiscoveryProperty obj will then use this NodeLock obj to display the 
owner.

I would assume that the owner would be the 'subject' from the 
WebdavStoreLockExtension.Lock.  However, it turns out that the owner from the 
LockDiscoveryProperty obj is populated from the 'ownerInfo' field of
the NodeLock. From the developer comments in the NodeLock class I found the 
following definitions:

subject -is defined as the user who is the lock owner.
ownerInfo - is defined as contacting information about the lock owner.

I verified this by doing a setOwnerInfo( name ) on the NodeLock just after it 
was created.   After doing that, the owner then showed up in the 
LockDiscoveryProperty obj.   

>From the developer comments, I would assume that the 'subject' should be used 
as the owner, not the ownerInfo.  My apologies if I am incorrect.   

The constructor used to create the NodeLock sets the ownerInfo field to null 
which propogates to the null owner in the LockDiscoveryProperty .  I am not 
sure if the constructor needs to be changed to set the ownerInfo, or if the 
LockDiscoveryProperty is referencing the ownerInfo field and it should really 
be using the 'subject' field.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org