users@glassfish.java.net

Is Toplink Essentials caching good for clustered environments?

From: <glassfish_at_javadesktop.org>
Date: Thu, 11 Dec 2008 17:42:50 PST

Since Toplink Essentials does not support distributed caching, it will be problematic in a clustered environment. Am I right? Potentially you will get stale data out of the cache in some nodes in the cluster.

Does this mean Toplink Essentials is not ready for clustered deployment?

I heard that EclipseLink does support distributed caching through cache coordination. Can somebody please confirm?

Another issue that I'm trying to figure out is that: does toplink put java entities into the shared server cache and hands out references to client session? If it is true, it is different from the L2 cache in Hibernate. Hibernate's L2 cache holds so called "dehydrated" data. Copies of the data are handed out of the L2 cache and reconstructed into entities, which got passed into sessions.

I did some benchmarking in which a servlet simply calls a stateless session bean. The service bean simply reads some entities from DB, creates some new entities and then delete them. JMeter shows that Toplink Essentials outperforms Hibernate based JPA by a wide margin. I'm sure that Toplink's shared cache plays a large role into this. By default Hibernate does not have a L2 cache, which in essence corresponds to Toplink's shared server cache.

Any comments?
[Message sent by forum member 'anqingxu' (anqingxu)]

http://forums.java.net/jive/thread.jspa?messageID=321343