X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics%2Fsrc%2Forg%2Fsimantics%2FSimanticsPlatform.java;h=ba29a654a461370360c61ee399963363ff1e6e7f;hb=621bec7;hp=89a5d3dbd52df2e7376cafb836b9b7f7724145ec;hpb=969bd23cab98a79ca9101af33334000879fb60c5;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 89a5d3dbd..ba29a654a 100644
--- a/bundles/org.simantics/src/org/simantics/SimanticsPlatform.java
+++ b/bundles/org.simantics/src/org/simantics/SimanticsPlatform.java
@@ -39,8 +39,6 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.osgi.service.resolver.BundleDescription;
-import org.simantics.SimanticsPlatform.OntologyRecoveryPolicy;
-import org.simantics.SimanticsPlatform.RecoveryPolicy;
import org.simantics.databoard.Bindings;
import org.simantics.databoard.Databoard;
import org.simantics.datatypes.literal.Font;
@@ -199,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);
}
@@ -286,7 +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 does not match! platformBundle" + platformBundle.getName() + ".getHashCode()=" + platformBundle.getHashcode() + " existingBundle" + existingBundle.getName() + ".getHashCode()=" + 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);
}
}
@@ -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() {