[hibernate-dev] WildFly, JtaPlatform and Hibernate OGM

Scott Marlow smarlow at redhat.com
Wed Sep 3 09:06:30 EDT 2014


On 09/01/2014 07:20 AM, Gunnar Morling wrote:
> Hi,
>
> Running an OGM integration test on WildFly, I noticed that we work with
> JBossStandAloneJtaPlatform. Shouldn't it rather be
> JBossAppServerJtaPlatform in this case so we make use of the transaction
> manager from the container?

org.hibernate.engine.transaction.jta.platform.internal.JBossAppServerJtaPlatform 
sounds better.

>
> So I thought it might help to add jipijapa-hibernate4-3.jar to the OGM
> module, as it provides HibernatePersistenceProviderAdaptor which in turn
> sets the JBossAppServerJtaPlatform. This works indeed, but unfortunately
> HibernatePersistenceProviderAdaptor always bootstraps Hibernate ORM by
> calling ORM's EMF builder.

There was a memory leak in Hibernate, see [1] [2] [3] for more details.

>
> What'd be the right way to solve this problem? Have a specific JipiJapa
> adaptor for OGM? Or could the existing one for ORM 4.3 actually be used if
> it invoked the configured PersistenceProvider (HibernateOgmPersistence in
> our case) rather than directly delegating to ORM's Bootstrap class?


No reason why there couldn't be a JipiJapa adaptor for OGM.  One 
question to answer is whether there will only be one JipiJapa adapter 
for all versions of OGM or a different Jipi adaptor per OGM minor 
release (as we do for ORM currently).

Currently, the JipiJapa release cycle tries to be in sync with the 
WildFly schedule.  At the moment, Jipi is lagging behind and needs to 
catch up on feature development.  The missing feature at the moment, is 
enabling 2lc clustering via Jipi callbacks, that will allow more 
persistence providers to cluster the 2lc (with WildFly).  Currently, we 
only allow the very latest supported Hibernate ORM 2lc to be clustered.

Scott


[1] https://issues.jboss.org/browse/JIPI-13 reverted the 
https://issues.jboss.org/browse/JIPI-8 change due to memory leak.

[2] http://lists.jboss.org/pipermail/wildfly-dev/2013-July/000466.html

[3] https://hibernate.atlassian.net/browse/HHH-8363 
(ClassLoaderServiceImpl should be defined as Stoppable)

[4] 
https://github.com/wildfly/wildfly/blob/master/jpa/src/main/java/org/jboss/as/jpa/config/Configuration.java#L55 



>
> Thanks,
>
> --Gunnar
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>



More information about the hibernate-dev mailing list