portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jf...@apache.org
Subject cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/services/registry HybridRegistryService.java
Date Fri, 23 Jul 2004 00:29:29 GMT
jford       2004/07/22 17:29:29

  Modified:    src/java/org/apache/jetspeed/services/registry
                        HybridRegistryService.java
  Log:
  Fixed missing security entries issue
  
  Revision  Changes    Path
  1.11      +29 -10    jakarta-jetspeed/src/java/org/apache/jetspeed/services/registry/HybridRegistryService.java
  
  Index: HybridRegistryService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/registry/HybridRegistryService.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- HybridRegistryService.java	22 Jul 2004 00:38:40 -0000	1.10
  +++ HybridRegistryService.java	23 Jul 2004 00:29:29 -0000	1.11
  @@ -62,6 +62,19 @@
        */
       public synchronized void init(ServletConfig conf) throws InitializationException
       {
  +        
  +        // get the list of managed Registries in the Database
  +        // need to do this first before init of Castor service
  +        // castor will start RegistryWatcher
  +        Iterator iterator = getConfiguration().getKeys("database.default");
  +        while (iterator.hasNext())
  +        {
  +            String key = (String)iterator.next();
  +            String name = key.substring(key.lastIndexOf(".") + 1);                
  +            Registry registry = createRegistry(name);
  +            dbRegistries.put(name, registry);
  +        }
  +        
           hybrid = getConfiguration().getBoolean("hybrid");        
           if (hybrid)
           {
  @@ -75,15 +88,13 @@
               replaceImportedEntries = getConfiguration().getBoolean("replace.imported.entries");
   
               // get the list of managed Registries in the Database            
  -            Iterator iterator = getConfiguration().getKeys("database.default");
  -            while (iterator.hasNext())
  +            Iterator regIter = dbRegistries.keySet().iterator();
  +            while (regIter.hasNext())
               {
  -                String key = (String)iterator.next();
  -                String name = key.substring(key.lastIndexOf(".") + 1);                
  -                Registry registry = createRegistry(name);
  -                dbRegistries.put(name, registry);
  -                loadCache(name, registry);
  -            }                
  +                String key = (String)regIter.next();
  +                Registry registry = (Registry) dbRegistries.get(key);
  +                loadCache(key, registry);
  +            }
           }
           catch (Throwable t)
           {
  @@ -362,7 +373,15 @@
                   registry.addLocalEntry((RegistryEntry)pe);
               }            
           }
  -        
  +    }
  +    
  +    protected void refresh(String regName)
  +    {
  +        boolean usesDb = dbRegistries.containsKey(regName);
  +        if(!usesDb)
  +        {
  +            super.refresh(regName);
  +        }
       }
       
       /** Late init method from Turbine Service model */
  
  
  

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


Mime
View raw message