jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r332285 - in /incubator/jackrabbit/trunk/contrib/jcr-server: server/src/java/org/apache/jackrabbit/webdav/jcr/lock/JcrActiveLock.java webdav/src/java/org/apache/jackrabbit/webdav/lock/AbstractActiveLock.java
Date Thu, 10 Nov 2005 13:13:43 GMT
Author: angela
Date: Thu Nov 10 05:13:29 2005
New Revision: 332285

URL: http://svn.apache.org/viewcvs?rev=332285&view=rev
Log:
return infinite timeout for jcr-locks, even if the expirationdate cannot be determined from
the lock.

Modified:
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/lock/JcrActiveLock.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/lock/AbstractActiveLock.java

Modified: incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/lock/JcrActiveLock.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/lock/JcrActiveLock.java?rev=332285&r1=332284&r2=332285&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/lock/JcrActiveLock.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/lock/JcrActiveLock.java
Thu Nov 10 05:13:29 2005
@@ -78,7 +78,7 @@
      */
     public boolean isExpired() {
         try {
-            return lock.isLive();
+            return !lock.isLive();
         } catch (RepositoryException e) {
             log.error("Unexpected error: " + e.getMessage());
             return false;
@@ -115,17 +115,19 @@
     }
 
     /**
-     * Always returns {@link DavConstants#UNDEFINED_TIMEOUT} for the timeout
-     * cannot be retrieved from the JCR lock.
+     * Since jcr locks do not reveal the time left until they expire, {@link #INFINITE_TIMEOUT}
+     * is returned. A missing timeout causes problems with Microsoft clients.
      * 
+     * @return Always returns {@link #INFINITE_TIMEOUT}
      * @see ActiveLock#getTimeout()
-     * @see DavConstants#UNDEFINED_TIMEOUT
      */
     public long getTimeout() {
-        return UNDEFINED_TIMEOUT;
+        return INFINITE_TIMEOUT;
     }
 
     /**
+     * Throws <code>UnsupportedOperationException</code>
+     *
      * @see ActiveLock#setTimeout(long)
      */
     public void setTimeout(long timeout) {

Modified: incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/lock/AbstractActiveLock.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/lock/AbstractActiveLock.java?rev=332285&r1=332284&r2=332285&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/lock/AbstractActiveLock.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/lock/AbstractActiveLock.java
Thu Nov 10 05:13:29 2005
@@ -48,7 +48,7 @@
         // timeout
         long timeout = getTimeout();
         if (!isExpired() && timeout != UNDEFINED_TIMEOUT) {
-            activeLock.addContent(XmlUtil.timeoutToXml(getTimeout()));
+            activeLock.addContent(XmlUtil.timeoutToXml(timeout));
         }
 
         // owner



Mime
View raw message