Package org.springframework.jmx

Examples of org.springframework.jmx.MBeanServerNotFoundException


      // Attempt to load the PlatformMBeanServer.
      try {
        server = ManagementFactory.getPlatformMBeanServer();
      }
      catch (SecurityException ex) {
        throw new MBeanServerNotFoundException("No specific MBeanServer found, " +
            "and not allowed to obtain the Java platform MBeanServer", ex);
      }
    }

    if (server == null) {
      throw new MBeanServerNotFoundException(
          "Unable to locate an MBeanServer instance" +
          (agentId != null ? " with agent id [" + agentId + "]" : ""));
    }

    if (logger.isDebugEnabled()) {
View Full Code Here


      try {
        this.connector = JMXConnectorFactory.connect(serviceUrl);
        return this.connector.getMBeanServerConnection();
      }
      catch (IOException ex) {
        throw new MBeanServerNotFoundException("Could not connect to remote MBeanServer [" + serviceUrl + "]", ex);
      }
    }
    else {
      logger.debug("Attempting to locate local MBeanServer");
      return JmxUtils.locateMBeanServer(agentId);
View Full Code Here

        this.server.addNotificationListener(this.actualObjectNames[i],
            getNotificationListener(), getNotificationFilter(), getHandback());
      }
    }
    catch (IOException ex) {
      throw new MBeanServerNotFoundException(
          "Could not connect to remote MBeanServer at URL [" + this.serviceUrl + "]", ex);
    }
    catch (Exception ex) {
      throw new JmxException("Unable to register NotificationListener", ex);
    }
View Full Code Here

      try {
        this.connector = JMXConnectorFactory.connect(this.serviceUrl);
        this.server = this.connector.getMBeanServerConnection();
      }
      catch (IOException ex) {
        throw new MBeanServerNotFoundException(
            "Could not connect to remote MBeanServer at URL [" + this.serviceUrl + "]", ex);
      }
    }
    else {
      logger.debug("Attempting to locate local MBeanServer");
View Full Code Here

      // Attempt to load the PlatformMBeanServer.
      try {
        server = ManagementFactory.getPlatformMBeanServer();
      }
      catch (SecurityException ex) {
        throw new MBeanServerNotFoundException("No specific MBeanServer found, " +
            "and not allowed to obtain the Java platform MBeanServer", ex);
      }
    }

    if (server == null) {
      throw new MBeanServerNotFoundException(
          "Unable to locate an MBeanServer instance" +
          (agentId != null ? " with agent id [" + agentId + "]" : ""));
    }

    if (logger.isDebugEnabled()) {
View Full Code Here

      Object mbeanFactory = getMBeanFactoryMethod.invoke(null);
      Method getMBeanServerMethod = mbeanFactory.getClass().getMethod(GET_MBEAN_SERVER_METHOD);
      this.mbeanServer = (MBeanServer) getMBeanServerMethod.invoke(mbeanFactory);
    }
    catch (ClassNotFoundException ex) {
      throw new MBeanServerNotFoundException("Could not find WebSphere's AdminServiceFactory class", ex);
    }
    catch (InvocationTargetException ex) {
      throw new MBeanServerNotFoundException(
          "WebSphere's AdminServiceFactory.getMBeanFactory/getMBeanServer method failed", ex.getTargetException());
    }
    catch (Exception ex) {
      throw new MBeanServerNotFoundException(
          "Could not access WebSphere's AdminServiceFactory.getMBeanFactory/getMBeanServer method", ex);
    }
  }
View Full Code Here

      try {
        this.connector = JMXConnectorFactory.connect(serviceUrl, environment);
        return this.connector.getMBeanServerConnection();
      }
      catch (IOException ex) {
        throw new MBeanServerNotFoundException("Could not connect to remote MBeanServer [" + serviceUrl + "]", ex);
      }
    }
    else {
      logger.debug("Attempting to locate local MBeanServer");
      return JmxUtils.locateMBeanServer(agentId);
View Full Code Here

       */
      this.mbeanServer = (MBeanServer)
          mbeanHome.getClass().getMethod(GET_MBEAN_SERVER_METHOD, null).invoke(mbeanHome, null);
    }
    catch (NamingException ex) {
      throw new MBeanServerNotFoundException("Could not find WebLogic's MBeanHome object in JNDI", ex);
    }
    catch (ClassNotFoundException ex) {
      throw new MBeanServerNotFoundException("Could not find WebLogic's MBeanHome class", ex);
    }
    catch (InvocationTargetException ex) {
      throw new MBeanServerNotFoundException(
          "WebLogic's MBeanHome.getMBeanServer method failed", ex.getTargetException());
    }
    catch (Exception ex) {
      throw new MBeanServerNotFoundException(
          "Could not access WebLogic's MBeanHome/getMBeanServer method", ex);
    }
  }
View Full Code Here

      // Attempt to load the PlatformMBeanServer.
      try {
        server = ManagementFactory.getPlatformMBeanServer();
      }
      catch (SecurityException ex) {
        throw new MBeanServerNotFoundException("No specific MBeanServer found, " +
            "and not allowed to obtain the Java platform MBeanServer", ex);
      }
    }

    if (server == null) {
      throw new MBeanServerNotFoundException(
          "Unable to locate an MBeanServer instance" +
          (agentId != null ? " with agent id [" + agentId + "]" : ""));
    }

    if (logger.isDebugEnabled()) {
View Full Code Here

      Object mbeanFactory = getMBeanFactoryMethod.invoke(null, new Object[0]);
      Method getMBeanServerMethod = mbeanFactory.getClass().getMethod(GET_MBEAN_SERVER_METHOD, new Class[0]);
      this.mbeanServer = (MBeanServer) getMBeanServerMethod.invoke(mbeanFactory, new Object[0]);
    }
    catch (ClassNotFoundException ex) {
      throw new MBeanServerNotFoundException("Could not find WebSphere's AdminServiceFactory class", ex);
    }
    catch (InvocationTargetException ex) {
      throw new MBeanServerNotFoundException(
          "WebSphere's AdminServiceFactory.getMBeanFactory/getMBeanServer method failed", ex.getTargetException());
    }
    catch (Exception ex) {
      throw new MBeanServerNotFoundException(
          "Could not access WebSphere's AdminServiceFactory.getMBeanFactory/getMBeanServer method", ex);
    }
  }
View Full Code Here

TOP

Related Classes of org.springframework.jmx.MBeanServerNotFoundException

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.