Examples of MBeanConfigurationElement


Examples of org.jboss.test.messaging.tools.jboss.MBeanConfigurationElement

         "             </something>" +
         "       </attribute>" +
         "</mbean>";

      Element e = XMLUtil.stringToElement(s);
      MBeanConfigurationElement mbeanConfig = new MBeanConfigurationElement(e);

      Set optionalAttributeNames = mbeanConfig.attributeNames();
      assertEquals(1, optionalAttributeNames.size());
      assertTrue(optionalAttributeNames.contains("xmlattribute"));

      String attributeValue = mbeanConfig.getAttributeValue("xmlattribute");

      Node n = XMLUtil.stringToElement(attributeValue);
      assertEquals("something", n.getNodeName());

      NodeList nl = n.getChildNodes();
View Full Code Here

Examples of org.jboss.test.messaging.tools.jboss.MBeanConfigurationElement

         "           <arg type=\"int\" value=\"77\" />\n" +
         "       </constructor>" +
         "</mbean>";

      Element e = XMLUtil.stringToElement(s);
      MBeanConfigurationElement mbeanConfig = new MBeanConfigurationElement(e);

      assertEquals(new ObjectName("somedomain:service=SomeService"), mbeanConfig.getObjectName());
      assertEquals("org.example.SomeClass", mbeanConfig.getMBeanClassName());


      assertEquals(String.class,  mbeanConfig.getConstructorArgumentType(0, 0));
      assertEquals("blah", mbeanConfig.getConstructorArgumentValue(0, 0));

      assertEquals(Integer.class,  mbeanConfig.getConstructorArgumentType(0, 1));
      assertEquals("55", mbeanConfig.getConstructorArgumentValue(0, 1));

      assertEquals(Integer.TYPE,  mbeanConfig.getConstructorArgumentType(0, 2));
      assertEquals("77", mbeanConfig.getConstructorArgumentValue(0, 2));

      // test constructor argument value change

      mbeanConfig.setConstructorArgumentValue(0, 0, "xerxex");
      assertEquals("xerxex", mbeanConfig.getConstructorArgumentValue(0, 0));

   }
View Full Code Here

Examples of org.jboss.test.messaging.tools.jboss.MBeanConfigurationElement

      List list;

      list = sdd.query("service", "SomeService");
      assertEquals(1, list.size());
      MBeanConfigurationElement e = (MBeanConfigurationElement)list.get(0);
      assertNotNull(e);

      list = sdd.query("somekey", "somevalue");
      assertEquals(1, list.size());
      e = (MBeanConfigurationElement)list.get(0);
View Full Code Here

Examples of org.jboss.test.messaging.tools.jboss.MBeanConfigurationElement

         throw new Exception("Cannot find " + persistenceConfigFile + " in the classpath");
      }

      ServiceDeploymentDescriptor pdd = new ServiceDeploymentDescriptor(persistenceConfigFileURL);

      MBeanConfigurationElement persistenceManagerConfig =
         (MBeanConfigurationElement)pdd.query("service", "PersistenceManager").iterator().next();

      String props = persistenceManagerConfig.getAttributeValue("SqlProperties");

      if (props != null)
      {
         ByteArrayInputStream is = new ByteArrayInputStream(props.getBytes());
View Full Code Here

Examples of org.jboss.test.messaging.tools.jboss.MBeanConfigurationElement

         throw new Exception("Cannot find " + persistenceConfigFile + " in the classpath");
      }

      ServiceDeploymentDescriptor pdd = new ServiceDeploymentDescriptor(persistenceConfigFileURL);

      MBeanConfigurationElement postOfficeConfig =
         (MBeanConfigurationElement)pdd.query("service", "PostOffice").iterator().next();

      String props = postOfficeConfig.getAttributeValue("SqlProperties");

      if (props != null)
      {
         ByteArrayInputStream is = new ByteArrayInputStream(props.getBytes());
View Full Code Here

Examples of org.jboss.test.messaging.tools.jboss.MBeanConfigurationElement

         throw new Exception("Cannot find " + persistenceConfigFile + " in the classpath");
      }

      ServiceDeploymentDescriptor pdd = new ServiceDeploymentDescriptor(persistenceConfigFileURL);

      MBeanConfigurationElement postOfficeConfig =
         (MBeanConfigurationElement)pdd.query("service", "PostOffice").iterator().next();

      String props = postOfficeConfig.getAttributeValue("SqlProperties");

      if (props != null)
      {
         ByteArrayInputStream is = new ByteArrayInputStream(props.getBytes());
View Full Code Here

Examples of org.jboss.test.messaging.tools.jboss.MBeanConfigurationElement

      else
      {
         log.info("Could find multiplexer config");
      }

      MBeanConfigurationElement multiplexerConfig =
         (MBeanConfigurationElement)services.iterator().next();
      ObjectName nameMultiplexer = registerAndConfigureService(multiplexerConfig);
      invoke(nameMultiplexer,"create", new Object[0], new String[0]);
      invoke(nameMultiplexer,"start", new Object[0], new String[0]);
   }
View Full Code Here

Examples of org.jboss.test.messaging.tools.jboss.MBeanConfigurationElement

         connFactoryElements = cfdd.query("service", "HTTPConnectionFactory");
      }
      connFactoryObjectNames.clear();
      for (Iterator i = connFactoryElements.iterator(); i.hasNext();)
      {
         MBeanConfigurationElement connFactoryElement = (MBeanConfigurationElement) i.next();
         ObjectName on = registerAndConfigureService(connFactoryElement);
         overrideAttributes(on, attrOverrides);
         // dependencies have been automatically injected already
         invoke(on, "create", new Object[0], new String[0]);
         invoke(on, "start", new Object[0], new String[0]);
View Full Code Here

Examples of org.jboss.test.messaging.tools.jboss.MBeanConfigurationElement

   public Properties getPersistenceManagerSQLProperties() throws Exception
   {
      String persistenceConfigFile = getPersistenceConfigFile(false);
      log.info("Persistence config file: .... " + persistenceConfigFile);

      MBeanConfigurationElement persistenceManagerConfig =
         ServiceConfigHelper.loadServiceConfiguration(persistenceConfigFile, "PersistenceManager");

      String props = persistenceManagerConfig.getAttributeValue("SqlProperties");

      if (props != null)
      {
         ByteArrayInputStream is = new ByteArrayInputStream(props.getBytes());
View Full Code Here

Examples of org.jboss.test.messaging.tools.jboss.MBeanConfigurationElement

   public Properties getPostOfficeSQLProperties() throws Exception
   {
      String persistenceConfigFile = getPersistenceConfigFile(true);
      log.info("Persistence config file: .... " + persistenceConfigFile);

      MBeanConfigurationElement postOfficeConfig =
         ServiceConfigHelper.loadServiceConfiguration(persistenceConfigFile, "PostOffice");

      String props = postOfficeConfig.getAttributeValue("SqlProperties");

      if (props != null)
      {
         ByteArrayInputStream is = new ByteArrayInputStream(props.getBytes());
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.