Examples of activateResource()


Examples of org.rhq.core.pc.inventory.InventoryManager.activateResource()

        if (null == container) {
            return null;
        }

        try {
            im.activateResource(serverResource, container, false);
        } catch (Exception e) {
            //
        }
        return serverResource;
    }
View Full Code Here

Examples of org.rhq.core.pc.inventory.InventoryManager.activateResource()

        InventoryManager inventoryManager = this.pluginContainer.getInventoryManager();
        inventoryManager.deactivateResource(getServerResource());
        ResourceContainer serverContainer = inventoryManager.getResourceContainer(getServerResource());
        InvalidPluginConfigurationException ipce = null;
        try {
            inventoryManager.activateResource(getServerResource(), serverContainer, true);
        } catch (InvalidPluginConfigurationException e) {
            ipce = e;
        }

        // Set the baseDir back to the original value and restart the component before making any assertions, to ensure
View Full Code Here

Examples of org.rhq.core.pc.inventory.InventoryManager.activateResource()

        }

        // Set the baseDir back to the original value and restart the component before making any assertions, to ensure
        // things aren't left in a corrupt state for remaining test methods.
        serverPluginConfig.setBaseDir(originalBaseDir);
        inventoryManager.activateResource(getServerResource(), serverContainer, true);

        Assert.assertNotNull(ipce, "InvalidPluginConfigurationException was not thrown by server component's "
            + "start() method due to invalid baseDir.");

        // Change the expectedRuntimeProductName property
View Full Code Here

Examples of org.rhq.core.pc.inventory.InventoryManager.activateResource()

        // Restart the server ResourceComponent so it picks up the changes we just made to the plugin config.
        inventoryManager.deactivateResource(getServerResource());
        ipce = null;
        try {
            inventoryManager.activateResource(getServerResource(), serverContainer, true);
        } catch (InvalidPluginConfigurationException e) {
            ipce = e;
        }

        // Set the expectedRuntimeProductName property back to the original value and restart the component before
View Full Code Here

Examples of org.rhq.core.pc.inventory.InventoryManager.activateResource()

        }

        // Set the expectedRuntimeProductName property back to the original value and restart the component before
        // making any assertions, to ensure things aren't left in a corrupt state for remaining test methods.
        pluginConfig.setSimpleValue("expectedRuntimeProductName", originalExpectedRuntimeProductName);
        inventoryManager.activateResource(getServerResource(), serverContainer, true);

        Assert.assertNotNull(ipce, "InvalidPluginConfigurationException was not thrown by server component's "
            + "start() method due to invalid productType.");
    }
View Full Code Here

Examples of org.rhq.core.pc.inventory.InventoryManager.activateResource()

        // Restart the server ResourceComponent so it picks up the changes we just made to the plugin config.
        InventoryManager inventoryManager = this.pluginContainer.getInventoryManager();
        inventoryManager.deactivateResource(getServerResource());
        ResourceContainer serverContainer = inventoryManager.getResourceContainer(getServerResource());
        inventoryManager.activateResource(getServerResource(), serverContainer, true);

        // Finally restart it using the Start op and make sure it has come back up.
        invokeOperationAndAssertSuccess(getServerResource(), START_OPERATION_NAME, null);
        avail = getAvailability(getServerResource());
        assertEquals(avail, AvailabilityType.UP);
View Full Code Here

Examples of org.rhq.core.pc.inventory.InventoryManager.activateResource()

    private void restartServerResourceComponent() throws PluginContainerException {
        InventoryManager inventoryManager = this.pluginContainer.getInventoryManager();
        inventoryManager.deactivateResource(getServerResource());
        ResourceContainer serverContainer = inventoryManager.getResourceContainer(getServerResource());
        inventoryManager.activateResource(getServerResource(), serverContainer, true);
    }

    protected String getExpectedStartScriptFileName() {
        return (File.separatorChar == '/') ? "run.sh" : "run.bat";
    }
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.