Package org.jboss.managed.api

Examples of org.jboss.managed.api.ComponentType


        managementView.load();

        AbstractManagedDeploymentComponent parentResourceComponent = discoveryContext.getParentResourceComponent();
        ManagedDeployment parentDeployment = parentResourceComponent.getManagedDeployment();
        Collection<ManagedComponent> components = parentDeployment.getComponents().values();
        ComponentType componentType = getComponentType(discoveryContext);
        Set<DiscoveredResourceDetails> discoveredResources = new HashSet<DiscoveredResourceDetails>();
        for (ManagedComponent component : components) {
            if (component.getType().equals(componentType)) {
                String ejbName = (String)ManagedComponentUtils.getSimplePropertyValue(component, "name");
                @SuppressWarnings({"UnnecessaryLocalVariable"})
View Full Code Here


                + " is clustered or not.", e);
        }
    }

    private Double getServletMetric(ManagementView managementView, String metricName) throws Exception {
        ComponentType servletComponentType = MoreKnownComponentTypes.MBean.Servlet.getType();
        //Set<ManagedComponent> servletComponents = managementView.getMatchingComponents(this.servletComponentNamesRegex,
        //        servletComponentType, new RegularExpressionNameMatcher());
        Set<ManagedComponent> servletComponents = ManagedComponentUtils.getManagedComponents(managementView,
            servletComponentType, this.servletComponentNamesRegex, new RegularExpressionNameMatcher());
View Full Code Here

    }

    private static Set<ManagedComponent> getWebHostComponents(ManagementView managementView)
            throws Exception
    {
        ComponentType webHostComponentType = MoreKnownComponentTypes.MBean.WebHost.getType();
        return ManagedComponentUtils.getManagedComponents(managementView, webHostComponentType,
                WEB_HOST_COMPONENT_NAMES_REGEX, new RegularExpressionNameMatcher());
    }
View Full Code Here

        components.addAll(addManagedDeploymentComponent(deployName, componentName, context));

        for (ManagedComponent component : components) {

            ComponentType type = component.getType();
            String displayName;

            try {
                displayName = (String) ManagedComponentUtils.getSimplePropertyValue(component, "name");
            } catch (IllegalStateException il) {
                displayName = component.getName();
            }

            try {
                String resourceName = (String) component.getName();

                String resourceKey = component.getType() + "|" + type.getSubtype() + "|" + resourceName;

                String version = "";
                Configuration pluginConfig = new Configuration();
                pluginConfig.put(new PropertySimple(PLATFORM_DEPLOYMENT_NAME, deployName));
                pluginConfig.put(new PropertySimple(PLATFORM_COMPONENT_NAME, resourceName));
View Full Code Here

    * @throws Exception
    */
   public void testHotDeploymentBeans() throws Exception
   {
      ManagementView mgtView = getManagementView();
      ComponentType type = new ComponentType("MCBean", "ServerConfig");
      ManagedComponent mc = mgtView.getComponent("jboss.system:type=ServerConfig", type);
      assertNotNull(mc);
      String homeDir = (String) ((SimpleValue) mc.getProperty("serverHomeDir").getValue()).getValue();
      assertNotNull(homeDir);
     
View Full Code Here

  
   public void test() throws Exception
   {
     
      ManagementView managementView = getManagementView();
      ComponentType type = new ComponentType("ConnectionFactory", "Tx");
      ManagedComponent component = managementView.getComponent("JmsXA", type);
      assertNotNull(component);
  
      ManagedProperty property = component.getProperty("max-pool-size");
      assertNotNull(property);
View Full Code Here

      assertNotNull(repositoryNames);

      ManagementView mgtView = getManagementView();
     
      //
      ComponentType locaDSType = new ComponentType("DataSource", "LocalTx");
      ManagedComponent test1 = mgtView.getComponent("ProfileServiceTestDataSource1", locaDSType);
      assertNotNull(test1);
      ManagedComponent remove = mgtView.getComponent("ProfileServiceTestRemoveDataSource", locaDSType);
      assertNotNull(remove);
      ManagedComponent test2 = mgtView.getComponent("ProfileServiceTestDataSource2", locaDSType);
View Full Code Here

      useJavaCtx.setRemoved(true);
     
      mgtView.applyTemplate("testRemovedProperties", dsInfo);

      // reload the view and new datasource component
      ComponentType componentType = new ComponentType("DataSource", "LocalTx");
      activeView = null;
      mgtView = getManagementView();
      ManagedComponent dsMC = getManagedComponent(mgtView, componentType, jndiName);
      assertNotNull(dsMC);
View Full Code Here

      getLog().debug(eventInfo);
   }
  
   protected ManagedComponent getManagedComponent(ManagementView mgtView, String name) throws Exception
   {
      ComponentType type = new ComponentType("DataSource", "LocalTx");
      ManagedComponent ds = mgtView.getComponent(name, type);
      return ds;
   }
View Full Code Here

   public void testServerInfo()
      throws Exception
   {
      ManagementView mgtView = getManagementView();
      mgtView.reload();
      ComponentType type = new ComponentType("MCBean", "ServerInfo");
      getLog().debug("MCBeans: "+mgtView.getComponentsForType(type));
      ManagedComponent mc = mgtView.getComponent("jboss.system:type=ServerInfo", type);
      assertNotNull(mc);
      // Serach by alias for the jmx name
      AliasMatcher matcher = new AliasMatcher();
View Full Code Here

TOP

Related Classes of org.jboss.managed.api.ComponentType

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.