Package com.sun.enterprise.v3.common

Examples of com.sun.enterprise.v3.common.PropsFileActionReporter


        CommandModel model = getCommandModel(commandName);
        checkCommandModelETag(model, modelETag);
        //Execute it
        final CommandRunner.CommandInvocation commandInvocation =
                getCommandRunner().getCommandInvocation(commandName.getScope(),
                commandName.getName(), new PropsFileActionReporter(), getSubject());
        if (inbound != null) {
            commandInvocation.inbound(inbound);
        }
        commandInvocation
                .outbound(new RestPayloadImpl.Outbound(false))
View Full Code Here


        }
        //Check command model
        CommandModel model = getCommandModel(commandName);
        checkCommandModelETag(model, modelETag);
        //Execute it
        ActionReporter ar = new PropsFileActionReporter(); //new RestActionReporter(); //Must use PropsFileActionReporter because some commands react diferently on it :-(
        final RestPayloadImpl.Outbound outbound = new RestPayloadImpl.Outbound(false);
        final CommandRunner.CommandInvocation commandInvocation =
                getCommandRunner().getCommandInvocation(commandName.getScope(), commandName.getName(), ar, getSubject());
        if (inbound != null) {
            commandInvocation.inbound(inbound);
        }
        commandInvocation
                .outbound(outbound)
                .parameters(params)
                .execute();
        ar = (ActionReporter) commandInvocation.report();
        fixActionReporterSpecialCases(ar);
        ActionReport.ExitCode exitCode = ar.getActionExitCode();
        int status = HttpURLConnection.HTTP_OK; /*200 - ok*/
        if (exitCode == ActionReport.ExitCode.FAILURE) {
            status = HttpURLConnection.HTTP_INTERNAL_ERROR;
        }
        ResponseBuilder rb = Response.status(status);
View Full Code Here

    private boolean preAuthorizationForNonMonitoring(final AdminCommandContext context) {
        report = context.getActionReport();

        /* Issue 5918 Used in ManifestManager to keep output sorted */
        try {
            PropsFileActionReporter reporter = (PropsFileActionReporter) report;
            reporter.useMainChildrenAttribute(true);
        }
        catch (ClassCastException e) {
            // ignore this is not a manifest output.
        }

View Full Code Here

        ActionReport report = context.getActionReport();
       
        /* Issue 5918 Used in ManifestManager to keep output sorted */
        try {
            PropsFileActionReporter reporter = (PropsFileActionReporter) report;
            reporter.useMainChildrenAttribute(true);
        } catch(ClassCastException e) {
            // ignore, this is not a manifest output
        }

        if (monitor) {
View Full Code Here

        CommandModel model = getCommandModel(commandName);
        checkCommandModelETag(model, modelETag);
        //Execute it
        final CommandRunner.CommandInvocation commandInvocation =
                getCommandRunner().getCommandInvocation(commandName.getScope(),
                commandName.getName(), new PropsFileActionReporter());
        if (inbound != null) {
            commandInvocation.inbound(inbound);
        }
        commandInvocation
                .outbound(new RestPayloadImpl.Outbound(false))
View Full Code Here

        }
        //Check command model
        CommandModel model = getCommandModel(commandName);
        checkCommandModelETag(model, modelETag);
        //Execute it
        ActionReporter ar = new PropsFileActionReporter(); //new RestActionReporter(); //Must use PropsFileActionReporter because some commands react diferently on it :-(
        final RestPayloadImpl.Outbound outbound = new RestPayloadImpl.Outbound(false);
        final CommandRunner.CommandInvocation commandInvocation =
                getCommandRunner().getCommandInvocation(commandName.getScope(), commandName.getName(), ar);
        if (inbound != null) {
            commandInvocation.inbound(inbound);
        }
        commandInvocation
                .outbound(outbound)
                .parameters(params)
                .subject(getSubject())
                .execute();
        ar = (ActionReporter) commandInvocation.report();
        fixActionReporterSpecialCases(ar);
        ActionReport.ExitCode exitCode = ar.getActionExitCode();
        int status = HttpURLConnection.HTTP_OK; /*200 - ok*/
        if (exitCode == ActionReport.ExitCode.FAILURE) {
            status = HttpURLConnection.HTTP_INTERNAL_ERROR;
        }
        ResponseBuilder rb = Response.status(status);
View Full Code Here

                commandInvocation.execute();
            } catch (Throwable thr) {
                logger.log(Level.WARNING, strings.getLocalString("sse.commandexecution.unexpectedexception",
                        "Unexpected exception during command execution. {0}",
                        thr.toString()));
                ActionReport actionReport = new PropsFileActionReporter(); //new RestActionReporter();
                actionReport.setFailureCause(thr);
                actionReport.setActionExitCode(ActionReport.ExitCode.FAILURE);
                AdminCommandState acs = new AdminCommandStateImpl(AdminCommandState.State.COMPLETED, actionReport, true, "unknown");
                listener.onAdminCommandEvent(AdminCommandStateImpl.EVENT_STATE_CHANGED, acs);
            } finally {
                try {
                    eventChannel.close();
View Full Code Here

    private boolean preAuthorizationForNonMonitoring(final AdminCommandContext context) {
        report = context.getActionReport();

        /* Issue 5918 Used in ManifestManager to keep output sorted */
        try {
            PropsFileActionReporter reporter = (PropsFileActionReporter) report;
            reporter.useMainChildrenAttribute(true);
        }
        catch (ClassCastException e) {
            // ignore this is not a manifest output.
        }

View Full Code Here

        ParameterMap deployParam = new ParameterMap();
        deployParam.set(DeploymentProperties.FORCE, Boolean.TRUE.toString());
        deployParam.set(DeploymentProperties.PATH, appInfo.getApplicationDirectory().getCanonicalPath());
        deployParam.set(DeploymentProperties.NAME, appInfo.getApplication().getName());
        deployParam.set(DeploymentProperties.KEEP_REPOSITORY_DIRECTORY, "true");
        commandRunner.getCommandInvocation("deploy", new XMLActionReporter(), kernelSubject).parameters(deployParam).execute();
       
       
        appInfo.recordLoad();
    }
View Full Code Here

            LOGGER.log(Level.SEVERE, LogFacade.ERROR_READING_CONF_FILE, e);
        }

        FormatterDelegate agentDelegate = null;
        if (agent != null) {
            agentDelegate = new AgentFormatterDelegate(agent);

        }

        // force the ConsoleHandler to use GF formatter
        String formatterClassName = null;
View Full Code Here

TOP

Related Classes of com.sun.enterprise.v3.common.PropsFileActionReporter

Copyright © 2018 www.massapicom. 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.