We are planning to use the TreeCache in our clustered production JBoss environment.

We will be invoking the TreeCache methods (via JMX MBean) from a Stateless Session 
Bean.

Are there any threading issues to consider? We have currently not placed any 
synchronization around any method calls to TreeCache.

Many thanks.

mark

Code example from SLSB:

  |     public void put(String cacheSystemName, CacheKey key, VersionedXml value) 
throws CacheException {
  |         log4j.debug("TreeCache.put()");
  | 
  |         //put into cache
  |         Fqn fqn = new Fqn(this.rootFqn, ((FqnCacheKey) key).getFqn());
  |         Object[] args = new Object[] {fqn, STANDARD_KEY, value};
  |         String[] sig = new String[] {FQN_CLASS_NAME, OBJECT_CLASS_NAME, 
OBJECT_CLASS_NAME};
  | 
  |         //Invoke the put() method
  |         _invoke("put", args, sig);
  |     }
  | 
  |     private Object _invoke(String methodName, Object[] args, String[] sig) throws 
CacheException {
  |         try {
  |             return JBossUtils.locateJBoss().invoke(cacheService, methodName, args, 
sig);
  |         } catch (Exception ex) {
  |             throw new CacheException("Error invoking method " + methodName + " on 
TreeCache", ex);
  |         }
  |     }
  | 

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3839414


-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to