Examples of ManagementContextMBean


Examples of org.apache.servicemix.jbi.management.ManagementContextMBean

        }
    }
   
    protected void fillViewRequest(RenderRequest request) throws Exception {
        LifeCycleMBean container = getJBIContainer();
        ManagementContextMBean management = getManagementContext();
        request.setAttribute("state", container.getCurrentState());
        request.setAttribute("info", management.getSystemInfo());
        ObjectName[] services = management.getSystemServices();
        List infos = new ArrayList();
        for (int i = 0; i < services.length; i++) {
            ServiceInfo info = new ServiceInfo();
            info.name =  getAttribute(services[i], "name");
            info.description =  getAttribute(services[i], "description");
View Full Code Here

Examples of org.apache.servicemix.jbi.management.ManagementContextMBean

    protected void doProcessAction(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
        String action = actionRequest.getParameter("action");
        String name   = actionRequest.getParameter("name");
        System.err.println("doProcessAction: " + action + " for " + name);
        ManagementContextMBean management = getManagementContext();
        ObjectName service = management.getSystemService(getContainerName() + "." + name);
        getServerConnection().invoke(service, action, new Object[0], new String[0]);
    }
View Full Code Here

Examples of org.apache.servicemix.jbi.management.ManagementContextMBean

        protected void renderCompRequest(RenderRequest request, RenderResponse response) throws Exception {
            compView.include(request, response);
        }
       
      protected void renderListRequest(RenderRequest request, RenderResponse response) throws Exception {
          ManagementContextMBean management = getManagementContext();
          SortedMap components = new TreeMap();
          ObjectName[] bcs = management.getBindingComponents();
          for (int i = 0; i < bcs.length; i++) {
              ComponentInfo info = new ComponentInfo();
              info.name =  getAttribute(bcs[i], "name");
              info.type =  "Binding Component";
              info.state =  getAttribute(bcs[i], "currentState");
              components.put(info.name, info);
          }
          ObjectName[] ses = management.getEngineComponents();
          for (int i = 0; i < ses.length; i++) {
              ComponentInfo info = new ComponentInfo();
              info.name =  getAttribute(ses[i], "name");
              info.type =  "Service Engine";
              info.state =  getAttribute(ses[i], "currentState");
View Full Code Here

Examples of org.apache.servicemix.jbi.management.ManagementContextMBean

      protected void doProcessAction(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
          String action = actionRequest.getParameter("action");
          String name   = actionRequest.getParameter("name");
          System.err.println("doProcessAction: " + action + " for " + name);
          ManagementContextMBean management = getManagementContext();
          if ("stop".equals(action)) {
            management.stopComponent(name);
          } else if ("start".equals(action)) {
            management.startComponent(name);
          } else if ("shutdown".equals(action)) {
            management.shutDownComponent(name);
          }
      }
View Full Code Here

Examples of org.apache.servicemix.jbi.management.ManagementContextMBean

        }
    }
   
    protected void fillViewRequest(RenderRequest request) throws Exception {
        LifeCycleMBean container = getJBIContainer();
        ManagementContextMBean management = getManagementContext();
        request.setAttribute("state", container.getCurrentState());
        request.setAttribute("info", management.getSystemInfo());
        ObjectName[] services = management.getSystemServices();
        List infos = new ArrayList();
        for (int i = 0; i < services.length; i++) {
            ServiceInfo info = new ServiceInfo();
            info.name =  getAttribute(services[i], "name");
            info.description =  getAttribute(services[i], "description");
View Full Code Here

Examples of org.apache.servicemix.jbi.management.ManagementContextMBean

    protected void doProcessAction(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
        String action = actionRequest.getParameter("action");
        String name   = actionRequest.getParameter("name");
        System.err.println("doProcessAction: " + action + " for " + name);
        ManagementContextMBean management = getManagementContext();
        ObjectName service = management.getSystemService(getContainerName() + "." + name);
        getServerConnection().invoke(service, action, new Object[0], new String[0]);
    }
View Full Code Here

Examples of org.apache.servicemix.jbi.management.ManagementContextMBean

        protected void renderCompRequest(RenderRequest request, RenderResponse response) throws Exception {
            compView.include(request, response);
        }
       
      protected void renderListRequest(RenderRequest request, RenderResponse response) throws Exception {
          ManagementContextMBean management = getManagementContext();
          SortedMap components = new TreeMap();
          ObjectName[] bcs = management.getBindingComponents();
          for (int i = 0; i < bcs.length; i++) {
              ComponentInfo info = new ComponentInfo();
              info.name =  getAttribute(bcs[i], "name");
              info.type =  "Binding Component";
              info.state =  getAttribute(bcs[i], "currentState");
              components.put(info.name, info);
          }
          ObjectName[] ses = management.getEngineComponents();
          for (int i = 0; i < ses.length; i++) {
              ComponentInfo info = new ComponentInfo();
              info.name =  getAttribute(ses[i], "name");
              info.type =  "Service Engine";
              info.state =  getAttribute(ses[i], "currentState");
View Full Code Here

Examples of org.apache.servicemix.jbi.management.ManagementContextMBean

      protected void doProcessAction(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
          String action = actionRequest.getParameter("action");
          String name   = actionRequest.getParameter("name");
          System.err.println("doProcessAction: " + action + " for " + name);
          ManagementContextMBean management = getManagementContext();
          if ("stop".equals(action)) {
            management.stopComponent(name);
          } else if ("start".equals(action)) {
            management.startComponent(name);
          } else if ("shutdown".equals(action)) {
            management.shutDownComponent(name);
          }
      }
View Full Code Here

Examples of org.servicemix.jbi.management.ManagementContextMBean

    public void execute() throws BuildException {
        if (componentName == null) {
            throw new BuildException("null componentName");
        }
        try {
            ManagementContextMBean is = getManagementContext();
            is.shutDownComponent(componentName);
        }
        catch (IOException e) {
            log.error("Caught an exception shutting down component", e);
            throw new BuildException(e);
        }
View Full Code Here

Examples of org.servicemix.jbi.management.ManagementContextMBean

    public void execute() throws BuildException {
        if (componentName == null) {
            throw new BuildException("null compoenntName");
        }
        try {
            ManagementContextMBean is = getManagementContext();
            is.stopComponent(componentName);
        }
        catch (IOException e) {
            log.error("Caught an exception stopping component", e);
            throw new BuildException(e);
        }
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.