[jboss-user] [JBoss Cache: Core Edition] - Access JBoss Cache from different web applications?

drcallaway do-not-reply at jboss.com
Tue Aug 4 20:18:03 EDT 2009


I have two separate web applications that both need access to the same JBoss Cache. That is, one WAR may store information in the cache that needs to be accessed by another WAR. Here's what I've tried so far:

1. I tried storing the cache object in the JNDI tree but this doesn't work since it is not serializable.
2. I tried including it as a transient member of a serializable wrapper class but I would always get a ClassCastException when trying to cast the object back to its original type (presumably because the different web applications are using different class loaders).
3. I tried registering it as an MBean in one web application but haven't been able to figure out how to access the MBean and the underlying cache from the other WAR.

Any ideas?

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

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



More information about the jboss-user mailing list