cache sharing between different web apps on the same app server
690348Mar 11 2009 — edited Mar 16 2009Hi All,
I am using TopLink Essentials backed JPA entities packaged in a jar file and shared between 2 different WebApps running on the same application server (GlassFish with container managed JTA Data Source), uff. My problem is that updates to the persistent entities done from one application become visible in the other application only if I turn the TopLink cache off completely (toplink.cache.type.default = NONE). For performance reasons I want to keep on using the TopLink cache but none of the cache settings seem to work for me. Is it because the TopLink seesion (which has to be implicitly created since I only use pure JPA) is not shared between those two WebApps and as a result they have two separate caches? How can I enforce that those apps (or any number of apps running on the same server and sharing the same persistance unit) share the same cache/session. Any help will be very much appreciated.
PS My persistance.xml is all defaults.