Shared library in camunda applications

Hello,

We’re using the camunda EE version with currently one single application but we’d like to create a new one.

Let’s imagine we’ll need to share some delegates between them, I imagine we can create a library project and make it a dependency. But then both application war files will contain a class a.b.c.MyDelegate in WEB-INF/lib/my-library.jar.

If later on I update that class but only redeploy a single war I’ll have twice the class a.b.c.MyDelegate but at two versions.

Which version will be picked by camuda in what circumstances?

I think this would depend upon how you implemented this and the Java container you’re running in. The container’s class loading system would have some influence over which classes were exposed. However, if you’ve compiled the class into the project itself (which we do because we use Eclipse to build projects), then the version of the class compiled into the project would be used.

I am not an expert here by any means, but I would say you cannot force a class to become global via normal project build and deployment as I’ve learned how to do them.

In my admittedly ignorant opinion, you’ll access the class associated with the application when it was deployed. So if you have two applications containing classes of common origin, but differing somewhat, then you get two different classes based upon whichever application you start.