just noticed that all methods in TreeCache that make use of invokeMethod are designed 
to throw LockingException and TimeOutException but actually will allways throw 
NestedRuntimeException which is the only Exception being thrown by invokeMethod().

as a result TreeCache behaves differently in respect to the exceptions being thrown if 
being used as a local Cache or within a group (which should be transparent to the 
programmer).

The expected behavior can be archived by wrapping every call to invokeMethod with this:


  |       try {
  |             return (Node)invokeMethod(m);
  |       } catch (NestedRuntimeException e) {
  |             Throwable t = ((NestedRuntimeException)e).getNested();
  |             if (t instanceof LockingException) throw (LockingException) t;
  |             if (t instanceof TimeoutException) throw (TimeoutException) t;
  |             if (t instanceof RuntimeException) throw (RuntimeException) t;
  |             throw e;
  |       }
  | 

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

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


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to