0

We are migrating are apps from WAS 8.5.5 + JPA 2.0 + Hibernate to WAS v9.0 (ND + liberty) + JPA v2.1 and the eclipselink bundled implementation

Q: How to configure the second level cache with WAS v9.0 (and also for Liberty v16.0.0.4) when using the default bundled JPA 2.1 implementation (ie eclipselink) ?
Also how to replicate it to other cluster members (maybe with distributedmap ?)

The only doc I found in the WAS v9.0 knowledge center is about JPA 2.0 and openjpa: Dynamic cache provider for the JPA 2.0 second level cache

titou10
  • 2,814
  • 1
  • 19
  • 42

1 Answers1

1

First of all, do you want to be migrating to from JPA 2.0 + Hibernate to JPA 2.1 + eclipselink? The easiest solution would be to move up to a newer version of Hibernate which supports the JPA 2.1 API.

If you do want to move to eclipselink, you can find lots of detail about clustered entity caching in the following wiki pages:

Note: As an alternative, even easier option, you can enable JPA 2.0 on tWAS 9.0 and Liberty. I would discourage this option, since upgrading to newer spec levels and library versions is best practice, but it depends on your deadlines.

Andy Guibert
  • 41,446
  • 8
  • 38
  • 61
  • Thanks for your answer . We want to get rid of extra jars (Hibernate etc) and also upgrade to jee 7 so using the embedded jpa implementaion is the way to go. This is strange that there is no "WebSphere" way to do it as for JPA 2.0/openjpa...not even a mention of a distributed second level cache for JPA 2.1/eclipselink in the official WebSphere doc.. – titou10 Jan 06 '17 at 18:57
  • with eclipselink, websphere doesn't document ECL specific functionality -- since they have their own documentation website. Is the ECL documentation in the above links not working when you try it on Websphere? – Andy Guibert Jan 06 '17 at 21:49
  • I don't know but what I read in the EL doc seems way different from using the distributedmaps features of WAS and I'm not sure if it is OK with our need (synchronous replication, invalidation.... In our current setup, I have developped a 2LC hibernate custom cache implementation that use WAS distributed maps. The DM is easily configured by adding a xml config file in the application and WAS ND does the rest (distribution, member discovery,sync replication etc..)...WAS v8.5/v9.0 has the equivalent for JPA 2.0/openjpa but not for JPA 2.1/eclipselink. – titou10 Jan 07 '17 at 00:13
  • I'll check if it is possible to provide an eclipselink cache custom implementation that willldevelop and use WAS Network Deployment and distributedmap features – titou10 Jan 07 '17 at 00:15