Allow the configuration service to start without a FileAccessService, as it is not always available (e.g. not in videobridge)

cusax-fix 5037
Boris Grozev 12 years ago
parent 31bfe95307
commit 2d240eb9ac

@ -49,20 +49,22 @@ public void start(BundleContext bundleContext)
{
FileAccessService fas
= ServiceUtils.getService(bundleContext, FileAccessService.class);
File useDatabaseConfig = fas.getPrivatePersistentFile(
".usedatabaseconfig",
FileCategory.PROFILE);
// BETA: if the marker file exists, use the database configuration
if (useDatabaseConfig.exists())
if (fas != null)
{
logger.info("Using database configuration store.");
this.cs = new JdbcConfigService(fas);
File useDatabaseConfig = fas.getPrivatePersistentFile(
".usedatabaseconfig",
FileCategory.PROFILE);
// BETA: if the marker file exists, use the database configuration
if (useDatabaseConfig.exists())
{
logger.info("Using database configuration store.");
this.cs = new JdbcConfigService(fas);
}
}
else
{
if (this.cs == null)
this.cs = LibJitsi.getConfigurationService();
}
bundleContext.registerService(
ConfigurationService.class.getName(),

Loading…
Cancel
Save