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)
{
super.init(conf);
}
else
{
//check for messaging if we're not in hybrid mode
this.enableMessaging = getConfiguration().getBoolean("enable_messaging", false);
if(enableMessaging)
{
try
{
TurbineServices.getInstance().initService(MessagingService.SERVICE_NAME, conf);
Messenger.addMessageListener(this, CastorRegistryService.class.getName(), MessagingService.REGISTRY_UPDATE_SUBJECT);
}
catch(Exception e)
{
enableMessaging = false;
logger.warn("Messaging support has been disabled due to a failure to initialize the service or add a listener.");
}
}
}
try
{
setInit(true);
replaceImportedEntries = getConfiguration().getBoolean("replace.imported.entries");
// get the list of managed Registries in the Database
Iterator regIter = dbRegistries.keySet().iterator();
while (regIter.hasNext())
{
String key = (String)regIter.next();
Registry registry = (Registry) dbRegistries.get(key);
loadCache(key, registry);
}
}
catch (Throwable t)
{