Hello,

I'm a relatively new user to JBoss cache, and things generally seem to work 
well with JBoss cache while running inside of my application server.  However, 
I am having 2 difficulties that I hope somebody out there can help me out with:

1) when using a JBoss cache instance in a standalone Java client outside of my 
JBoss application server (which running in a clustered mode), I seem to be 
unable to get it to join the application server cluster and have the caches 
talk to each other.  I want to have my Java client application invalidate the 
application server's cache by using the INVALIDATION_ASYNC mode.  I've started 
the JBoss server with the following arguments:


  | ./run.sh -c all -b 10.1.0.22 -u 228.1.2.3 -g testcluster
  | 

My Java application code creates a cache like this:


  | CacheFactory factory = DefaultCacheFactory.getInstance();
  | Configuration config = new Configuration();
  | config.setCacheMode(CacheMode.INVALIDATION_ASYNC);
  | config.setClusterName("testcluster-query");
  | jbCache = factory.createCache(config);
  | jbCache.addCacheListener(new DebugCacheListener());
  | jbCache.create();
  | jbCache.start();
  | 

If I start up 2 of my Java standalone applications, I can see that these caches 
do indeed talk to each other (through the use of annotations on my 
DebugCacheListener such as @NodeInvalidated etc.)

2) in the same situation as #1 (using a cache instance in a standalone Java 
application), it seems that JBoss cache is creating lots of background threads 
that cause my application VM not to want to exit.  Is there any way to have 
JBoss cache create these threads as daemon threads and not block the 
application VM from exiting automatically when my main() method finishes?  I 
would like to avoid having to put System.exit() calls in my code to force a VM 
exit.

Thanks for any help you can provide!

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4256973
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to