ozeigermann    2004/02/20 01:46:41

  Modified:    src/stores/org/apache/slide/store/txfile
                        XMLResourceDescriptor.java
               src/stores/slidestore/file UriProperties.java
  Log:
  Fixed problem with locks in tx file store:

  - Owner info now is stored

  - Date format has been changed in order to save dates having years later than 2070.

    Previous to this fix 2072 has been stored as 72 and interpreted as 1972 which made 
fresh locks 

    expired immediately

  

  
  Revision  Changes    Path
  1.7       +6 -4      
jakarta-slide/src/stores/org/apache/slide/store/txfile/XMLResourceDescriptor.java
  
  Index: XMLResourceDescriptor.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/stores/org/apache/slide/store/txfile/XMLResourceDescriptor.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XMLResourceDescriptor.java        11 Feb 2004 11:30:22 -0000      1.6
  +++ XMLResourceDescriptor.java        20 Feb 2004 09:46:41 -0000      1.7
  @@ -340,7 +340,9 @@
                   boolean aInheritable = new 
Boolean(aChild.getAttributeValue("inheritance")).booleanValue();
                   boolean aNegative = new 
Boolean(aChild.getAttributeValue("exclusive")).booleanValue();
                   String aLockId = aChild.getAttributeValue("lockId");
  -                locks.addElement(new NodeLock(aLockId, uri, aSubject, aType, 
aDateExpiration, aInheritable, aNegative));
  +                String ownerInfo = aChild.getAttributeValue("owner");
  +
  +                locks.addElement(new NodeLock(aLockId, uri, aSubject, aType, 
aDateExpiration, aInheritable, aNegative, ownerInfo));
               }
           } catch (Exception e) {
               e.printStackTrace();
  
  
  
  1.10      +7 -5      jakarta-slide/src/stores/slidestore/file/UriProperties.java
  
  Index: UriProperties.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/stores/slidestore/file/UriProperties.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- UriProperties.java        11 Feb 2004 11:30:23 -0000      1.9
  +++ UriProperties.java        20 Feb 2004 09:46:41 -0000      1.10
  @@ -65,7 +65,7 @@
       //----------------------------------------
       public UriProperties(String aRootPath,Uri aUri) throws ServiceAccessException {
           super(aRootPath,aUri);
  -        dateFormat=new SimpleDateFormat();
  +        dateFormat=new SimpleDateFormat("MM/dd/yyyy HH:mm:ss Z");
           File aFile=getFile(aUri);
           if (aFile.exists()) {
               init(aFile);
  @@ -210,6 +210,7 @@
               
aElementLock.setAttribute("inheritance",booleanToString(aLock.isInheritable()));
               
aElementLock.setAttribute("exclusive",booleanToString(aLock.isExclusive()));
               aElementLock.setAttribute("lockId",aLock.getLockId());
  +            aElementLock.setAttribute("owner",aLock.getOwnerInfo());
               aElementLocks.addContent(aElementLock);
           }
           return aElementLocks;
  @@ -406,6 +407,7 @@
                   boolean aInheritable=new 
Boolean(aChild.getAttributeValue("inheritance")).booleanValue();
                   boolean aNegative=new 
Boolean(aChild.getAttributeValue("exclusive")).booleanValue();
                   String aLockId=aChild.getAttributeValue("lockId");
  +
                   locks.addElement(
                       new 
NodeLock(aLockId,object.getUri(),aSubject,aType,aDateExpiration,aInheritable,aNegative)
                   );
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to