JBoss Community

Getting CacheManager via JNDI

created by Alessandro Novarini in Beginner's Corner - View the full discussion

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

Reply to this message by going to Community

Start a new discussion in Beginner's Corner at Community