Examples of JBossProductType


Examples of org.rhq.modules.plugins.jbossas7.JBossProductType

        throws Exception {

        BaseComponent<?> parentComponent = context.getParentResourceComponent();
        BaseServerComponent baseServerComponent = parentComponent.getServerComponent();
        ServerPluginConfiguration serverPluginConfiguration = baseServerComponent.getServerPluginConfiguration();
        JBossProductType productType = serverPluginConfiguration.getProductType();

        Configuration pluginConfig = context.getDefaultPluginConfiguration();

        int port;
        String username, password;
View Full Code Here

Examples of org.rhq.plugins.jbossas.helper.JBossProductType

            if (!port.equals(CHANGE_ME)) {
                namingPort = port;
            }
        }

        final JBossProductType productType = installInfo.getProductType();
        String description = productType.DESCRIPTION + " " + installInfo.getMajorVersion();
        boolean isRhqServer = isRhqServer(absoluteConfigPath);
        if (isRhqServer) {
            description += " hosting the RHQ Server";

            // RHQ-633 : We know this is an RHQ Server. Let's auto-configure for tracking its log file, which is not in
            //           the standard JBoss AS location.
            // JOPR-53 : Log tracking will be disabled - user will have to explicitly enable it now.
            File rhqLogFile = JBossASServerComponent.resolvePathRelativeToHomeDir(pluginConfiguration,
                "../logs/rhq-server-log4j.log");
            if (rhqLogFile.exists() && !rhqLogFile.isDirectory()) {
                try {
                    PropertyMap serverLogEventSource = new PropertyMap("logEventSource");
                    serverLogEventSource.put(new PropertySimple(
                        LogFileEventResourceComponentHelper.LogEventSourcePropertyNames.LOG_FILE_PATH, rhqLogFile
                            .getCanonicalPath()));
                    serverLogEventSource.put(new PropertySimple(
                        LogFileEventResourceComponentHelper.LogEventSourcePropertyNames.ENABLED, Boolean.FALSE));
                    serverLogEventSource.put(new PropertySimple(
                        LogFileEventResourceComponentHelper.LogEventSourcePropertyNames.MINIMUM_SEVERITY,
                        EventSeverity.INFO.name().toLowerCase()));
                    PropertyList logEventSources = pluginConfiguration
                        .getList(LogFileEventResourceComponentHelper.LOG_EVENT_SOURCES_CONFIG_PROP);
                    logEventSources.add(serverLogEventSource);
                } catch (IOException e) {
                    log.warn("Unable to setup RHQ Server log file monitoring.", e);
                }
            }
        }
       
        String name = formatServerName(bindingAddress, namingPort, discoveryContext.getSystemInformation().getHostname(),
                absoluteConfigPath.getName(), productType, isRhqServer);
        String version = productType.name() + " " + installInfo.getVersion();
       
        return new DiscoveredResourceDetails(discoveryContext.getResourceType(), key, name, version, description,
            pluginConfiguration, processInfo);
    }
View Full Code Here

Examples of org.rhq.plugins.jbossas.helper.JBossProductType

                    configName));

                // Now set default values on any props that are still not set.
                setPluginConfigurationDefaults(pluginConfiguration);

                JBossProductType productType = installInfo.getProductType();
                String name = formatServerName(bindAddress, jnpPort, context.getSystemInformation().getHostname(),
                    configName, productType, isRhqServer(configDir));
                String description = productType.NAME +
                    " server that the RHQ Plugin Container is running within";
                DiscoveredResourceDetails resource = new DiscoveredResourceDetails(context.getResourceType(),
View Full Code Here

Examples of org.rhq.plugins.jbossas5.helper.JBossProductType

            if (uri.getPort() != -1) {
                namingPort = String.valueOf(uri.getPort());
            }
        }

        final JBossProductType productType = installInfo.getProductType();
        String description = productType.DESCRIPTION + " " + installInfo.getMajorVersion();
        File deployDir = new File(absoluteConfigPath, "deploy");

        File rhqInstallerWar = new File(deployDir, "rhq-installer.war");
        File rhqInstallerWarUndeployed = new File(deployDir, "rhq-installer.war.rej");
        boolean isRhqServer = rhqInstallerWar.exists() || rhqInstallerWarUndeployed.exists();
        if (isRhqServer) {
            description += " hosting the RHQ Server";
            // We know this is an RHQ Server. Let's add an event source for its server log file, but disable it by default.
            configureEventSourceForServerLogFile(pluginConfig);
        }
        final String PRODUCT_PREFIX = productType.name() + " ";
        String name = PRODUCT_PREFIX
            + formatServerName(bindAddress, namingPort, discoveryContext.getSystemInformation().getHostname(),
                absoluteConfigPath.getName(), isRhqServer);

        // If we are discovering plugin config via processInfo, then in addition to everything we discover above,
View Full Code Here

Examples of org.rhq.plugins.jbossas5.helper.JBossProductType

        }
    }

    private boolean isSupportedProduct(JBossInstallationInfo installInfo) {
        ComparableVersion version = new ComparableVersion(installInfo.getVersion());
        JBossProductType productType = installInfo.getProductType();
        ComparableVersion minimumVersion = MINIMUM_PRODUCT_VERSIONS.get(productType);
        boolean supported;
        if (minimumVersion != null) {
            // The product is supported if the version is greater than or equal to the minimum version.
            supported = (version.compareTo(minimumVersion) >= 0);
View Full Code Here

Examples of org.rhq.plugins.jbossas5.helper.JBossProductType

            installInfo = new JBossInstallationInfo(new File(homeDir));
        } catch (IOException e) {
            throw new InvalidPluginConfigurationException(e);
        }

        JBossProductType productType = installInfo.getProductType();
        String resourceName = productType.NAME;
        resourceName += " " + installInfo.getMajorVersion();
        resourceName += " (" + serverName + ")";

        String description = productType.DESCRIPTION;
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.