-
Task
-
Resolution: Won't Fix
-
L3 - Default
-
None
-
None
Context:
The current Spring Java-Config documentation shows how to bootstrap an embedded process engine.
But there are also those people who want to use Spring Java-Config to lookup a shared process engine. When they use the provided example, they are retrieving a process engine bean using the @Bean annotation, for example:
@Bean public ProcessEngine getDefaultProcessEngine() { return BpmPlatform.getDefaultProcessEngine(); }
This leads to the symptom that when the process application is undeployed and the Spring context is destroyed, the process engine is closed too because when a @Bean annotated bean is destroyed, its close() or destroy() method is called, if it has one. This is done implicitly by Spring. Related to the above code example, the default process engine is then closed and nothing works anymore, like Camunda webapps etc, until the server is restarted.
AT:
- Provide an explicit Java-Config example on how to create a shared process engine bean using @Bean-Annotation.