Examples of AvailabilityType


Examples of org.rhq.core.domain.measurement.AvailabilityType

        previousAvailabilityType = null;
    }

    @Override
    public AvailabilityType getAvailability() {
        AvailabilityType availabilityType;
        boolean securityRealmReady = true;
        try {
            try {
                readAttribute(getHostAddress(), "name", AVAIL_OP_TIMEOUT_SECONDS);
                availabilityType = UP;
View Full Code Here

Examples of org.rhq.core.domain.measurement.AvailabilityType

            if (emsBean == null) {
                log.warn("Unable to establish JMX connection to " + context.getResourceKey());
                return DOWN;
            }

            AvailabilityType availability = UP;

            EmsAttribute nativeTransportEnabledAttr = emsBean.getAttribute("NativeTransportRunning");
            Boolean nativeTransportEnabled = (Boolean) nativeTransportEnabledAttr.getValue();

            if (!nativeTransportEnabled) {
View Full Code Here

Examples of org.rhq.core.domain.measurement.AvailabilityType

    private static final Log log = LogFactory.getLog(WebappContextComponent.class);
    private static final String CLASS_NAME = "className";

    @Override
    public AvailabilityType getAvailability() {
        AvailabilityType beanAvailability = super.getAvailability();

        if (beanAvailability.equals(AvailabilityType.UP)) {
            ClassLoader cl = Thread.currentThread().getContextClassLoader();
            try {
                Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());

                String className = this.resourceContext.getPluginConfiguration().getSimple(CLASS_NAME).getStringValue();
View Full Code Here

Examples of org.rhq.core.domain.measurement.AvailabilityType

    @Override
    public AvailabilityType getAvailability() {
        ProcessInfo process = getResourceContext().getNativeProcess();

        // It is safe to read prior snapshot as getNativeProcess always return a fresh instance
        AvailabilityType ret = process == null ? AvailabilityType.DOWN
            : (process.priorSnaphot().isRunning() ? AvailabilityType.UP : AvailabilityType.DOWN);

        EventContext events = getResourceContext().getEventContext();
        if (events != null) {
            if (ret == AvailabilityType.UP) {
View Full Code Here

Examples of org.rhq.core.domain.measurement.AvailabilityType

    // TODO: Re-enable once fixed.
    @Test(priority = 6, dependsOnMethods = "testStandaloneServerShutdownAndStartOperations", enabled = false)
    public void testRestartOperation() throws Exception {
        // First make sure the server is up.
        AvailabilityType avail = getAvailability(getServerResource());
        assertEquals(avail, UP);

        // Make sure the server is back up.
        // TODO (ips): Check that the server is a different process now.
        invokeOperationAndAssertSuccess(getServerResource(), RESTART_OPERATION_NAME, null);
View Full Code Here

Examples of org.rhq.core.domain.measurement.AvailabilityType

    protected abstract String getServerResourceKey();

    protected abstract Resource getServerResource();

    public void testServerAttributeValidation() throws Exception {
        AvailabilityType avail = getAvailability(getServerResource());
        assertEquals(avail, AvailabilityType.UP);

        Configuration pluginConfig = getServerResource().getPluginConfiguration();
        ServerPluginConfiguration serverPluginConfig = new ServerPluginConfiguration(pluginConfig);
View Full Code Here

Examples of org.rhq.core.domain.measurement.AvailabilityType

            + RELEASE_VERSION_TRAIT_NAME + "].");
    }

    public void testExecuteCliOperations() throws Exception {
        // First make sure the server is up.
        AvailabilityType avail = getAvailability(getServerResource());
        assertEquals(avail, AvailabilityType.UP);
        Configuration c = new Configuration();
        c.put(new PropertySimple("commands", "ls"));
        invokeOperationAndAssertSuccess(getServerResource(), "executeCommands", c);
        File script = null;
View Full Code Here

Examples of org.rhq.core.domain.measurement.AvailabilityType

        }
    }

    public void testShutdownAndStartOperations() throws Exception {
        // First make sure the server is up.
        AvailabilityType avail = getAvailability(getServerResource());
        assertEquals(avail, AvailabilityType.UP);

        // Now shut it down using the Shutdown op and make sure it has gone down.
        invokeOperationAndAssertSuccess(getServerResource(), SHUTDOWN_OPERATION_NAME, null);
        avail = getAvailability(getServerResource());
View Full Code Here

Examples of org.rhq.core.domain.measurement.AvailabilityType

        do {
            Thread.sleep(SECONDS.toMillis(pause_seconds));
            count++;
        } while (getAvailability(resource) != UP && SECONDS.toMinutes(pause_seconds * count) < 5);

        AvailabilityType avail = getAvailability(getResource());
        assertEquals(avail, UP);
    }
View Full Code Here

Examples of org.rhq.core.domain.measurement.AvailabilityType

    private final Log log = LogFactory.getLog(this.getClass());

    @Override
    public AvailabilityType getAvailability() {
        // First, ensure the underlying mbean for the connector is active
        AvailabilityType result = super.getAvailability();

        if (AvailabilityType.UP == result) {
            // When the connector is stopped its associated GlobalRequestProcessor will not exist. We test
            // for availability by checking the existence of objectName Catalina:type=GlobalRequestProcessor,name=%handler%[%address%]-%port%.
            String objectName = getGlobalRequestProcessorName();
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.