Hi
I have managed to get a spring-enabled process applications with a shared (Spring) process engine which uses a custom Plugin working, on tomcat.
HOWEVER: I cannot answer the question of what limitations and if there are transaction issues.
Steps to do this are worked out from [1], [2], [3] and are that
a) setup your tomcat/conf/server.xml and ensure you have configured it such that:
-- You don't have the "BPM Bootstrap Server Listener" eg: remove <Listener className="org.camunda.bpm.container.impl.tomcat.TomcatBpmPlatformBootstrap" />
-- JDBC Resource
-- ProcessEngineService (note in the link they have "global/camunda-bpm-platform/process-engine/ProcessEngineService!org.camunda.bpm.ProcessEngineService" I used "java:global/camunda-bpm-platform/process-engine/ProcessEngineService!org.camunda.bpm.ProcessEngineService")
-- ProcessApplicationService (note in the link they have "global/camunda-bpm-platform/process-engine/ProcessApplicationService!org.camunda.bpm.ProcessApplicationService" I used "java:global/camunda-bpm-platform/process-engine/ProcessApplicationService!org.camunda.bpm.ProcessApplicationService")
b) Modify the applicationContext.xml for the war which you want to deploy as your "embedded engine which is registered as a shared engine." as described in the link below:
in stead of using the "org.camunda.bpm.engine.spring.ProcessEngineFactoryBeanProcessEngineFactoryBean" you need to use the ManagedProcessEngineFactoryBean as detailed in
c) To have each process in a separate war (which does not bootstrap the engine) configure these wars according to the spring bonus chapter at:
d) The IdentityProvider implementation is attached to the "processEngineConfiguration" as below (MyIdentityPlugin implements ProcessEnginePlugin)
<bean id="processEngineConfiguration" class="org.camunda.bpm.engine.spring.SpringProcessEngineConfiguration">
...
<property name="processEnginePlugins">
<list>
<ref bean="myIdentityPlugin" />
</list>
</property>
...
</bean>
e) camunda-engine*.jar must be at a global level (eg: in tomcat lib folder) and for all wars that you deploy must be removed from its own lib folder. This includes the rest-engine.war and camunda-webapp.war (a side note is that I build the camunda-webapp.war using a Maven War Overlay so its not the camunda-standalone-webapp.war)
f) ensure that you don't have the bpm-platform.xml under tomcat/conf/
g) And lastly you have to ensure that you war with the shared engine is started first! I have used the trick from [4] to ensure this and it seems to be working well.
"If you want to specify the deployment order then define a context for your web app in $CATALINA_BASE/conf/[enginename]/[hostname]/MyApp.xml"
Regards
Melissa