Skip to content

Instantly share code, notes, and snippets.

@sohangp
Created November 19, 2019 20:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sohangp/c8f379e66a0a88c854e5e5937de42529 to your computer and use it in GitHub Desktop.
Save sohangp/c8f379e66a0a88c854e5e5937de42529 to your computer and use it in GitHub Desktop.
Starting the Embedded Engine
private final Executor executor = Executors.newSingleThreadExecutor();
...
@PostConstruct
private void start() {
this.executor.execute(engine);
}
@PreDestroy
private void stop() {
if (this.engine != null) {
this.engine.stop();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment