Skip to content

Commit

Permalink
Further fixes to headless.
Browse files Browse the repository at this point in the history
  • Loading branch information
stroomdev66 committed Jul 15, 2017
1 parent 8ba54c4 commit 85883a5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
27 changes: 16 additions & 11 deletions stroom-pipeline/src/main/java/stroom/headless/Headless.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import stroom.util.logging.StroomLogger;
import stroom.util.shared.ModelStringUtil;
import stroom.util.spring.StroomSpringProfiles;
import stroom.util.task.ExternalShutdownController;
import stroom.util.task.TaskScopeRunnable;
import stroom.util.thread.ThreadScopeRunnable;
import stroom.util.zip.StroomZipFile;
Expand Down Expand Up @@ -142,19 +143,21 @@ private void init() {
@Override
public void run() {
try {
StroomProperties.setProperty("stroom.jpaHbm2DdlAuto", "update", Source.TEST);
StroomProperties.setOverrideProperty("stroom.jpaHbm2DdlAuto", "update", Source.TEST);

StroomProperties.setProperty("stroom.jdbcDriverClassName", "org.hsqldb.jdbcDriver", Source.TEST);
StroomProperties.setProperty("stroom.jpaDialect", "org.hibernate.dialect.HSQLDialect", Source.TEST);
StroomProperties.setProperty("stroom.jdbcDriverUrl", "jdbc:hsqldb:file:${stroom.temp}/stroom/HSQLDB.DAT;shutdown=true", Source.TEST);
StroomProperties.setProperty("stroom.jdbcDriverUsername", "sa", Source.TEST);
StroomProperties.setProperty("stroom.jdbcDriverPassword", "", Source.TEST);
StroomProperties.setOverrideProperty("stroom.jdbcDriverClassName", "org.hsqldb.jdbcDriver", Source.TEST);
StroomProperties.setOverrideProperty("stroom.jpaDialect", "org.hibernate.dialect.HSQLDialect", Source.TEST);
StroomProperties.setOverrideProperty("stroom.jdbcDriverUrl", "jdbc:hsqldb:file:${stroom.temp}/stroom/HSQLDB.DAT;shutdown=true", Source.TEST);
StroomProperties.setOverrideProperty("stroom.jdbcDriverUsername", "sa", Source.TEST);
StroomProperties.setOverrideProperty("stroom.jdbcDriverPassword", "", Source.TEST);

StroomProperties.setProperty("stroom.statistics.sql.jdbcDriverClassName", "org.hsqldb.jdbcDriver", Source.TEST);
StroomProperties.setProperty("stroom.statistics.sql.jpaDialect", "org.hibernate.dialect.HSQLDialect", Source.TEST);
StroomProperties.setProperty("stroom.statistics.sql.jdbcDriverUrl", "jdbc:hsqldb:file:${stroom.temp}/statistics/HSQLDB.DAT;shutdown=true", Source.TEST);
StroomProperties.setProperty("stroom.statistics.sql.jdbcDriverUsername", "sa", Source.TEST);
StroomProperties.setProperty("stroom.statistics.sql.jdbcDriverPassword", "", Source.TEST);
StroomProperties.setOverrideProperty("stroom.statistics.sql.jdbcDriverClassName", "org.hsqldb.jdbcDriver", Source.TEST);
StroomProperties.setOverrideProperty("stroom.statistics.sql.jpaDialect", "org.hibernate.dialect.HSQLDialect", Source.TEST);
StroomProperties.setOverrideProperty("stroom.statistics.sql.jdbcDriverUrl", "jdbc:hsqldb:file:${stroom.temp}/statistics/HSQLDB.DAT;shutdown=true", Source.TEST);
StroomProperties.setOverrideProperty("stroom.statistics.sql.jdbcDriverUsername", "sa", Source.TEST);
StroomProperties.setOverrideProperty("stroom.statistics.sql.jdbcDriverPassword", "", Source.TEST);

StroomProperties.setOverrideProperty("stroom.lifecycle.enabled", "false", Source.TEST);

new TaskScopeRunnable(GenericServerTask.create("Headless Stroom", null)) {
@Override
Expand All @@ -169,6 +172,8 @@ protected void exec() {
}.run();
} finally {
StroomProperties.removeOverrides();

ExternalShutdownController.shutdown();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@
@Configuration
@ComponentScan(basePackages = {
"stroom.cache",
"stroom.cluster",
"stroom.datafeed",
"stroom.db",
"stroom.dictionary",
"stroom.entity",
"stroom.feed",
Expand All @@ -42,17 +40,13 @@
"stroom.lifecycle",
"stroom.node",
"stroom.pipeline",
"stroom.policy",
"stroom.pool",
"stroom.process",
"stroom.proxy",
"stroom.query",
"stroom.resource",
"stroom.spring",
"stroom.streamstore",
"stroom.streamtask",
"stroom.task",
"stroom.upgrade",
"stroom.util",
"stroom.volume",
"stroom.xmlschema",
Expand Down

0 comments on commit 85883a5

Please sign in to comment.