Examples of HTMLActionReporter


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

                    DeployCommandParameters parameters = new DeployCommandParameters(sourceFile);
                    parameters.name = sourceFile.getName();
                    parameters.enabled = Boolean.TRUE;
                    parameters.origin = DeployCommandParameters.Origin.deploy;

                    ActionReport report = new HTMLActionReporter();

                    if (!sourceFile.isDirectory()) {

                    // ok we need to explode the directory somwhere and remember to delete it on shutdown
                        final File tmpFile = File.createTempFile(sourceFile.getName(),"");
View Full Code Here

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

                        }
                    }

                    archive = archiveFactoryProvider.get().openArchive(sourceFile, deploymentParams);

                    ActionReport report = new HTMLActionReporter();
                    ExtendedDeploymentContext depContext = deployment.getBuilder(logger, deploymentParams, report).source(archive).build();
                    if (tracing!=null) {
                        depContext.addModuleMetaData(tracing);
                    }

                    depContext.getAppProps().putAll(app.getDeployProperties());
                    depContext.setModulePropsMap(app.getModulePropertiesMap());

                    new ApplicationConfigInfo(app).store(depContext.getAppProps());

                    deployment.deploy(deployment.getSniffersFromApp(app), depContext);
                    loadApplicationForTenants(app, appRef, report, logger);
                    if (report.getActionExitCode().equals(ActionReport.ExitCode.SUCCESS)) {
                        if (tracing!=null) {
                            tracing.print(System.out);
                        }
                        logger.log(Level.INFO, KernelLoggerInfo.loadingApplicationTime, new Object[] {
                                appName, (Calendar.getInstance().getTimeInMillis() - operationStartTime)});
                    } else {
                        logger.log(Level.SEVERE, KernelLoggerInfo.deployFail, report.getMessage());
                    }
                } finally {
                    if (archive!=null) {
                        try {
                            archive.close();
View Full Code Here

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

            engineInfo.stop(logger);
        }
    }

    private void stopApplication(Application app, ApplicationInfo appInfo) {
        final ActionReport dummy = new HTMLActionReporter();
        if (appInfo!=null) {
            UndeployCommandParameters parameters = new UndeployCommandParameters(appInfo.getName());
            parameters.origin = UndeployCommandParameters.Origin.unload;
            parameters.command = UndeployCommandParameters.Command.shutdown_server;
View Full Code Here

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

            if (archiveHandler==null) {
                throw new IllegalArgumentException(localStrings.getLocalString("deploy.unknownarchivetype","Archive type of {0} was not recognized", archiveName));
            }

            DeployCommandParameters parameters = new DeployCommandParameters(new File(archive.getURI()));
            ActionReport report = new HTMLActionReporter();
            context = new DeploymentContextImpl(report, archive, parameters, env);
            context.setArchiveHandler(archiveHandler);
            String appName = archiveHandler.getDefaultApplicationName(archive, context);
            parameters.name = appName;
View Full Code Here

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

        Application application = null;
        try {
            Descriptor.setBoundsChecking(false);
            archive = archiveFactory.openArchive(archiveFile);
            ArchiveHandler archiveHandler = deployment.getArchiveHandler(archive);
            ActionReport dummyReport = new HTMLActionReporter();

            String appName = DeploymentUtils.getDefaultEEName(archiveFile.getName());

            DeployCommandParameters params = new DeployCommandParameters();
            params.name = appName;
View Full Code Here

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

                    DeployCommandParameters parameters = new DeployCommandParameters(sourceFile);
                    parameters.name = sourceFile.getName();
                    parameters.enabled = Boolean.TRUE;
                    parameters.origin = DeployCommandParameters.Origin.deploy;

                    ActionReport report = new HTMLActionReporter();

                    if (!sourceFile.isDirectory()) {

                    // ok we need to explode the directory somwhere and remember to delete it on shutdown
                        final File tmpFile = File.createTempFile(sourceFile.getName(),"");
View Full Code Here

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

                        }
                    }

                    archive = archiveFactoryProvider.get().openArchive(sourceFile, deploymentParams);

                    ActionReport report = new HTMLActionReporter();
                    ExtendedDeploymentContext depContext = deployment.getBuilder(logger, deploymentParams, report).source(archive).build();
                    if (tracing!=null) {
                        depContext.addModuleMetaData(tracing);
                    }

                    depContext.getAppProps().putAll(app.getDeployProperties());
                    depContext.setModulePropsMap(app.getModulePropertiesMap());

                    new ApplicationConfigInfo(app).store(depContext.getAppProps());

                    deployment.deploy(deployment.getSniffersFromApp(app), depContext);
                    loadApplicationForTenants(app, appRef, report, logger);
                    if (report.getActionExitCode().equals(ActionReport.ExitCode.SUCCESS)) {
                        if (tracing!=null) {
                            tracing.print(System.out);
                        }
                        logger.log(Level.INFO, KernelLoggerInfo.loadingApplicationTime, new Object[] {
                                appName, (Calendar.getInstance().getTimeInMillis() - operationStartTime)});
                    } else {
                        logger.log(Level.SEVERE, KernelLoggerInfo.deployFail, report.getMessage());
                    }
                } finally {
                    if (archive!=null) {
                        try {
                            archive.close();
View Full Code Here

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

            engineInfo.stop(logger);
        }
    }

    private void stopApplication(Application app, ApplicationInfo appInfo) {
        final ActionReport dummy = new HTMLActionReporter();
        if (appInfo!=null) {
            UndeployCommandParameters parameters = new UndeployCommandParameters(appInfo.getName());
            parameters.origin = UndeployCommandParameters.Origin.unload;
            parameters.command = UndeployCommandParameters.Command.shutdown_server;
View Full Code Here

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

        long operationStartTime =
            Calendar.getInstance().getTimeInMillis();

        try {
            ActionReport report = new HTMLActionReporter();

            deployment.enable(server.getName(), app, appRef, report, logger);

            if (report.getActionExitCode().equals(ActionReport.ExitCode.SUCCESS)) {
                logger.log(Level.INFO, "loading.application.time", new Object[] { appName, (Calendar.getInstance().getTimeInMillis() - operationStartTime)});
            } else if (report.getActionExitCode().equals(ActionReport.ExitCode.WARNING)){
                logger.warning(report.getMessage());
            } else if (report.getActionExitCode().equals(ActionReport.ExitCode.FAILURE)) {
                throw new Exception(report.getMessage());
            }
        } catch(Exception e) {
            logger.log(Level.SEVERE, "Error during enabling: ", e);
            RuntimeException re = new RuntimeException(e.getMessage());
            re.initCause(e);
View Full Code Here

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

        }

        ApplicationInfo appInfo = appRegistry.get(appName);

        try {
            ActionReport report = new HTMLActionReporter();
            UndeployCommandParameters commandParams =
                new UndeployCommandParameters();
            commandParams.name = appName;
            commandParams.target = server.getName();
            commandParams.origin = UndeployCommandParameters.Origin.unload;
            deployment.disable(commandParams, app, appInfo, report, logger);

            if (report.getActionExitCode().equals(ActionReport.ExitCode.FAILURE)) {
                throw new Exception(report.getMessage());
            }
        } catch(Exception e) {
            logger.log(Level.SEVERE, "Error during disabling: ", e);
            RuntimeException re = new RuntimeException(e.getMessage());
            re.initCause(e);
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.