Classloaders in Bonita 6: Are different bar-Archives with different versions of connectors possible?

1
0
-1

Hello Bonita Team,

thank you for providing the Bonita 6 series that enable enormous productivity gains over traditional software development!

We use

  • Bonita 6.5
  • on Java 8
  • with the provided tomcat-bundle
  • on linux.

A. As our usage of Bonita evolves the point of process reuse and dependencies and versions of connectors and third part libraries have become a point of view. I have seen the part of the documentation http://documentation.bonitasoft.com/manage-jar-files#duplicate_libraries

that gives some detailed information on this matter. But I would highly appreciate it if you could help to clarify the question whether each process .bar file has its own classloader with a separate visibility.

B. Let us assume that we have

  • process P1 in a p1.bar with a connector version C1 that uses version E1 of an external library, for example a version of the Basex database client, and
  • process P2 in a p2.bar with a connector version C2 that uses a version E2 of the external library.

C. Questions:

  • Do theses processes P1/p1.bar and P2/p2.bar each have there own and separate classloader with disjunct class visibilities?

  • Or are there interferences between the connector versions C1 and C2 or the library versions E1 and E2? Is it possible to have different versions C1 and C2 of a connector (with the same class name) in the engine?

  • Or does simply the first one that it is loaded win?

D. Possible consquences to the development process:

If the processes are virtually independent than a developer

  • Peter could maintain a set of basic processes, let us call them B:=(b_1, ... , b_n), in a dedicated installation of the bointa studio for them with A.bos representing the processes.
  • And John could maintain more application specific processes A:= (a_1, ... , a_m) in an also dedicated installation of the bointa studio with B.bos representing them.

If there is B.pos already in the studio and A.pos is imported then the usual question whether connector classes shall be replaced are asked by the studio.

But if the processes are indendent the deleveloped sets of processes A and B with the deployments files a_1.pos, ... a_m.pos and b_1.pos, ... , b_n.pos could be deployed into the engine without a prior integration of them in the studio.

There would be no integration workspace/integration.bos file where the processes of A and B have been unified before they a deployed into the engine. Is such an approach reasonable/practical?

Thank you for any feedback!

With best regards

Andreas

2 answers

1
+1
-1
This one is the BEST answer!

Hello Andreas ! So here the answer : . Questions:

•Do theses processes P1/p1.bar and P2/p2.bar each have there own and separate classloader with disjunct class visibilities? => Yes. The class loader is separate for each process/version. Class loader load - library attached to the process/version - then library on the Tenant level - library on bonita application (webapps/bonita/WEB-INF/lib) - library on tomcat libs ==> If you place the jar at the tenant or at the bonita or in tomcat, it will be share by all processes, but referenced IN a process, only by this process.

•Or are there interferences between the connector versions C1 and C2 or the library versions E1 and E2? Is it possible to have different versions C1 and C2 of a connector (with the same class name) in the engine? ==> No way (except if you put the library in the tenant/bonita/tomcat path

•Or does simply the first one that it is loaded win? => No, separate

D. Possible consquences to the development process:

If the processes are virtually independent than a developer •Peter could maintain a set of basic processes, let us call them B:=(b_1, ... , b_n), in a dedicated installation of the bointa studio for them with A.bos representing the processes. •And John could maintain more application specific processes A:= (a_1, ... , a_m) in an also dedicated installation of the bointa studio with B.bos representing them.

If there is B.pos already in the studio and A.pos is imported then the usual question whether connector classes shall be replaced are asked by the studio. ==> Exactly. ATTENTION : in that case, the library name MUST HAVE A DIFFERENT NAME : like mylib-1.0.jar and mylib-1.1.jar, else in the studio, when John load the process made by peter it will overwrite its mylib.jar (when the name is different, no issue).

But if the processes are indendent the deleveloped sets of processes A and B with the deployments files a_1.pos, ... a_m.pos and b_1.pos, ... , b_n.pos could be deployed into the engine without a prior integration of them in the studio.

There would be no integration workspace/integration.bos file where the processes of A and B have been unified before they a deployed into the engine. Is such an approach reasonable/practical? ==> No special integration is needed. Just take care that the library file has a different name.

Thank you for any feedback!

1
0
-1

Hello Pierre-yves Monnet!

thank you for your precise and comprehensive answer!

That is really good news for all who want to move to something like a BPMN-based software product line with enactment on Bonita!

With best regards,

Andreas

Notifications