Skip to content

Commit

Permalink
PAYARA-2095 Fix EJB timers broken in Payara 5 alpha1 (#1994)
Browse files Browse the repository at this point in the history
  • Loading branch information
smillidge authored and arjantijms committed Oct 26, 2017
1 parent 17587dd commit 8f54e86
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -987,18 +987,11 @@ public PayaraMicroRuntime bootStrap() throws BootstrapException {

// boot the server
preBootCommands.executeCommands(gf.getCommandRunner());
gf.getCommandRunner().run("set", "configs.config.server-config.hazelcast-runtime-configuration.enabled=false");
gf.start();
postBootCommands.executeCommands(gf.getCommandRunner());
this.runtime = new PayaraMicroRuntimeImpl(gf, gfruntime);

// load all applications, but do not start them until Hazelcast gets a chance to initialize
deployAll();
if(!noCluster) {
gf.getCommandRunner().run("set", "configs.config.server-config.hazelcast-runtime-configuration.enabled=true");
gf.getCommandRunner().run("set-hazelcast-configuration", "--enabled", "true", "--dynamic", "true");
}

gf.getCommandRunner().run("initialize-all-applications");

postBootActions();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ static void init(HazelcastCore core) {
}

public HazelcastTimerStore(HazelcastCore core) throws Exception {

if (!core.isEnabled()) {
throw new Exception("Hazelcast MUST be enabled when using the HazelcastTimerStore");
}
pkCache = core.getInstance().getMap(EJB_TIMER_CACHE_NAME);
containerCache = core.getInstance().getMap(EJB_TIMER_CONTAINER_CACHE_NAME);
applicationCache = core.getInstance().getMap(EJB_TIMER_APPLICAION_CACHE_NAME);
Expand Down

0 comments on commit 8f54e86

Please sign in to comment.