Skip to content

Commit

Permalink
Bump up OrientDB, wicket and etc. Disable BPM and tours temporary
Browse files Browse the repository at this point in the history
  • Loading branch information
PhantomYdn committed Feb 8, 2024
1 parent cbe6c7a commit b39de72
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public OrienteerHazelcastPlugin() {
super();
}

/*
@Override
protected HazelcastInstance configureHazelcast() throws FileNotFoundException {
Expand All @@ -25,7 +26,7 @@ protected HazelcastInstance configureHazelcast() throws FileNotFoundException {
hazelcastConfig.setClassLoader(this.getClass().getClassLoader());
}
return Hazelcast.getOrCreateHazelcastInstance(hazelcastConfig);
}
}*/


}
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package org.orienteer.core.service;

import com.orientechnologies.orient.core.command.script.OScriptManager;
import com.orientechnologies.orient.core.config.OGlobalConfiguration;
import com.orientechnologies.orient.core.db.ODatabasePool;
import com.orientechnologies.orient.core.db.ODatabaseSession;
import com.orientechnologies.orient.core.db.OrientDB;
import com.orientechnologies.orient.core.db.OrientDBConfig;
import com.orientechnologies.orient.core.db.OrientDBConfigBuilder;
import com.orientechnologies.orient.core.db.OrientDBInternal;
import com.orientechnologies.orient.core.db.document.ODatabaseDocument;
import com.orientechnologies.orient.core.metadata.security.OUser;
Expand Down Expand Up @@ -64,7 +67,10 @@ public void onAfterServerStartupAndActivation(OrientDbWebApplication app)
throws Exception {
IOrientDbSettings settings = app.getOrientDbSettings();
OrientDB orientDB = app.getServer().getContext();
if (orientDB.createIfNotExists(settings.getDbName(), settings.getDbType())) {
if (orientDB.createIfNotExists(settings.getDbName(), settings.getDbType(),
OrientDBConfig.builder()
.addConfig(OGlobalConfiguration.CREATE_DEFAULT_USERS, true)
.build())) {
try(ODatabaseSession session = orientDB.open(settings.getDbName(), OrientDbSettings.ADMIN_DEFAULT_USERNAME, OrientDbSettings.ADMIN_DEFAULT_PASSWORD)){
onDbCreated(session, settings);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.orientechnologies.orient.etl.OETLProcessor;
import com.orientechnologies.orient.etl.OETLProcessor.LOG_LEVELS;
import com.orientechnologies.orient.etl.OETLProcessorConfigurator;
import com.orientechnologies.orient.etl.context.OETLContext;
import com.orientechnologies.orient.etl.context.OETLContextWrapper;
import com.orientechnologies.orient.etl.loader.OETLOrientDBLoader;

Expand All @@ -36,7 +37,7 @@ public OrienteerETLProcessorConfigurator() {
}

public OETLProcessor parseConfigRecord(OTaskSessionRuntime<IOTaskSessionPersisted> taskSession,String config){
final OCommandContext context = createDefaultContext();
final OETLContext context = createDefaultContext();
ODocument configuration = new ODocument().fromJSON("{}");

configuration.merge(new ODocument().fromJSON(config, "noMap"), true, true);
Expand All @@ -53,7 +54,7 @@ public OETLProcessor parseConfigRecord(OTaskSessionRuntime<IOTaskSessionPersiste
}

@Override
protected void configureComponent(OETLComponent iComponent, ODocument iCfg, OCommandContext iContext) {
protected <C extends OETLComponent> C configureComponent(C iComponent, ODocument iCfg, OCommandContext iContext) {
if(iComponent instanceof OETLOrientDBLoader) {
//TODO: reimplement - it should use current user rights
OrienteerWebApplication app = OrienteerWebApplication.get();
Expand All @@ -64,6 +65,6 @@ protected void configureComponent(OETLComponent iComponent, ODocument iCfg, OCom
iCfg.field("dbUser", settings.getAdminUserName());
iCfg.field("dbPassword", settings.getAdminPassword());
}
super.configureComponent(iComponent, iCfg, iContext);
return super.configureComponent(iComponent, iCfg, iContext);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.orienteer.pages.web;

import com.orientechnologies.common.concur.resource.OPartitionedObjectPool;
import com.orientechnologies.orient.core.command.script.OScriptManager;
import com.orientechnologies.orient.core.db.ODatabaseDocumentInternal;
import com.orientechnologies.orient.core.db.ODatabaseSession;
Expand Down Expand Up @@ -89,9 +88,7 @@ public PageDelegate(WebPage page, ORID pageOrid, ORID docOrid) {
OrientDB context = OrienteerWebApplication.lookupApplication().getOrientDbSettings().getContext();
OScriptManager scriptManager = OrientDBInternal.extract(context).getScriptManager();
ODatabaseDocumentInternal db = OrienteerWebSession.get().getDatabaseDocumentInternal();
final OPartitionedObjectPool.PoolEntry<ScriptEngine> entry =
scriptManager.acquireDatabaseEngine(db.getName(), "javascript");
final ScriptEngine scriptEngine = entry.object;
final ScriptEngine scriptEngine = scriptManager.acquireDatabaseEngine(db.getName(), "javascript");
Bindings binding = null;
try {
binding = scriptManager.bind(scriptEngine, scriptEngine.getBindings(ScriptContext.ENGINE_SCOPE),
Expand All @@ -107,7 +104,7 @@ public PageDelegate(WebPage page, ORID pageOrid, ORID docOrid) {
} finally {
if (scriptManager != null && binding != null) {
scriptManager.unbind(scriptEngine, binding, null, null);
scriptManager.releaseDatabaseEngine("javascript", db.getName(), entry);
scriptManager.releaseDatabaseEngine("javascript", db.getName(), scriptEngine);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions orienteer-tours/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<version>2.32</version>
<version>3.0.2</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-jaxb</artifactId>
<version>2.32</version>
<version>3.0.2</version>
</dependency>
<dependency>
<groupId>org.webjars.npm</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ private void createUserSocialNetwork(OSchemaHelper helper) {

private OClass updateUserOClass(OSchemaHelper helper) {
helper.oClass(OUser.CLASS_NAME)
.oProperty(OrienteerUser.PROP_ID, OType.STRING).notNull()
.oProperty(OrienteerUser.PROP_ID, OType.STRING)//.notNull()
.updateCustomAttribute(CustomAttribute.UI_READONLY, true)
.oProperty(OrienteerUser.PROP_RESTORE_ID, OType.STRING)
.updateCustomAttribute(CustomAttribute.UI_READONLY, true)
Expand Down
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@

<properties>
<java.version>1.8</java.version>
<wicket.version>8.11.0</wicket.version>
<wicketstuff.version>8.11.0</wicketstuff.version>
<orientdb.version>3.1.10</orientdb.version>
<wicket.version>8.15.0</wicket.version>
<wicketstuff.version>8.15.0</wicketstuff.version>
<orientdb.version>3.2.27</orientdb.version>
<guice.version>4.2.0</guice.version>
<jetty.version>9.4.12.v20180830</jetty.version>
<wicket.orientdb.version>2.0-SNAPSHOT</wicket.orientdb.version>
Expand Down Expand Up @@ -500,7 +500,7 @@
</activation>
<modules>
<module>orienteer-birt</module>
<module>orienteer-bpm</module>
<!--<module>orienteer-bpm</module>-->
<module>orienteer-camel</module>
<module>orienteer-core</module>
<module>orienteer-devutils</module>
Expand All @@ -518,7 +518,7 @@
<module>orienteer-mail</module>
<module>orienteer-metrics</module>
<module>orienteer-users</module>
<module>orienteer-tours</module>
<!--<module>orienteer-tours</module>-->
<module>orienteer-notification</module>
<module>orienteer-twilio</module>
<module>orienteer-rproxy</module>
Expand Down

0 comments on commit b39de72

Please sign in to comment.