jboss / jboss-nosql

3 stars 0 forks source link

The 2lc for Hibernate OGM should be clusterable on WildFly #3

Closed scottmarlow closed 8 years ago

scottmarlow commented 8 years ago

Hibernate OGM on WildFly, may have a copy of the Hibernate ORM jars that OGM depends on. Some potential issues with having different copies of ORM in WildFly:

  1. I believe that only the main Hibernate ORM (main) version is configured to work with the WildFly clustering. Part of WildFly clustering, involves ensuring that the Infinispan classloader has access to the META-INF/services/org.infinispan.commands.module.ModuleCommandExtensions, META-INF/services/org.infinispan.lifecycle.ModuleLifecycle, META-INF/service,/org.infinispan.factories.components.ModuleMetadataFileFinder.
  2. OGM will need to be aligned to work with the same version of ORM, that WildFly uses, so that we know that Infinispan will somewhat also work with OGM.
  3. WildFly also has the challenge of aligning multiple versions of different projects that need to work together, while not incurring the risk of breaking user applications. In other words, if bringing in the version of ORM that OGM needs before the ORM release is really ready to be integrated into WildFly, we are at risk. I'm not saying this will happen, but it could if we are not careful.
  4. Helping OGM to be cluster aware may involve getting help from the ORM/Infinipspan/WFClustering teams.

Perhaps the default WildFly OGM module, will depend on the same ORM version but not the same WildFly ORM module. If we want OGM to be able to work with a clustered 2lc, via the WildFly Infinispan module, that has to be enabled somehow to work for each deployment that uses OGM. This might require some breaking Hibernate ORM changes, to better integrate the WildFly ORM regionFactory extensions (may also be nicer if WildFly didn't need to extend the Hibernate-Infinispan RegionFactory classes).

Sanne commented 8 years ago

N.B. that Hibernate OGM generally expects to use the latest version of Infinispan for purposes of NoSQL storage, so we actively avoid using the version within WildFly (slot "main") but rather expect users to download the "WildFly/EAP modules" from http://infinispan.org/download/

Enabling 2nd level cache should of course use the existing code, and therefore rely on the slot "main" of Infinispan for caching purposes.

So if Hibernate OGM can use the same version of Hibernate ORM as provided within WildFly, there should be no need for a different module of Hibernate ORM. The existing module is already setup to load those services and there should be no need for changes in clustering setup either.

Having help from the Clustering and Infinispan team would be useful to setup the custom Infinispan module, i.e. allow it to use FORK, but this is unrelated to the 2LC issue.

emmanuelbernard commented 8 years ago

Is this issue modified somehow after the new Jipijapa OGM integration that @Sanne worked on?

Sanne commented 8 years ago

Is this issue modified somehow after the new Jipijapa OGM integration that @Sanne worked on?

Good point, I think it would work now in an equivalent way as ORM works. We didn't test this though.

Created an issue on OGM to test for this:

Could we consider this issue resolved?

scottmarlow commented 8 years ago

Yes, I will close this issue as it now duplicates OGM-1077, thanks!