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.
Thanks for your helpful response. You are absolutely correct - the reason I'm looking at doing this is that there are other (read only/reporting) users of the data in the database, who need it in a useful format and not in serialised blobs.
I'll have a go at writing my own CacheLoader for my Hibernate objects, and I'll post back to let you know how I go.
I've an identical application architecture, but only with one GUI attached. My current approach is also based on JMS transporting POJO's from and to the a JBossAS using Hibernate as persistence provider.
I was about to implement a system, that does all the sync stuff between the client and the server (I'm working with a quite large data-model; one data-model instance may consist of up to 250,000 entities; so load/update on demand, eviction of unused entities is an important point), when I was pointed to JBoss Cache.
I came to the same conclusion, that I would need to implement a cache loader that performs the translation between the jboss cache and the hibernate operated data base.
Did you have any success so far?