2 Replies Latest reply on Aug 5, 2009 11:23 PM by Nathan Ciliberto

    Access JBoss Cache from different web applications?

    Dustin Callaway Newbie

      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?