Package javax.management

Examples of javax.management.MBeanServerConnection.invoke()


      {
         MBeanServerConnection server = getServer();
         ObjectName testerName = new ObjectName("jboss.aop:name=ScopedTester2");
         Object[] params = {};
         String[] sig = {};
         server.invoke(testerName, "testScoped", params, sig);
      }
      finally
      {
         undeploy("aop-scopedattachtest2.aop");
      }
View Full Code Here


   {
      MBeanServerConnection adaptor = delegate.getServer();
      ObjectName on = new ObjectName(ClassLoaderTrackerMBean.OBJECT_NAME);
      Object[] params = { keys };
      String[] signature = new String[] { String[].class.getName() };
      return ((List) adaptor.invoke(on, "hasClassLoaders", params, signature));
   }
  
//   private boolean hasClassLoader(String key) throws Exception
//   {
//      MBeanServerConnection adaptor = delegate.getServer();
View Full Code Here

   {
      MBeanServerConnection adaptor = delegate.getServer();
      ObjectName on = new ObjectName(ClassLoaderTrackerMBean.OBJECT_NAME);
      Object[] params = { key };
      String[] signature = new String[] { String.class.getName() };
      return ((Boolean) adaptor.invoke(on, "hasClassLoaderBeenReleased", params, signature)).booleanValue();
   }
  
   private void removeClassLoader(String key) throws Exception
   {
      try
View Full Code Here

      {
         MBeanServerConnection adaptor = delegate.getServer();
         ObjectName on = new ObjectName(ClassLoaderTrackerMBean.OBJECT_NAME);
         Object[] params = { key };
         String[] signature = new String[] { String.class.getName() };
         adaptor.invoke(on, "removeClassLoader", params, signature);
      }
      catch (Exception e)
      {
         log.error("Caught exception removing classloader under key " + key, e);
      }
View Full Code Here

      log.debug("Flushing security cache " + domain);
      MBeanServerConnection adaptor = delegate.getServer();
      ObjectName on = new ObjectName(ClassLoaderTrackerMBean.OBJECT_NAME);
      Object[] params = { domain };
      String[] signature = new String[] { String.class.getName() };
      adaptor.invoke(on, "flushSecurityCache", params, signature);
   }
  
   protected void makeWebRequest(String url, String responseContent)
   {
      HttpClient client = new HttpClient();
View Full Code Here

      ObjectName name = new ObjectName("jboss.test:test=JavaClassIsolation");
      deploy("test-java-class-isolation.sar");
      try
      {
         MBeanServerConnection server = getServer();
         server.invoke(name, "test", null, null);
      }
      finally
      {
         undeploy("test-java-class-isolation.sar");
      }
View Full Code Here

      try
      {
         boolean isRegistered = server.isRegistered(deploymentService);
         assertTrue(deploymentService + " is registered", isRegistered);
         log.info("Loaded templates: "
               + server.invoke(deploymentService, "listModuleTemplates",
                     new Object[] {}, new String[] {}));
      }
      finally
      {
         // empty
View Full Code Here

         throws Exception
   {
      MBeanServerConnection server = getServer();

      // create the module
      module = (String) server
            .invoke(deploymentService, "createModule", new Object[] { module,
                  template, props }, new String[] { "java.lang.String",
                  "java.lang.String", "java.util.HashMap" });

      log.info("Module '" + module + "' created: " + module);
View Full Code Here

   private boolean removeModule(String module) throws Exception
   {
      MBeanServerConnection server = getServer();

      // remove the module, in case it exists
      Boolean removed = (Boolean) server.invoke(deploymentService,
            "removeModule", new Object[] { module },
            new String[] { "java.lang.String" });

      log.info("Module '" + module + "' removed: " + removed);
View Full Code Here

   private boolean deployModule(String module) throws Exception
   {
      MBeanServerConnection server = getServer();

      // Deploy the module (move to ./deploy)
      server.invoke(deploymentService, "deployModuleAsynch",
            new Object[] { module }, new String[] { "java.lang.String" });

      return verifyDeploy(server, module);
   }
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.