Examples of BundleHandoverResponse


Examples of org.rhq.core.pluginapi.bundle.BundleHandoverResponse

    @Override
    public BundleHandoverResponse handoverContent(Resource bundleTarget, BundleHandoverRequest handoverRequest) {
        try {
            BundleHandoverFacet component = getBundleHandoverFacet(bundleTarget.getId(), HOURS.toMillis(1));
            BundleHandoverResponse report = component.handleContent(handoverRequest);
            if (report == null) {
                return BundleHandoverResponse.failure(FailureType.EXECUTION, "Plugin component returned null report");
            }
            return report;
        } catch (PluginContainerException e) {
View Full Code Here

Examples of org.rhq.core.pluginapi.bundle.BundleHandoverResponse

            .setFilename("updateDomainEjb3Subsystem.cli") //
            .setAction("execute-script") //
            .setParams(Collections.<String, String> emptyMap()) //
            .setContext(contextBuilder.create());

        BundleHandoverResponse response = handoverFacet.handleContent(requestBuilder.createBundleHandoverRequest());

        assertTrue(response.isSuccess(), getFailureMessage(response));

        Address ejb3SubsystemAddress = new Address();
        ejb3SubsystemAddress.add("profile", "full");
        ejb3SubsystemAddress.add("subsystem", "ejb3");
        Result readAttributeResult = getDomainControllerASConnection().execute(
View Full Code Here

Examples of org.rhq.core.pluginapi.bundle.BundleHandoverResponse

            .setFilename("javaee6-test-app.war") //
            .setAction("deployment") //
            .setParams(params) //
            .setContext(contextBuilder.create());

        BundleHandoverResponse response = handoverFacet.handleContent(requestBuilder.createBundleHandoverRequest());

        assertTrue(response.isSuccess(), getFailureMessage(response));

        Address managedServerDeploymentAddress = new Address();
        managedServerDeploymentAddress.add("host", "master");
        managedServerDeploymentAddress.add("server", "server-one");
        managedServerDeploymentAddress.add("deployment", "javaee6-test-app.war");
View Full Code Here

Examples of org.rhq.core.pluginapi.bundle.BundleHandoverResponse

            .setFilename("updateStandaloneEjb3Subsystem.cli") //
            .setAction("execute-script") //
            .setParams(Collections.<String, String> emptyMap()) //
            .setContext(contextBuilder.create());

        BundleHandoverResponse response = handoverFacet.handleContent(requestBuilder.createBundleHandoverRequest());

        assertTrue(response.isSuccess(), getFailureMessage(response));

        Address ejb3SubsystemAddress = new Address();
        ejb3SubsystemAddress.add("subsystem", "ejb3");
        Result readAttributeResult = getStandaloneASConnection().execute(
            new ReadAttribute(ejb3SubsystemAddress, "default-singleton-bean-access-timeout"));
View Full Code Here

Examples of org.rhq.core.pluginapi.bundle.BundleHandoverResponse

            .setFilename("javaee6-test-app.war") //
            .setAction("deployment") //
            .setParams(Collections.<String, String> emptyMap()) //
            .setContext(contextBuilder.create());

        BundleHandoverResponse response = handoverFacet.handleContent(requestBuilder.createBundleHandoverRequest());

        assertTrue(response.isSuccess(), getFailureMessage(response));

        Address deploymentAddress = new Address();
        deploymentAddress.add("deployment", "javaee6-test-app.war");
        Result readAttributeResult = getStandaloneASConnection().execute(new ReadResource(deploymentAddress));
View Full Code Here

Examples of org.rhq.core.pluginapi.bundle.BundleHandoverResponse

                .setFilename(handoverInfo.getFilename()) //
                .setAction(handoverInfo.getAction()).setParams(handoverInfo.getParams())//
                .setContext(contextBuilder.create());

            BundleHandoverRequest bundleHandoverRequest = handoverRequestBuilder.createBundleHandoverRequest();
            BundleHandoverResponse handoverResponse = bundleManagerProvider.handoverContent(
                resourceDeployment.getResource(), bundleHandoverRequest);

            boolean success = handoverResponse.isSuccess();
            try {

                StringWriter attachmentStringWriter = new StringWriter();
                PrintWriter attachmentPrintWriter = new PrintWriter(attachmentStringWriter, true);
                attachmentPrintWriter.println(bundleHandoverRequest);

                if (success) {
                    bundleManagerProvider.auditDeployment(resourceDeployment, "Handover",
                        "Successful content handover to bundle target resource", AUDIT_MESSAGE, SUCCESS,
                        handoverResponse.getMessage(), attachmentStringWriter.toString());
                } else {
                    String handoverFailure = getHandoverFailure(handoverResponse);
                    Throwable handoverResponseThrowable = handoverResponse.getThrowable();
                    if (handoverResponseThrowable != null) {
                        attachmentPrintWriter.println();
                        attachmentPrintWriter.println(ThrowableUtil.getAllMessages(handoverResponseThrowable));
                    }

                    bundleManagerProvider.auditDeployment(resourceDeployment, "Handover", handoverFailure,
                        AUDIT_MESSAGE, FAILURE, handoverResponse.getMessage(), attachmentStringWriter.toString());
                }
            } catch (Exception e) {
                LOG.warn("Unexpected failure while auditing deployment", e);
            }
            return success;
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.