1 Reply Latest reply on Dec 2, 2010 10:43 AM by Alessandro Novarini

    Getting CacheManager via JNDI

    Alessandro Novarini Newbie

      Hello all,

       

      I'm working on JBoss 5.1, so I don't have Infinispan installed nor I can change the default jbosscache.

       

      I need to retrieve the CacheManager for storing object from my code, and I tried to get the CacheManager using JNDI.

      In the configuration file of the cache, inside the .SAR archive, I saw that the CacheManager is bound to the name java:CacheManager

       

      I tried, from an external client to lookup the cache pointing to that name (java:CacheManager), but the code raised an Exception telling me that than name was not bound.

       

      Is the CacheManager an object I can use from an external application? Or this is something usable only "inside" the application server?

      Do I need to configure it in some way to enable the jndi?

       

      Thanks in advance,

      Ale