Package org.jboss.managed.api

Examples of org.jboss.managed.api.ManagedComponent


      values.put("user", createCompositeValue(true, null, null));
      CompositeValue map = new MapCompositeValueSupport(values, securityConfType);
      propValues.put("securityConfig", map);
     
      createComponentTest("QueueTemplate", propValues, getName(), QueueType, jndiName);
      ManagedComponent queue = activeView.getComponent("testCreateSecureQueue", QueueType);
      assertNotNull(queue);
      assertEquals("testCreateSecureQueue", queue.getName());
      log.info(queue.getProperties().keySet());
      assertNotNull(queue.getProperty("securityConfig").getValue());
     
   }
View Full Code Here


   }
  
   public void testRemoveSecureQueue() throws Exception
   {
      removeDeployment("testCreateSecureQueue-service.xml");
             ManagedComponent queue = getManagementView().getComponent("testCreateSecureQueue", QueueType);
      assertNull("queue should be removed" + queue, queue);
   }
View Full Code Here

      propValues.put("DLQ", SimpleValueSupport.wrap((String)null));
      propValues.put("expiryQueue", null);
     
      ComponentType type = KnownComponentTypes.JMSDestination.Queue.getType();
      createComponentTest("QueueTemplate", propValues, getName(), type, jndiName);
      ManagedComponent queue = activeView.getComponent("testCreateQueueWithNullDLQ", type);
      assertNotNull(queue);
      assertEquals("testCreateQueueWithNullDLQ", queue.getName());
      log.info(queue.getProperties().keySet());
      assertEquals("downCacheSize", queue.getProperty("downCacheSize").getValue(), new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, 1999));

      ManagedProperty serverPeer = queue.getProperty("serverPeer");
      assertNotNull(serverPeer);
      MetaType serverPeerType = serverPeer.getMetaType();
      assertEquals(SimpleMetaType.STRING, serverPeerType);
      ManagedProperty dlq = queue.getProperty("DLQ");
      assertNotNull(dlq);
      MetaType dlqType = dlq.getMetaType();
      assertEquals(SimpleMetaType.STRING, dlqType);
      ManagedProperty expiryQueue = queue.getProperty("expiryQueue");
      assertNotNull(expiryQueue);
      MetaType expiryQueueType = serverPeer.getMetaType();
      assertEquals(SimpleMetaType.STRING, expiryQueueType);
   }
View Full Code Here

      assertEquals(SimpleMetaType.STRING, expiryQueueType);
   }
   public void testRemoveQueueWithNullDLQ() throws Exception
   {
      removeDeployment("testCreateQueueWithNullDLQ-service.xml");
      ManagedComponent queue = getManagementView().getComponent("testCreateQueueWithNullDLQ", QueueType);
      assertNull("queue should be removed" + queue, queue);
   }
View Full Code Here

    *
    * @throws Exception if an error occurs while running the test.
    */
   public void testValidateSBMContent() throws Exception
   {
      ManagedComponent component = getServiceBindingManagerManagedComponent();

      logHierarchy(component);

      // verify that the component has the expected properties.
      Map<String, ManagedProperty> properties = component.getProperties();
      assertNotNull(properties);
     
      getLog().debug("ServiceBindingManager properties: ");
      for (Map.Entry<String, ManagedProperty> entry : properties.entrySet())
      {
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

   public void test() throws Exception
   {
     
      ManagementView managementView = getManagementView();
      ComponentType type = new ComponentType("ConnectionFactory", "Tx");
      ManagedComponent component = managementView.getComponent("JmsXA", type);
      assertNotNull(component);
  
      ManagedProperty property = component.getProperty("max-pool-size");
      assertNotNull(property);
     
      property.setValue(SimpleValueSupport.wrap(21));
     
      // TODO test more properties.
View Full Code Here

      ManagementView mgtView = getManagementView();
     
      //
      ComponentType locaDSType = new ComponentType("DataSource", "LocalTx");
      ManagedComponent test1 = mgtView.getComponent("ProfileServiceTestDataSource1", locaDSType);
      assertNotNull(test1);
      ManagedComponent remove = mgtView.getComponent("ProfileServiceTestRemoveDataSource", locaDSType);
      assertNotNull(remove);
      ManagedComponent test2 = mgtView.getComponent("ProfileServiceTestDataSource2", locaDSType);
      assertNotNull(test2)
      // Remove
      mgtView.removeComponent(remove);
     
      // Redeploy
View Full Code Here

    */
   public void testHotDeploymentBeans() throws Exception
   {
      ManagementView mgtView = getManagementView();
      ComponentType type = new ComponentType("MCBean", "ServerConfig");
      ManagedComponent mc = mgtView.getComponent("jboss.system:type=ServerConfig", type);
      assertNotNull(mc);
      ManagedProperty homeDirProperty = mc.getProperty("serverHomeDir");
      assertNotNull("serverHomeDir property exists", homeDirProperty);
      String homeDir = (String) ((SimpleValue) homeDirProperty.getValue()).getValue();
      assertNotNull(homeDir);
     
      // Manually copy the deployment
View Full Code Here

   }
  
   protected ManagedComponent getManagedComponent(ManagementView mgtView, String name) throws Exception
   {
      ComponentType type = new ComponentType("DataSource", "LocalTx");
      ManagedComponent ds = mgtView.getComponent(name, type);
      return ds;
   }
View Full Code Here

TOP

Related Classes of org.jboss.managed.api.ManagedComponent

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.