Is it possible to use Hibernate 5 as JPA engine in WAS Liberty Profile

前端 未结 4 1741
故里飘歌
故里飘歌 2021-01-23 10:58

I use 4.3.11 in my Liberty projects but there is a bug with Hibernate solved in version 5. I have tried upgrading but I get different exceptions.

Anybody is using Hibern

4条回答
  •  [愿得一人]
    2021-01-23 11:41

    I know the thread is a bit old, but comparing Liberty Profile 17.0.0.2 and 17.0.0.3 I have noticed they have introduced this class

    com.ibm.ws.jpa.hibernate.LibertyJtaPlatform
    

    and now when I start the app server, the container passes some properties when calls

    HibernatePersistenceProvider.createContainerEntityManagerFactory(PersistenceUnitInfo info, Map properties)
    

    to initialize hibernate for a data-source and in the properties you have the instance of that class:

    Hope it helps.

提交回复
热议问题