X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics%2Fsrc%2Forg%2Fsimantics%2FSimanticsPlatform.java;h=1754b00715bd2b6a6669479174845ee4ccb1d1cb;hb=1072d7dea84ab8007d7912cc7533c4d6e6a51948;hp=611cfa575843857d7f6b4e476d15641e6185d29d;hpb=23ea9f9235f428865dc4cd3bff6d3dd9e3174653;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics/src/org/simantics/SimanticsPlatform.java b/bundles/org.simantics/src/org/simantics/SimanticsPlatform.java index 611cfa575..1754b0071 100644 --- a/bundles/org.simantics/src/org/simantics/SimanticsPlatform.java +++ b/bundles/org.simantics/src/org/simantics/SimanticsPlatform.java @@ -197,13 +197,13 @@ public class SimanticsPlatform implements LifecycleListener { return application != null ? application : UUID.randomUUID().toString(); } - private Session setupDatabase(String databaseId, IProgressMonitor progressMonitor, RecoveryPolicy workspacePolicy, PlatformUserAgent userAgent) throws PlatformException { + private Session setupDatabase(String databaseDriverId, IProgressMonitor progressMonitor, RecoveryPolicy workspacePolicy, PlatformUserAgent userAgent) throws PlatformException { if (progressMonitor == null) progressMonitor = new NullProgressMonitor(); File dbLocation = Platform.getLocation().append("db").toFile(); ServerManager serverManager; try { - serverManager = ServerManagerFactory.create(databaseId, dbLocation.getAbsolutePath()); + serverManager = ServerManagerFactory.create(databaseDriverId, dbLocation.getAbsolutePath()); } catch (DatabaseException | IOException e) { throw new PlatformException("Failed to initialize Server Manager", e); } @@ -284,9 +284,9 @@ public class SimanticsPlatform implements LifecycleListener { // Check hash of transferable graph to know whether to update or not. if (platformBundle.getHashcode() == existingBundle.getHashcode()) continue; - System.out.println("Ontology hashcodes do not match: platform bundle=" - + platformBundle.getVersionedId() + ", hash=" + platformBundle.getHashcode() - + "; existing bundle=" + existingBundle.getVersionedId() + ", hash=" + existingBundle.getHashcode()); + //System.out.println("Ontology hashcodes do not match: platform bundle=" + // + platformBundle.getVersionedId() + ", hash=" + platformBundle.getHashcode() + // + "; existing bundle=" + existingBundle.getVersionedId() + ", hash=" + existingBundle.getHashcode()); reinstallTGs.put(platformBundle, existingBundle); } } @@ -399,7 +399,7 @@ public class SimanticsPlatform implements LifecycleListener { boolean changes = TransferableGraphs.hasChanges(readGraph(), oldResources, delta); endTransaction(); if (!changes) { - log.log(new Status(IStatus.INFO, Activator.PLUGIN_ID, "Nothing to merge for "+tg.toString())); + //log.log(new Status(IStatus.INFO, Activator.PLUGIN_ID, "Nothing to merge for "+tg.toString())); continue; } @@ -702,7 +702,7 @@ public class SimanticsPlatform implements LifecycleListener { * startup or null to resort to default measures * @throws PlatformException */ - public SessionContext startUp(String databaseId, IProgressMonitor progressMonitor, RecoveryPolicy workspacePolicy, + public SessionContext startUp(String databaseDriverId, IProgressMonitor progressMonitor, RecoveryPolicy workspacePolicy, OntologyRecoveryPolicy ontologyPolicy, boolean requireSynchronize, PlatformUserAgent userAgent) throws PlatformException { @@ -729,7 +729,7 @@ public class SimanticsPlatform implements LifecycleListener { VariableRepository.clear(); // 1. Assert there is a database at /db - session = setupDatabase(databaseId, progressMonitor, workspacePolicy, userAgent); + session = setupDatabase(databaseDriverId, progressMonitor, workspacePolicy, userAgent); TimeLogger.log("Database setup complete"); // 2. Assert all graphs, and correct versions, are installed to the database @@ -1014,9 +1014,9 @@ public class SimanticsPlatform implements LifecycleListener { return false; } - public void reconnect(String databaseId) throws Exception { + public void reconnect(String databaseDriverId) throws Exception { // Starts database server. - SimanticsPlatform.INSTANCE.startUp(databaseId, null, RecoveryPolicy.ThrowError, OntologyRecoveryPolicy.ThrowError, true, null); + SimanticsPlatform.INSTANCE.startUp(databaseDriverId, null, RecoveryPolicy.ThrowError, OntologyRecoveryPolicy.ThrowError, true, null); } private void dumpPlatformBundleState() {