Package org.jboss.mx.util

Examples of org.jboss.mx.util.DefaultExceptionHandler


     
      ProxyContext ctx  = (ProxyContext)MBeanProxy.get(
            MyInterface.class, oname, server
      );

      ctx.setExceptionHandler(new DefaultExceptionHandler()
      {
         public Object handleInstanceNotFound(ProxyContext proxyCtx, InstanceNotFoundException e, Method m, Object[] args) throws Exception
         {
            return proxyCtx.getMBeanServer().invoke(new ObjectName("test:test=test2"), m.getName(), args, null);
         }
View Full Code Here


            MyInterface.class, oname, server
      );

      // override InstanceNotFound exception to redirect from test=test instance
      // to test=test2 instance
      ctx.setExceptionHandler(new DefaultExceptionHandler()
      {
         public Object handleInstanceNotFound(ProxyContext proxyCtx, InstanceNotFoundException e, Method m, Object[] args) throws Exception
         {
            return proxyCtx.getMBeanServer().invoke(new ObjectName("test:test=test2"), m.getName(), args, null);
         }
View Full Code Here

      MyInterface mbean = (MyInterface)MBeanProxy.get(
            MyInterface.class, oname, server
      );
     
      ProxyContext ctx = (ProxyContext)mbean;
      ctx.setExceptionHandler(new DefaultExceptionHandler());
     
      try
      {
         mbean.setAttributeName2("some name");
      }
View Full Code Here

      server.registerMBean(mmbean, oname);
     
      DynamicMBean mbean = (DynamicMBean)MBeanProxy.get(oname, server);
     
      ProxyContext ctx = (ProxyContext)mbean;
      ctx.setExceptionHandler(new DefaultExceptionHandler());
     
      try
      {
         mbean.setAttribute(new Attribute("AttributeName2", "some name"));
      }
View Full Code Here

TOP

Related Classes of org.jboss.mx.util.DefaultExceptionHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.