[jboss-user] [JBoss Cache: Core Edition] - Re: Advice setting JBoss Cache up loading from hibernate and

bstansberry@jboss.com do-not-reply at jboss.com
Mon Feb 9 17:01:35 EST 2009


You're correct that using JBC as a Hibernate Second Level Cache isn't what you're looking for.

The HibernateCacheLoader class you linked was never part of JBoss Cache. It was part of JBoss Portal. Looks like it was an implementation of a concept similar to what you are talking about -- implement the JBC CacheLoader interface in such a way that Hibernate persists the cached data to regular database tables.  This differs from the standard JDBCCacheLoader that comes with JBC.  JDBCCacheLoader persists data in a table whose schema matches JBC's requirements but is largely useless for others who need to see the data (e.g. the cached data map is stored as a serialized blob).

A CacheLoader based on Hibernate would need to understand what data is being put into the cache where so it knows how work with Hibernate to persist it. So, it's a custom thing for you to write -- a yellow box on your graphic. ;)

http://anonsvn.jboss.org/repos/portal/tags/JBoss_Portal_2_2_0/core/src/main/org/jboss/portal/core/security/store/HibernateCacheLoader.java points to the source for the JBoss Portal code whose javadoc you linked. Perhaps that will give you some ideas on how to implement such a thing.

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

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



More information about the jboss-user mailing list