[jboss-user] [JBossCache] - Re: JBossCache, POJO Cache, Hibernate, field replication - h

bstansberry@jboss.com do-not-reply at jboss.com
Sun Mar 2 12:24:21 EST 2008

That's 3 questions. :-)  Answered in order:

1) Yes, that's PojoCache's primary benefit.

2) No, it isn't.

3) A bit of both. Hibernate stores an entity in the 2nd level cache as an Object[], one element per field. To deal with such a representation, PojoCache would need to be able to handle detecting changes in elements in an array, which it currently cannot do. Jason is working to resolve that (perhaps in PojoCache 2.2).  But even if that were solved the Hibernate folks would have to ensure that the same Object[] instance is consistently used throughout the Hibernate code (i.e. no creating a new Object[] with the same elements).  I don't know how difficult that would be, but I imagine it would be very fragile.

In most cases you're better off using JBC invalidation for entity caching anyway, which in terms of intra-cluster message traffic is lighter than any replication-based strategy, including PojoCache.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4133496#4133496

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4133496

More information about the jboss-user mailing list