ggolden     2002/09/27 10:16:35

  Modified:    src/java/org/apache/jetspeed/services/psmlmanager
                        CastorPsmlManagerService.java
  Log:
  When a document is saved, it is updated into the cache
  
  Revision  Changes    Path
  1.30      +10 -2     
jakarta-jetspeed/src/java/org/apache/jetspeed/services/psmlmanager/CastorPsmlManagerService.java
  
  Index: CastorPsmlManagerService.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/psmlmanager/CastorPsmlManagerService.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- CastorPsmlManagerService.java     23 Sep 2002 08:42:44 -0000      1.29
  +++ CastorPsmlManagerService.java     27 Sep 2002 17:16:35 -0000      1.30
  @@ -516,7 +516,15 @@
           File file = new File(base, path);
           String fullpath = file.getAbsolutePath();
   
  -        return saveDocument(fullpath, doc);
  +        boolean ok = saveDocument(fullpath, doc);
  +        
  +        // update it in cache
  +        synchronized (documents)
  +        {
  +            documents.put(fullpath, new WeakReference(profile));
  +        }
  +        
  +        return ok;
       }
   
       /** Save the PSML document on disk, using its name as filepath
  
  
  

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

Reply via email to