Examples of ComponentType


Examples of org.jboss.managed.api.ComponentType

   /**
    * TODO Process the Bootstrap server.
    */
   protected void processServer()
   {
      ComponentType type = new ComponentType("MCBean", "MCServer");
      ManagedObject serverMO = managedObjectFactory.initManagedObject(server, "JBossServer", null);
      if (serverMO.getOperations() != null && serverMO.getOperations().size() == 0)
      {
         ManagedOperationImpl shutdown = new ManagedOperationImpl("Shutdown the server", "shutdown");
         if (serverMO instanceof MutableManagedObject)
         {
            HashSet<ManagedOperation> ops = new HashSet<ManagedOperation>();
            ops.add(shutdown);
            MutableManagedObject mmo = MutableManagedObject.class.cast(serverMO);
            mmo.setOperations(ops);
         }
      }
      ManagedComponentImpl serverComp = new ManagedComponentImpl(type, null, serverMO);

      // ServerConfig
      type = new ComponentType("MCBean", "ServerConfig");
      ManagedObject mo = managedObjectFactory.initManagedObject(server.getConfiguration(), null);
      ManagedComponentImpl configComp = new ManagedComponentImpl(type, null, mo);

      view.addManagedComponent(serverComp);
      view.addManagedComponent(configComp);
View Full Code Here

Examples of org.jboss.managed.api.ComponentType

      createComponentTest("XADataSourceTemplate", propValues, "testXaDs",
         KnownComponentTypes.DataSourceTypes.XA.getType(), jndiName);
      // Query the interleaving
      ManagementView mgtView = getManagementView();
      ComponentType type = KnownComponentTypes.DataSourceTypes.XA.getType();
      ManagedComponent txcf = mgtView.getComponent(jndiName, type);
      assertNotNull(txcf);
      ManagedProperty interleaving = txcf.getProperty("interleaving");
      assertNotNull("interleaving", interleaving);
      MetaValue interleavingMV = interleaving.getValue();
View Full Code Here

Examples of org.jboss.managed.api.ComponentType

      // todo: how to set the specific domain?
      //ApplicationManagedSecurityMetaData secDomain = new ApplicationManagedSecurityMetaData();
      //props.get("security-domain").setValue(secDomain);

      createComponentTest("TxConnectionFactoryTemplate", propValues, "testTxCf",
         new ComponentType("ConnectionFactory", "Tx"), jndiName);
      // Query the interleaving
      ManagementView mgtView = getManagementView();
      ComponentType type = new ComponentType("ConnectionFactory", "Tx");
      ManagedComponent txcf = mgtView.getComponent(jndiName, type);
      assertNotNull(txcf);
      ManagedProperty interleaving = txcf.getProperty("interleaving");
      assertNotNull("interleaving", interleaving);
      MetaValue interleavingMV = interleaving.getValue();
View Full Code Here

Examples of org.jboss.managed.api.ComponentType

      // todo: how to set the specific domain?
      //ApplicationManagedSecurityMetaData secDomain = new ApplicationManagedSecurityMetaData();
      //props.get("security-domain").setValue(secDomain);

      createComponentTest("TxConnectionFactoryTemplate", propValues, "testTxXACf",
         new ComponentType("ConnectionFactory", "Tx"), jndiName);
      // Query the interleaving
      ManagementView mgtView = getManagementView();
      ComponentType type = new ComponentType("ConnectionFactory", "Tx");
      ManagedComponent txcf = mgtView.getComponent(jndiName, type);
      assertNotNull(txcf);
      ManagedProperty interleaving = txcf.getProperty("interleaving");
      assertNotNull("interleaving", interleaving);
      MetaValue interleavingMV = interleaving.getValue();
View Full Code Here

Examples of org.jboss.managed.api.ComponentType

                  new MapCompositeMetaType(SimpleMetaType.STRING)));
      // todo: how to set the specific domain?
      //ApplicationManagedSecurityMetaData secDomain = new ApplicationManagedSecurityMetaData();
      //props.get("security-domain").setValue(secDomain);

      ComponentType compType = new ComponentType("ConnectionFactory", "NoTx");
      createComponentTest("NoTxConnectionFactoryTemplate", propValues, "testNoTxCf", compType, jndiName);

      // Validate the config-property
      ManagementView mgtView = getManagementView();
      ManagedComponent dsMC = getManagedComponent(mgtView, compType, jndiName);
View Full Code Here

Examples of org.jboss.managed.api.ComponentType

    */
   public void testJTAComponentCount()
      throws Exception
   {
      ManagementView mgtView = getManagementView();
      ComponentType type = new ComponentType("MCBean", "JTA");
      Set<ManagedComponent> comps = mgtView.getComponentsForType(type);
      int count = comps.size();
      assertEquals("There is 1 MCBean:JTA ManagedComponent", 1, 1);
      ManagedComponent comp = comps.iterator().next();
      Map<String, ManagedProperty> props = comp.getProperties();
View Full Code Here

Examples of org.jboss.managed.api.ComponentType

   {
      this.excludedKeys = excludedKeys;
   }
   public ComponentType getType()
   {
      return new ComponentType(compType, compSubtype);
   }
View Full Code Here

Examples of org.jboss.managed.api.ComponentType

      assertEquals(1, counter.count());
      assertEquals(2, counter.count());

      ManagementView mgtView = getManagementView();
      mgtView.load();
      Set<ManagedComponent> comps = mgtView.getComponentsForType(new ComponentType("EJB", "StatefulSession"));
      for (ManagedComponent comp : comps)
      {
         System.out.println(comp.getName());
         ManagedProperty property = comp.getProperty("DetypedInvocationStatistics");
         if ("jboss.j2ee:jndiName=ejb/StatefulCounterEjb,service=EJB".equals(comp.getName()))
View Full Code Here

Examples of org.jboss.managed.api.ComponentType

   public void testWebApplicationManager()
      throws Exception
   {
      ManagementView mgtView = getManagementView();
      mgtView.load();
      Set<ManagedComponent> comps = mgtView.getComponentsForType(new ComponentType("MBean", "WebApplicationManager"));
      for (ManagedComponent comp : comps)
      {
         if ("jboss.web:host=localhost,path=/jmx-console,type=Manager".equals(comp.getName()))
         {
            assertEquals(16, ((SimpleValue)comp.getProperty("sessionIdLength").getValue()).getValue());
View Full Code Here

Examples of org.jboss.managed.api.ComponentType

   public void testServlet() throws Exception
   {
      ManagementView mgtView = getManagementView();
      mgtView.load();
      Set<ManagedComponent> comps = mgtView.getComponentsForType(new ComponentType("MBean", "Servlet"));
      for (ManagedComponent comp : comps)
      {
         if ("jboss.web:J2EEApplication=none,J2EEServer=none,WebModule=//localhost/jmx-console,j2eeType=Servlet,name=HtmlAdaptor".equals(comp.getName()))
         {
            assertEquals("jboss.web", ((SimpleValue)comp.getProperty("engineName").getValue()).getValue());
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.