Package javax.management

Examples of javax.management.MBeanServerConnection.invoke()


   {
      MBeanServerConnection server = getServer();
      try
      {
         // Get the deployed URL
         URL deployedURL = (URL) server.invoke(deploymentService,
               "getDeployedURL", new Object[] { module },
               new String[] { "java.lang.String" });

         // Undeploy the module (move to ./undeploy)
         server.invoke(deploymentService, "undeployModuleAsynch",
View Full Code Here


         URL deployedURL = (URL) server.invoke(deploymentService,
               "getDeployedURL", new Object[] { module },
               new String[] { "java.lang.String" });

         // Undeploy the module (move to ./undeploy)
         server.invoke(deploymentService, "undeployModuleAsynch",
               new Object[] { module }, new String[] { "java.lang.String" });

         // Ask the MainDeployer every 3 secs, 5 times (15secs max wait) if
         // the module was undeployed
         Boolean isDeployed = new Boolean(false);
View Full Code Here

         Boolean isDeployed = new Boolean(false);
         for (int tries = 0; tries < 5; tries++)
         {
            // sleep for 3 secs
            Thread.sleep(3000);
            isDeployed = (Boolean) server
                  .invoke(mainDeployer, "isDeployed",
                        new Object[] { deployedURL },
                        new String[] { "java.net.URL" });

            if (!isDeployed.booleanValue())
View Full Code Here

      MBeanServerConnection server = getServer();
      log.info("Updating MBean '" + data + "'");

      // create the module
      boolean result = false;
      result = ((Boolean) server.invoke(deploymentService, "updateMBean",
            new Object[] { data },
            new String[] { "org.jboss.services.deployment.MBeanData" }))
            .booleanValue();

      log.info("MBean '" + data + "' update result: " + result);
View Full Code Here

   {
      MBeanServerConnection server = getServer();
      ObjectName testerName = new ObjectName("jboss.aop:name=AnnotatedTester");
      Object[] params = {};
      String[] sig = {};
      server.invoke(testerName, "testPrecedence", params, sig);
   }
   public void testAspectFactory() throws Exception
   {
      MBeanServerConnection server = getServer();
      ObjectName testerName = new ObjectName("jboss.aop:name=AnnotatedTester");
View Full Code Here

   {
      MBeanServerConnection server = getServer();
      ObjectName testerName = new ObjectName("jboss.aop:name=AnnotatedTester");
      Object[] params = {};
      String[] sig = {};
      server.invoke(testerName, "testAspectFactory", params, sig);
   }
     
   public static Test suite() throws Exception
   {
      TestSuite suite = new TestSuite();
View Full Code Here

         deploy("aop-mc-jmxtest-dependency.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

   {
      MBeanServerConnection server = getServer();
      server.setAttribute(on, new Attribute("Property", 42));
      assertEquals(42, server.getAttribute(on, "Property"));

      Object ret = server.invoke(on, "someAction", new Object[0], new String[0]);
      assertEquals("JMX42", ret);
   }


   public static Test suite() throws Exception
View Full Code Here

   {
      MBeanServerConnection server = getServer();
      ObjectName testerName = new ObjectName("jboss.aop:name=ScopedAnnotatedTester");
      Object[] params = {};
      String[] sig = {};
      server.invoke(testerName, "testBinding", params, sig);
   }
  
   public void testBindingNoAspects() throws Exception
   {
      MBeanServerConnection server = getServer();
View Full Code Here

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

   public void testNoMixin() throws Exception
   {
      MBeanServerConnection server = getServer();
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.