-
1. Re: Multiple JBPM engines on one single JBoss instance
vtysh Nov 20, 2007 11:14 AM (in response to bfillon)It's easy, simply edit hibernate.cfg.xml file for another datasources which you have.
-
2. Re: Multiple JBPM engines on one single JBoss instance
bfillon Nov 21, 2007 2:43 AM (in response to bfillon)I've made some basic tests with two ears containing :
- jbpm.war
- hibernate.cfg.xml
- jbpm.cfg.xml
Let's say ears are called app1.ear and app2.ear. They both contain the same structure and files and hibernate.cfg.xml files use distinct JNDI datasources defined in jbpm-ds.xml.
What i see when starting JBoss and hot-deploying applications one by one is the following :
- I deploy app1.ear and application starts correctly and JBPM objects are mapped through Hibernate using config information for datasource 1
- I deploy app2.ear and application starts correctly but JBPM objects are not mapped a second time using config information for datasource 2. This results in app2.ear using processes and definition from JBPM database 1...
That's why i was asking myself if such a scenario is possible with JBPM.
Any idea ?
Regards,
Benoit -
3. Re: Multiple JBPM engines on one single JBoss instance
vtysh Nov 21, 2007 9:44 AM (in response to bfillon)You should use different war names to avoid conflicts.
-
4. Re: Multiple JBPM engines on one single JBoss instance
mputz Nov 21, 2007 10:15 AM (in response to bfillon)I haven't tried what you are trying to achieve, but it sounds like you run into this issue of both applications using the same jars/resources because of the flat class loading model JBoss uses.
See http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration for more information, and try it again after inserting a jboss-app.xml in your ear files with class loader isolation settings as outlined in the wiki. And also set a different context to the jBPM web applications. -
5. Re: Multiple JBPM engines on one single JBoss instance
kukeltje Nov 21, 2007 3:35 PM (in response to bfillon)Martin is right, and different war names are not needed if they are in different ear files
-
6. Re: Multiple JBPM engines on one single JBoss instance
bfillon Nov 22, 2007 4:44 AM (in response to bfillon)Ok that did the trick :
I've set attribute "Isolated" to true in ear-deployer.xml.
The remaining question is : do I need to set "CallByValue" attribute to true ?
If i understand correctly this setting, it is needed for remote calls.
If my ears are "standalone" apps that embed everything needed and don't interact with any other Java app, i don't need it, right ?
Because it seems that this setting has a non-neglectable impact on performance.
Thanks for your answers,
Regards,
Benoit