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:
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.
- Provide an explicit Java-Config example on how to create a shared process engine bean using @Bean-Annotation.