Package org.jboss.deployers.spi.management

Examples of org.jboss.deployers.spi.management.ManagementView


   }
  
   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


      fail("Could not find jmx-console Manager");
   }

   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

      fail("Could not find HtmlAdapor servlet");
   }

   public void testWebApplication() throws Exception
   {
      ManagementView mgtView = getManagementView();
      mgtView.load();
      Set<ManagedComponent> comps = mgtView.getComponentsForType(new ComponentType("MBean", "WebApplication"));
      for (ManagedComponent comp : comps)
      {
         if ("jboss.web:J2EEApplication=none,J2EEServer=none,j2eeType=WebModule,name=//localhost/jmx-console".equals(comp.getName()))
         {
            assertEquals("jboss", ((SimpleValue)comp.getProperty("server").getValue()).getValue());
View Full Code Here

      fail("Could not find jmx-console Web Application");
   }

   public void testWebHost() throws Exception
   {
      ManagementView mgtView = getManagementView();
      mgtView.load();
      Set<ManagedComponent> comps = mgtView.getComponentsForType(new ComponentType("MBean", "WebHost"));
      for (ManagedComponent comp : comps)
      {
         if ("jboss.web:host=localhost,type=Host".equals(comp.getName()))
         {
            assertEquals("localhost", ((SimpleValue)comp.getProperty("name").getValue()).getValue());
View Full Code Here

      fail("Could not find localhost Host");
   }

   public void testConnector() throws Exception
   {
      ManagementView mgtView = getManagementView();
      mgtView.load();
      Set<ManagedComponent> comps = mgtView.getComponentsForType(new ComponentType("MBean", "WebRequestProcessor"));
      for (ManagedComponent comp : comps)
      {
         if (comp.getName().startsWith("jboss.web:name=http-"))
         {
            // Statistic
View Full Code Here

      fail("Could not find connector!");
   }

   public void testContextMO() throws Exception
   {
      ManagementView mgtView = getManagementView();
      mgtView.load();
      Set<ManagedComponent> comps = mgtView.getComponentsForType(new ComponentType("WAR", "Context"));
      for (ManagedComponent comp : comps)
      {
         if (comp.getDeployment().getName().endsWith("jmx-console.war"))
         {
            assertEquals("/jmx-console", ((SimpleValue)comp.getProperty("contextRoot").getValue()).getValue());
View Full Code Here

      fail("Could not find deployment context root!");
   }

   public void testRunState() throws Exception
   {
      ManagementView mgtView = getManagementView();
      Set<ManagedComponent> comps = mgtView.getComponentsForType(new ComponentType("MBean", "WebHost"));
      for (ManagedComponent comp : comps)
      {
         if ("jboss.web:host=localhost,type=Host".equals(comp.getName()))
         {
            assertEquals(RunState.RUNNING, comp.getRunState());
View Full Code Here

    * JBAS-6672 related testing of properties having default values
    * @throws Exception
    */
   public void testRemovedProperties() throws Exception
   {
      ManagementView mgtView = getManagementView();
      String templateName = "LocalTxDataSourceTemplate";
      String jndiName = "testRemovedPropertiesDS";
      DeploymentTemplateInfo dsInfo = mgtView.getTemplate(templateName);
      assertNotNull("template " + templateName + " found", dsInfo);
      log.info(dsInfo.getProperties().keySet());
      Map<String, ManagedProperty> props = dsInfo.getProperties();

      // Set key property values
      ManagedProperty jndiNameMP = props.get("jndi-name");
      jndiNameMP.setValue(SimpleValueSupport.wrap(jndiName));
      ManagedProperty driverClass = props.get("driver-class");
      driverClass.setValue(SimpleValueSupport.wrap("org.hsqldb.jdbcDriver"));
      ManagedProperty connUrl = props.get("connection-url");
      connUrl.setValue(SimpleValueSupport.wrap("jdbc:hsqldb:."));
      ManagedProperty userName = props.get("user-name");
      userName.setValue(SimpleValueSupport.wrap("sa"));
      ManagedProperty password = props.get("password");
      password.setValue(SimpleValueSupport.wrap(""));

      // Remove the
      ManagedProperty useJavaCtx = props.get("use-java-context");
      SimpleValue nullBoolean = SimpleValueSupport.wrap(false);
      ((SimpleValueSupport)nullBoolean).setValue(null);
      useJavaCtx.setValue(nullBoolean);
      useJavaCtx.setRemoved(true);
     
      mgtView.applyTemplate("testRemovedProperties", dsInfo);

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

            status = progress.getDeploymentStatus();
            assertTrue("DeploymentStatus.isCompleted: " + status, status.isCompleted());
            assertFalse("DeploymentStatus.isRunning: " + status, status.isRunning());
            assertFalse("DeploymentStatus.isFailed: " + status, status.isFailed());
            // Check for a
            ManagementView mgtView = getManagementView();
            ManagedDeployment deployment = mgtView.getDeployment(uploadedNames[0]);
            assertNotNull(deployment);
            getLog().info("Found " + type + " deployment: " + deployment);
            Set<String> types = deployment.getTypes();
            if (types != null && types.isEmpty() == false)
               assertTrue("Missing type: " + type + ", available: " + types, types.contains(type));
View Full Code Here

   }


   private ManagedComponent getServiceBindingManagerManagedComponent() throws Exception
   {
      ManagementView managementView = getManagementView();
      ComponentType type = new ComponentType("MCBean", "ServiceBindingManager");
      ManagedComponent component = managementView.getComponent("ServiceBindingManager", type);
      assertNotNull(component);
      return component;
   }
View Full Code Here

TOP

Related Classes of org.jboss.deployers.spi.management.ManagementView

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.