[jboss-user] [JBoss Cache: Core Edition] - Re: JPA entity caching with JBossCache in JBoss-5.0 GA

jaikiran do-not-reply at jboss.com
Fri Jan 2 23:57:52 EST 2009


"bstansberry at jboss.com" wrote : 
  | Javadocs are at http://www.jboss.org/file-access/default/members/jbosscache/freezone/docs/3.0.1.GA/apidocs/index.html.  The second param is whether the cache manager should create the "mvcc-entity" cache if not already created. Whether you pass true or false depends on whether you want a guaranteed non-null return.
  | 
  | Note that any code that calls getCache() should also call releaseCache() when it is done with the cache. The CacheManager uses reference counting to know when to stop the cache.
  | 
  | 
Thanks!

"bstansberry at jboss.com" wrote : 
  | IMO doing any of this is a bad idea; the cache is an internal structure of the Hibernate SessionFactory. For sure it's a bad idea to document such a thing in any of the EJB3 examples!! :-) 
  | ...
  | Hibernate provides an API (Statistics) for inspecting the Second Level Cache. See http://www.hibernate.org/hib_docs/v3/reference/en-US/html/performance-sessioncache.html. Users should restrict themselves to that API. If an existing EJB3 example pokes around in the cache internals, I encourage you to convert it to use the Hibernate Statistics API.

That's exactly what i was trying to refactor in the EJB3 tutorial :-) Thanks for the pointer to Hibernate Statistics API. I'll take a look.


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

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



More information about the jboss-user mailing list