I think it should be OK.
Multiple camel contexts can work greatly within a single JVM, as they
don't share anything except the socket port for certain camel transport
component.
If you want to share certain component configuration, such as camel-jms
component, etc, you may consider to put the routes into a same camel
context.
Willem
sandibh wrote:
Hi,
I am working on an application that has multiple, independent workflows and
each workflow has atmost two routes (so all the routes in the application
are inherently independent). At deployment time, the client wants to be
provided with a facility of deploying few workflows in one JVM, few others
in another JVM etc.
I am thinking of having a camel context spring xml and a launcher/Main class
for each workflow and then jar it up so that each workflow can be started
independently and behaves like a bundle at deployment time.
Following are the questions.
1. Is the above a good design? 2. Can there be mutiple camel contexts within
a JVM (thread safe?) 3. What could be a better design for the above case
Thanks