Examples of ApplicationServerComponent


Examples of org.rhq.core.pluginapi.inventory.ApplicationServerComponent

        // Parent will discover deployed applications through JMX
        Set<DiscoveredResourceDetails> resources = super.discoverResources(context);
        Set<DiscoveredResourceDetails> result = new HashSet<DiscoveredResourceDetails>();

        TomcatVHostComponent parentComponent = context.getParentResourceComponent();
        ApplicationServerComponent applicationServerComponent = (ApplicationServerComponent) parentComponent;
        String deployDirectoryPath = applicationServerComponent.getConfigurationPath().getPath();
        String parentHost = parentComponent.getName();
        Matcher m = PATTERN_NAME.matcher("");

        for (DiscoveredResourceDetails resource : resources) {
            resource.setResourceKey(CreateResourceHelper.getCanonicalName(resource.getResourceKey()));
View Full Code Here

Examples of org.rhq.core.pluginapi.inventory.ApplicationServerComponent

        // Parent will discover deployed applications through JMX
        Set<DiscoveredResourceDetails> jmxResources = super.discoverResources(context);

        // JMX resources don't set the filename property, so munge them before going on
        JMXComponent parentComponent = context.getParentResourceComponent();
        ApplicationServerComponent applicationServerComponent = (ApplicationServerComponent) parentComponent;
        EmsConnection emsConnection = parentComponent.getEmsConnection();
        String deployDirectoryPath = generateDeployDirectory(applicationServerComponent.getConfigurationPath()
            .getPath());

        List<String> earNames = new ArrayList<String>();
        for (DiscoveredResourceDetails jmxResource : jmxResources) {
            earNames.add(jmxResource.getResourceName());
View Full Code Here

Examples of org.rhq.core.pluginapi.inventory.ApplicationServerComponent

    private Set<DiscoveredResourceDetails> discoverFileSystem(ResourceDiscoveryContext<JMXComponent<?>> context) {
        Configuration defaultConfiguration = context.getDefaultPluginConfiguration();

        // Find the location of the deploy directory
        JMXComponent parentComponent = context.getParentResourceComponent();
        ApplicationServerComponent applicationServerComponent = (ApplicationServerComponent) parentComponent;

        String deployDirectoryPath = generateDeployDirectory(applicationServerComponent.getConfigurationPath()
            .getPath());
        File deployDirectory = new File(deployDirectoryPath);

        // Set up filter for application type
        String extension = defaultConfiguration.getSimple("extension").getStringValue();
View Full Code Here

Examples of org.rhq.plugins.jbossas5.ApplicationServerComponent

    @SuppressWarnings("static-access")
    private String findConfigurationFile(ResourceComponent parentResourceComponent) {
        try {
            if (parentResourceComponent instanceof ApplicationServerComponent) {
                ApplicationServerComponent parentComponent = (ApplicationServerComponent) parentResourceComponent;

                return parentComponent.getResourceContext().getPluginConfiguration().getSimple("serverHomeDir")
                    .getStringValue()
                    + JBOSS_AS5_CONFIGURATION_FILE_RELATIVE_PATH;

            }
        } catch (java.lang.NoClassDefFoundError e) {
            //Do absolutely nothing, that means the class loader does not have this module loaded.
            //Just continue with the next discovery attempt.
        }

        try {
            if (parentResourceComponent instanceof JBossASServerComponent) {
                JBossASServerComponent parentComponent = (JBossASServerComponent) parentResourceComponent;

                return parentComponent.getPluginConfiguration()
                    .getSimple(parentComponent.CONFIGURATION_PATH_CONFIG_PROP).getStringValue()
                    + JBOSS_AS4_CONFIGURATION_FILE_RELATIVE_PATH;
            }
        } catch (java.lang.NoClassDefFoundError e) {
            //Do absolutely nothing, that means the class loader does not have this module loaded.
View Full Code Here

Examples of org.rhq.plugins.jbossas5.ApplicationServerComponent

        System.out.println("creating response message: " + response.getErrorMessage());

        // Enable Destination Statistics using JMX
        System.out.println("Enable Destination Statistics..");
        Resource asResource = AppServerUtils.getASResource();
        ApplicationServerComponent asResourceComponenet = (ApplicationServerComponent) PluginContainer.getInstance()
            .getInventoryManager().getResourceComponent(asResource);

        EmsConnection emsConnection = asResourceComponenet.getEmsConnection();
        if (emsConnection == null) {
            throw new RuntimeException("Can not connect to the server");
        }
        EmsBean bean = emsConnection.getBean("jboss.messaging:service=ServerPeer");
View Full Code Here

Examples of org.rhq.plugins.jbossas5.ApplicationServerComponent

    public void testDiscoverDeployedPackages() throws Exception {
        //tell the method story as it happens: mock or create dependencies and configure
        //those dependencies to get the method under test to completion.
        ResourceContext<ApplicationServerComponent<?>> mockResourceContext = mock(ResourceContext.class);

        ApplicationServerComponent mockApplicationServerComponent = mock(ApplicationServerComponent.class);
        when(mockResourceContext.getParentResourceComponent()).thenReturn(mockApplicationServerComponent);
        when(mockApplicationServerComponent.getResourceContext()).thenReturn(mockResourceContext);
        Configuration mockConfiguration = mock(Configuration.class);
        when(mockResourceContext.getPluginConfiguration()).thenReturn(mockConfiguration);
        when(mockConfiguration.getSimpleValue(eq("homeDir"), isNull(String.class))).thenReturn("testHomeDir");

        File mockDirectory = mock(File.class);
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.