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

   }

   public ObjectName deploy(String mbeanConfiguration) throws Exception
   {
      Element mbeanElement = XMLUtil.stringToElement(mbeanConfiguration);
      MBeanConfigurationElement mbc = new MBeanConfigurationElement(mbeanElement);
      return sc.registerAndConfigureService(mbc);
   }
View Full Code Here

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

         ServiceDeploymentDescriptor mdd = ServiceConfigHelper.loadConfigFile(mainConfigFile);
        
         ServiceDeploymentDescriptor pdd = ServiceConfigHelper.loadConfigFile(persistenceConfigFile);

         MBeanConfigurationElement persistenceManagerConfig =
            ServiceConfigHelper.getServiceConfiguration(pdd, "PersistenceManager");
         persistenceManagerObjectName = sc.registerAndConfigureService(persistenceManagerConfig);
         overrideAttributes(persistenceManagerObjectName, attrOverrides);
         toStop.add(persistenceManagerObjectName);
         sc.invoke(persistenceManagerObjectName, "create", new Object[0], new String[0]);
         sc.invoke(persistenceManagerObjectName, "start", new Object[0], new String[0]);        

         MBeanConfigurationElement jmsUserManagerConfig =
            ServiceConfigHelper.getServiceConfiguration(pdd, "JMSUserManager");
         jmsUserManagerObjectName = sc.registerAndConfigureService(jmsUserManagerConfig);
         overrideAttributes(jmsUserManagerObjectName, attrOverrides);        
         toStop.add(jmsUserManagerObjectName);
         sc.invoke(jmsUserManagerObjectName, "create", new Object[0], new String[0]);
         sc.invoke(jmsUserManagerObjectName, "start", new Object[0], new String[0]);

         // register server peer as a service, dependencies are injected automatically
         MBeanConfigurationElement serverPeerConfig =
            ServiceConfigHelper.getServiceConfiguration(mdd, "ServerPeer");

         // overwrite the file configuration, if needed
         overrideServerPeerConfiguration(serverPeerConfig, serverPeerID, defaultQueueJNDIContext,
               defaultTopicJNDIContext);

         serverPeerObjectName = sc.registerAndConfigureService(serverPeerConfig);

         overrideAttributes(serverPeerObjectName, attrOverrides);

         // overwrite the config file security domain
         sc.setAttribute(serverPeerObjectName, "SecurityDomain",
                         MockJBossSecurityManager.TEST_SECURITY_DOMAIN);

         log.debug("starting JMS server");

         toStop.add(serverPeerObjectName);
         sc.invoke(serverPeerObjectName, "create", new Object[0], new String[0]);
         sc.invoke(serverPeerObjectName, "start", new Object[0], new String[0]);
        

         MBeanConfigurationElement postOfficeConfig =
            ServiceConfigHelper.getServiceConfiguration(pdd, "PostOffice");

         postOfficeObjectName = sc.registerAndConfigureService(postOfficeConfig);        
         sc.setAttribute(postOfficeObjectName, "Clustered", clustered ? "true" : "false");
            
View Full Code Here

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

         (jndiName != null ? "    <attribute name=\"JNDIName\">" + jndiName + "</attribute>" : "") +
         "       <depends optional-attribute-name=\"ServerPeer\">jboss.messaging:service=ServerPeer</depends>" +
         "       <attribute name=\"Clustered\">" + String.valueOf(clustered) + "</attribute>" +
         "</mbean>";

      MBeanConfigurationElement mbean =
         new MBeanConfigurationElement(XMLUtil.stringToElement(config));
      ObjectName deston = sc.registerAndConfigureService(mbean);
      sc.invoke(deston, "create", new Object[0], new String[0]);
      sc.invoke(deston, "start", new Object[0], new String[0]);
   }
View Full Code Here

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

         "    <attribute name=\"PageSize\">" + pageSize + "</attribute>" +
         "    <attribute name=\"DownCacheSize\">" + downCacheSize + "</attribute>" +
         "    <attribute name=\"Clustered\">" + String.valueOf(clustered) + "</attribute>" +
         "</mbean>";

      MBeanConfigurationElement mbean =
         new MBeanConfigurationElement(XMLUtil.stringToElement(config));
      ObjectName deston = sc.registerAndConfigureService(mbean);
      sc.invoke(deston, "create", new Object[0], new String[0]);
      sc.invoke(deston, "start", new Object[0], new String[0]);
   }
View Full Code Here

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

        }
        config += "</bindings></attribute>";
      }
      config += "</mbean>";

      MBeanConfigurationElement mc = new MBeanConfigurationElement(XMLUtil.stringToElement(config));
      ObjectName on = sc.registerAndConfigureService(mc);
           
     
      log.trace("Object name is now: " + on);
     
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.