3

Can we have have two different jar versions of hibernate running in same application.

We have our application which uses hibernate3 and we are also using JBPM 5 in our application which is also using hibernate3.

However, since now we are in process of migrating JBPM to higher version of JBPM which JBPM 6 which uses higher version of hibernate. eg: hibernate 4.

So my question is, can we have one application with two different hibernate versions (hibernate 3 and hibernate 4) . old version to take care of existing application and new version for JBPM.

noor
  • 31
  • 1
  • Unlikely. If they don't collide on fully qualified class names (i.e. package + classname) you should be fine. I'm pretty sure these will cause problems though. If you're using maven for dependency mgmt, if they have the same group and artifact, maven will pick only one. – Taylor Jan 12 '16 at 20:00
  • 2
    Only with something like OSGI so each component uses different classloader with a different version.... or you can instantiate the classloaders yourself, but that a different level of complexity. – Augusto Jan 12 '16 at 20:39
  • Just use Hibernate 4 in an existing application. Hibernate 3 and Hibernate 4 are similar. – v.ladynev Jan 13 '16 at 06:33
  • In order to use only Hibernate 4 , I will have to migrate my existing prod application to Hibernate 4 which is not feasible as of now. – noor Jan 13 '16 at 15:00

0 Answers0