Package org.jboss.managed.api

Examples of org.jboss.managed.api.ComponentType


    }

    private File getServerTempDirectory() {
        ManagementView managementView = getProfileServiceConnection().getManagementView();
        ManagedComponent serverConfigComponent = ManagedComponentUtils.getSingletonManagedComponent(managementView,
            new ComponentType("MCBean", "ServerConfig"));
        String serverTempDir = (String) ManagedComponentUtils.getSimplePropertyValue(serverConfigComponent,
            "serverTempDir");

        return new File(serverTempDir);
    }
View Full Code Here


  }

  private ManagedComponent getDatasource(String deployedName) throws Exception {
    ManagedComponent mc = null;
    for (String type:DS_TYPES) {
      ComponentType ct = new ComponentType("DataSource", type); //$NON-NLS-1$
      mc = getView().getComponent(deployedName, ct);
      if (mc != null) {
        return mc;
      }       
    }   
    for (String type:CF_TYPES) {
      ComponentType ct = new ComponentType("ConnectionFactory", type); //$NON-NLS-1$
      mc = getView().getComponent(deployedName, ct);
      if (mc != null) {
        return mc;
      }       
    }
View Full Code Here

  @Override
  public Collection<String> getDataSourceNames() throws AdminException {
    ArrayList<String> names = new ArrayList<String>();
    try {
      for (String type:DS_TYPES) {
        ComponentType ct = new ComponentType("DataSource", type); //$NON-NLS-1$
        Set<ManagedComponent> mcs = getView().getComponentsForType(ct);
        for (ManagedComponent mc:mcs) {
          names.add(((SimpleValue)mc.getProperty("jndi-name").getValue()).getValue().toString()); //$NON-NLS-1$
        }
      }   
      for (String type:CF_TYPES) {
        ComponentType ct = new ComponentType("ConnectionFactory", type); //$NON-NLS-1$
        Set<ManagedComponent> mcs = getView().getComponentsForType(ct);
        for (ManagedComponent mc:mcs) {
          names.add(((SimpleValue)mc.getProperty("jndi-name").getValue()).getValue().toString()); //$NON-NLS-1$
        }     
      }
View Full Code Here

  public Configuration loadResourceConfiguration() {

    ManagedComponent translator = null;
    try {
      translator = ProfileServiceUtil
      .getManagedComponent(getConnection(), new ComponentType(
          PluginConstants.ComponentType.Translator.TYPE,
          PluginConstants.ComponentType.Translator.SUBTYPE), this.name);
    } catch (NamingException e) {
      final String msg = "NamingException in loadResourceConfiguration(): " + e.getExplanation(); //$NON-NLS-1$
      LOG.error(msg, e);
View Full Code Here

    Set<DiscoveredResourceDetails> discoveredResources = new HashSet<DiscoveredResourceDetails>();
    ProfileServiceConnection connection = ((ApplicationServerComponent) discoveryContext.getParentResourceComponent()).getConnection();
   
    ManagedComponent mc = ProfileServiceUtil.getManagedComponent(connection,
        new ComponentType(
            PluginConstants.ComponentType.Platform.TEIID_TYPE,
            PluginConstants.ComponentType.Platform.TEIID_SUB_TYPE),
            PluginConstants.ComponentType.Platform.TEIID_RUNTIME_ENGINE);
   
    if (mc==null){
View Full Code Here

    resourceConfiguration = report.getConfiguration().deepCopy();

    Configuration resourceConfig = report.getConfiguration();

    ManagementView managementView = null;
    ComponentType componentType = new ComponentType(
        PluginConstants.ComponentType.Platform.TEIID_TYPE,
        PluginConstants.ComponentType.Platform.TEIID_SUB_TYPE);

    report.setStatus(ConfigurationUpdateStatus.SUCCESS);
    try {
View Full Code Here

    // First update simple properties
    super.updateResourceConfiguration(report);

    // Then update models
    ManagementView managementView = null;
    ComponentType componentType = new ComponentType(
        PluginConstants.ComponentType.VDB.TYPE,
        PluginConstants.ComponentType.VDB.SUBTYPE);

    ManagedComponent managedComponent = null;
    CollectionValueSupport modelsMetaValue = null;
View Full Code Here

    resourceConfiguration = report.getConfiguration().deepCopy();

    Configuration resourceConfig = report.getConfiguration();

    ManagementView managementView = null;
    ComponentType componentType = null;
    if (this.getComponentType().equals(
        PluginConstants.ComponentType.VDB.NAME)) {
      componentType = new ComponentType(
          PluginConstants.ComponentType.VDB.TYPE,
          PluginConstants.ComponentType.VDB.SUBTYPE);
    } else {
      report.setStatus(ConfigurationUpdateStatus.FAILURE);
      report
View Full Code Here

    Configuration defaultPluginConfig = getDefaultPluginConfiguration(resourceType);
    Configuration resourceConfig = createResourceReport
        .getResourceConfiguration();
    String resourceName = getResourceName(defaultPluginConfig,
        resourceConfig);
    ComponentType componentType = ProfileServiceUtil
        .getComponentType(resourceType);
    ManagementView managementView = null;
    ;
    managementView = getConnection().getManagementView();
View Full Code Here

          + "] is not defined in initial Resource configuration."); //$NON-NLS-1$
    return propToUseAsResourceName.getStringValue();
  }

  private String getResourceKey(ResourceType resourceType, String resourceName) {
    ComponentType componentType = ProfileServiceUtil
        .getComponentType(resourceType);
    if (componentType == null)
      throw new IllegalStateException("Unable to map " + resourceType //$NON-NLS-1$
          + " to a ComponentType."); //$NON-NLS-1$
    return componentType.getType() + ":" + componentType.getSubtype() + ":" //$NON-NLS-1$ //$NON-NLS-2$
        + resourceName;
  }
View Full Code Here

TOP

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

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.