Package javax.management

Examples of javax.management.MBeanServerConnection.invoke()


         params[i] = editor.getValue();
      }
      log.debug("Using params: " + Strings.join(params, ","));
     
      // invoke the operation
      Object result = server.invoke(name, opName, params, matchOp.getSignature());
      log.debug("Raw result: " + result);

      if (!context.isQuiet())
      {
         // Translate the result to text
View Full Code Here


         deploy("aop-scopeddependency-global.jar");
         try
         {
            server.setAttribute(testerName, new Attribute("Property", 42));
            assertEquals(42, server.getAttribute(testerName, "Property"));
            String ret = (String)server.invoke(testerName, "someAction", new Object[0], new String[0]);
            assertNotNull(ret);
            assertEquals("true", ret);
         }
         finally
         {
View Full Code Here

   ObjectName name = ObjectNameFactory.create("jboss.test:service=XAWrapperSmoke");
  
   public void testSmoke() throws Exception
   {
      MBeanServerConnection server = getServer();
      server.invoke(name, "smokeTest", null, null);
   }

   public static Test suite() throws Exception
   {
      return new JBossTestSetup(getDeploySetup(XAResourceWrapperSmokeUnitTestCase.class, "jms-xawrapper-smoke.sar"));
View Full Code Here

   {
      MBeanServerConnection server = getServer();
      ObjectName testerName = new ObjectName("jboss.aop:service=HotdeployTest");
      Object[] params = {};
      String[] sig = {};
      server.invoke(testerName, "testMethod", params, sig);
   }

   public static Test suite() throws Exception
   {
      return getDeploySetup(HotdeploySarTestCase.class, "hotdeploy.sar");
View Full Code Here

     
      MBeanServerConnection[] adaptors = getAdaptors();
      MBeanServerConnection server0 = adaptors[0];
      ObjectName rpcService = new ObjectName(RPC_CLASSLOADER_SERVICE);

      Object obj0 = server0.invoke(rpcService, "runRetrieveAll", null, null);
      assertNotNull("expected ArrayList as result type, got null", obj0);
      assertTrue( "expected ArrayList as result type, got " +obj0.getClass().getName(), obj0 instanceof ArrayList);
      ArrayList responses = (ArrayList)obj0;
     
      // there should be two Person responses, the attributes should differ
View Full Code Here

  
   public void test() throws Exception
   {
      MBeanServerConnection server = getServer();
      ObjectName name = new ObjectName("jboss.test:test=webbmtcleanuptest");
      server.invoke(name, "test", null, null);
   }
}
View Full Code Here

     
      MBeanServerConnection[] adaptors = getAdaptors();
      MBeanServerConnection server0 = adaptors[0];
      ObjectName rpcService = new ObjectName(RPC_SERVICE);

      Object obj0 = server0.invoke(rpcService, "runRetrieveAll", null, null);
      assertNotNull("expected ArrayList as result type, got null", obj0);
      assertTrue( "expected ArrayList as result type, got " +obj0.getClass().getName(), obj0 instanceof ArrayList);
      ArrayList responses = (ArrayList)obj0;
     
      // there should be two Person responses, the attributes should differ
View Full Code Here

      PersonQuery query = new PersonQuery();
      query.setEmployer(employer);
      Object[] parms = new Object[]{query};
      String[] types = new String[]{PersonQuery.class.getName()};
     
      Object obj1 = server1.invoke(rpcService, "runRetrieveQuery", parms, types);
      assertNotNull("expected ArrayList as result type, got null", obj1);
      assertTrue( "expected ArrayList as result type, got " +obj1.getClass().getName(), obj1 instanceof ArrayList);
      ArrayList responses = (ArrayList)obj1;
     
      // there should be two responses, a Person and a null value
View Full Code Here

      // this will set the 'notified' attribute to true for all Person objects in RPCUser
      server0.invoke(rpcService, "runNotifyAllAsynch", null, null);
      Thread.sleep(5000);
     
      // confirm the attribute has been set successfully on each node
      Object obj1 = server1.invoke(rpcService, "runRetrieveAll", null, null);
      assertNotNull("expected ArrayList as result type, got null", obj1);
      assertTrue( "expected ArrayList as result type, got " +obj1.getClass().getName(), obj1 instanceof ArrayList);
      ArrayList responses = (ArrayList)obj1;
     
      // there should be two Person responses, the 'notified' attribute should be true
View Full Code Here

     
      MBeanServerConnection[] adaptors = getAdaptors();
      MBeanServerConnection server0 = adaptors[0];
      ObjectName rpcService = new ObjectName(RPC_SERVICE);
     
      Object obj0 = server0.invoke(rpcService, "runRetrieveFromCoordinator", null, null);
      assertNotNull("expected Person as result type, got null", obj0);
      assertTrue( "expected Person as result type, got " +obj0.getClass().getName(), obj0 instanceof Person);

      String employer = "WidgetsRUs";
      String respEmpl = ((Person)obj0).getEmployer();
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.