diff --git a/src/org/gcube/vremanagement/vremodeler/impl/ServiceContext.java b/src/org/gcube/vremanagement/vremodeler/impl/ServiceContext.java index ab4db9b..81bc50f 100644 --- a/src/org/gcube/vremanagement/vremodeler/impl/ServiceContext.java +++ b/src/org/gcube/vremanagement/vremodeler/impl/ServiceContext.java @@ -20,7 +20,7 @@ public class ServiceContext extends GCUBEServiceContext{ protected void onReady() throws Exception{ logger.info("ready event invoked on " + this.getName()); - IStoDBUtil.initDB(ServiceContext.getContext().getStartScopes()[0]); + IStoDBUtil.initDB(ServiceContext.getContext().getStartScopes()[0].isInfrastructure()? ServiceContext.getContext().getStartScopes()[1]: ServiceContext.getContext().getStartScopes()[0]); }