[jboss-user] [JBoss Cache] - Re: Cache 3 + Hibernate 3.3 + JMX/JNDI exposure

Marcin Cieslak do-not-reply at jboss.com
Wed Feb 22 08:56:45 EST 2012


Marcin Cieslak [https://community.jboss.org/people/trybik] created the discussion

"Re: Cache 3 + Hibernate 3.3 + JMX/JNDI exposure"

To view the discussion, visit: https://community.jboss.org/message/718710#718710

--------------------------------------------------------------
No answer ever came, so I reply to myself.

For upcoming LAMS release, we are using pretty much the same version of JBoss as 3 years ago, JBoss 5.1.0.
This means that no new tools are available in JBoss to solve cache access problem. 
After extensive search, no solution to expose same Cache instance both to Hibernate and CacheManager using JMX/JNDI was found. 

This may be possible after upgrade to newer major JBoss version, but for LAMS 2.4 another solution was needed.
CacheManager gets now Hibernate SessionFactory injected by Spring. This way it can in limited manner manipulate 2nd level cache. 
This code snippet was used to look up and clear cache:
 http://java.dzone.com/tips/clearing-hibernate-second-leve http://java.dzone.com/tips/clearing-hibernate-second-leve

Very frustrating, but this was the best we could do with given tools.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/718710#718710]

Start a new discussion in JBoss Cache at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2052]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120222/8e792602/attachment.html 


More information about the jboss-user mailing list