Examples of ProxyContext


Examples of org.jboss.mx.util.ProxyContext

     
      // create two identical mbeans
      server.registerMBean(rmm, oname);
      server.registerMBean(rmm, oname2);
     
      ProxyContext ctx  = (ProxyContext)MBeanProxy.get(
            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

Examples of org.jboss.mx.util.ProxyContext

     
      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

Examples of org.jboss.mx.util.ProxyContext

     
      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
Copyright © 2018 www.massapi.com. 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.