JBoss Community

JBoss Cache as a standalone service

reply from Navin Surtani in JBoss Cache - View the full discussion

Ok, so you have a Cache set-up in a class with a main() method correct? And you have another app running in a different JVM that you need to talk to App 1 with the main method?

 

I'd probably do it as follows, and if any Infinispan guru's see me making a mistake then please point this out.

 

  1. Register your cache with a cache manager instance in app1.main()
  2. In app2 I would create a different cache manager instance and register the *same* cache with app2CacheManager.

 

That should do the trick and allow you to carry out any of the API methods on the cache. However, I think this might negate the need for any main method in app1.

 

Is this helpful?

Reply to this message by going to Community

Start a new discussion in JBoss Cache at Community