Examples of MBeanConfigurationElement


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

      // Note that we DO NOT want the direct thread pool on the server side - since that can lead
      // to deadlocks

      String configFileName = "remoting/remoting-" + transport + "-service.xml";

      MBeanConfigurationElement connectorServiceConfig =
         ServiceConfigHelper.loadServiceConfiguration(configFileName, "Connector");
     
      String invokerConfig = connectorServiceConfig.getAttributeValue("Configuration");
     
      Element invokerElement = (Element) XMLUtil
         .stringToElement(invokerConfig)
         .getElementsByTagName("invoker").item(0);
     
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

      List connFactoryElements = cfdd.query("service", "ConnectionFactory");

      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]);
         connFactoryObjectNames.add(on);
      }
     
      connFactoryElements = cfdd.query("service", "ClusteredConnectionFactory");

      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]);
         connFactoryObjectNames.add(on);
      }
     
      connFactoryElements = cfdd.query("service", "HTTPConnectionFactory");

      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]);
         connFactoryObjectNames.add(on);
      }
     
      connFactoryElements = cfdd.query("service", "ClusterPullConnectionFactory");

      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

   private void init(String configFilePath, boolean skipMultiplex, MBeanServer mbeanServer)
      throws Exception
   {
      log.debug("using configuration file " + configFilePath);

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

      // first, we try to use a channel factory service, if we find one configured
      String s = (String)postOfficeConfig.getAttributeValue("ChannelFactoryName");

      if (s != null && !skipMultiplex)
      {
         // there's a chance we can use a multiplexer service
         ObjectName channelFactoryName = new ObjectName(s);

         String channelPartitionName =
            (String)postOfficeConfig.getAttributeValue("ChannelPartitionName");

         if (channelPartitionName == null)
         {
            throw new IllegalStateException("Cannot find ChannelPartitionName");
         }

         String controlChannelName = (String)postOfficeConfig.getAttributeValue("ControlChannelName");

         if (controlChannelName == null)
         {
            throw new IllegalStateException("Cannot find ControlChannelName");
         }

         String dataChannelName = (String)postOfficeConfig.getAttributeValue("DataChannelName");

         if (dataChannelName == null)
         {
            throw new IllegalStateException("Cannot find DataChannelName");
         }

         try
         {
            if(mbeanServer.getMBeanInfo(channelFactoryName) != null)
            {
               multiplexorDelegate =
                  new MultiplexerChannelFactory(mbeanServer, channelFactoryName,
                                                 channelPartitionName, controlChannelName,
                                                 dataChannelName);

               // initialization ends here, we've found what we were looking for
               return;
            }
         }
         catch (Exception e)
         {
            // that's alright, no multiplexer there, use the regular XML configuration
            log.debug("Wasn't able to find " + s);
         }
      }

      // the only chance now is to use the XML configurations

      s = (String)postOfficeConfig.getAttributeValue("ControlChannelConfig");

      if (s == null)
      {
         throw new IllegalStateException("Cannot find ControlChannelConfig");
      }

      controlConfig = XMLUtil.stringToElement(s);

      s = (String)postOfficeConfig.getAttributeValue("DataChannelConfig");

      if (s == null)
      {
         throw new IllegalStateException("Cannot find DataChannelConfig");
      }
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

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

      // Note that we DO NOT want the direct thread pool on the server side - since that can lead
      // to deadlocks

      String configFileName = "remoting/remoting-" + transport + "-service.xml";

      MBeanConfigurationElement connectorServiceConfig =
         ServiceConfigHelper.loadServiceConfiguration(configFileName, "Connector");

      String invokerConfig = connectorServiceConfig.getAttributeValue("Configuration");

      Element invokerElement = (Element) XMLUtil
         .stringToElement(invokerConfig)
         .getElementsByTagName("invoker").item(0);
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

      List connFactoryElements = cfdd.query("service", "ConnectionFactory");

      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]);
         connFactoryObjectNames.add(on);
      }

      connFactoryElements = cfdd.query("service", "ClusteredConnectionFactory");

      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]);
         connFactoryObjectNames.add(on);
      }

      connFactoryElements = cfdd.query("service", "HTTPConnectionFactory");

      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]);
         connFactoryObjectNames.add(on);
      }

      connFactoryElements = cfdd.query("service", "ClusterPullConnectionFactory");

      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
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.