[Project] updated strolch maven archetypes
This commit is contained in:
parent
2f6b7e7b05
commit
d9aadc61f5
|
@ -6,6 +6,7 @@
|
|||
<Properties>
|
||||
<locale>en</locale>
|
||||
<verbose>true</verbose>
|
||||
<timezone>Europe/Zurich</timezone>
|
||||
</Properties>
|
||||
</Runtime>
|
||||
<Component>
|
||||
|
|
|
@ -33,8 +33,7 @@ public class Main {
|
|||
throw e;
|
||||
}
|
||||
|
||||
Runtime.getRuntime().addShutdownHook(new Thread() {
|
||||
public void run() {
|
||||
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
|
||||
try {
|
||||
Thread.sleep(200);
|
||||
System.out.println("Shutting down ...");
|
||||
|
@ -43,8 +42,7 @@ public class Main {
|
|||
} catch (InterruptedException e) {
|
||||
logger.error("Failed to stop " + APP_NAME + " due to " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
long took = System.currentTimeMillis() - start;
|
||||
logger.info("Started " + APP_NAME + " in " + (StringHelper.formatMillisecondsDuration(took)));
|
||||
|
|
|
@ -24,6 +24,13 @@ public class PostInitializer extends SimplePostInitializer {
|
|||
@Override
|
||||
public void start() throws Exception {
|
||||
|
||||
registerJobs();
|
||||
notifyStart();
|
||||
|
||||
super.start();
|
||||
}
|
||||
|
||||
private void registerJobs() throws Exception {
|
||||
if (!getContainer().hasComponent(StrolchJobsHandler.class))
|
||||
return;
|
||||
|
||||
|
@ -45,10 +52,6 @@ public class PostInitializer extends SimplePostInitializer {
|
|||
JobMode.Recurring, 5, TimeUnit.MINUTES, 6, TimeUnit.HOURS);
|
||||
jobsHandler.register(archiveExecutedActivitiesJob).runNow();
|
||||
}
|
||||
|
||||
notifyStart();
|
||||
|
||||
super.start();
|
||||
}
|
||||
|
||||
private void notifyStart() {
|
||||
|
|
|
@ -24,6 +24,13 @@ public class PostInitializer extends SimplePostInitializer {
|
|||
@Override
|
||||
public void start() throws Exception {
|
||||
|
||||
registerJobs();
|
||||
notifyStart();
|
||||
|
||||
super.start();
|
||||
}
|
||||
|
||||
private void registerJobs() throws Exception {
|
||||
if (!getContainer().hasComponent(StrolchJobsHandler.class))
|
||||
return;
|
||||
|
||||
|
@ -45,10 +52,6 @@ public class PostInitializer extends SimplePostInitializer {
|
|||
JobMode.Recurring, 5, TimeUnit.MINUTES, 6, TimeUnit.HOURS);
|
||||
jobsHandler.register(archiveExecutedActivitiesJob).runNow();
|
||||
}
|
||||
|
||||
notifyStart();
|
||||
|
||||
super.start();
|
||||
}
|
||||
|
||||
private void notifyStart() {
|
||||
|
|
Loading…
Reference in New Issue