Package org.glassfish.api

Examples of org.glassfish.api.ActionReport.failure()


        // retrieve matched version(s) if exist
        List<String> matchedVersions = null;
        try {
            matchedVersions = versioningService.getMatchedVersions(name, target);
        } catch (VersioningException e) {
            report.failure(logger, e.getMessage());
            return;
        }

        // if matched list is empty and no VersioningException thrown,
        // this is an unversioned behavior and the given application is not registered
View Full Code Here


            if (application.isLifecycleModule()) {
                try  {
                    deployment.unregisterAppFromDomainXML(appName, target, true);
                } catch(Exception e) {
                    report.failure(logger, e.getMessage());
                }
                return;
            }

            try {
View Full Code Here

        try {
            matchedVersions = versioningService.getMatchedVersions(name,
                target);
        } catch (VersioningException e) {
            if (env.isDas()) {
                report.failure(logger, e.getMessage());
            } else {
                // we should let undeployment go through
                // on instance side for partial deployment case
                logger.fine(e.getMessage());
            }
View Full Code Here

                        // replicate command to all referenced targets
                        parameters.remove("isUndeploy");
                        ClusterOperationUtil.replicateCommand("undeploy", FailurePolicy.Error, FailurePolicy.Warn, targets, context, parameters, habitat);
                    }
                } catch (Exception e) {
                    report.failure(logger, e.getMessage());
                    return;
                }
            }  

            /*
 
View Full Code Here

                return;
            }

            if (snifferManager.hasNoSniffers()) {
                String msg = localStrings.getLocalString("nocontainer", "No container services registered, done...");
                report.failure(logger,msg);
                return;
            }

            archive = archiveFactory.openArchive(path, this);
            ArchiveHandler archiveHandler = deployment.getArchiveHandler(archive, type);
View Full Code Here

            }

            archive = archiveFactory.openArchive(path, this);
            ArchiveHandler archiveHandler = deployment.getArchiveHandler(archive, type);
            if (archiveHandler==null) {
                report.failure(logger,localStrings.getLocalString("deploy.unknownarchivetype","Archive type of {0} was not recognized",path.getName()));
                return;
            }

            // clean up any left over repository files
            if ( ! keepreposdir.booleanValue()) {
View Full Code Here

        final File source = new File(archive.getURI().getSchemeSpecificPart());
        try {
            archive.close();
        } catch (IOException ex) {
            report.failure(logger, ex.getLocalizedMessage(), ex);
        }
        if ( ! source.isDirectory()) {
            /*
             * This is not a directory deployment, so we're done.
             */
 
View Full Code Here

            return;
        }

        if (snifferManager.hasNoSniffers()) {
            String msg = localStrings.getLocalString("nocontainer", "No container services registered, done...");
            report.failure(logger,msg);
            return;
        }

        ReadableArchive archive;
        try {
View Full Code Here

            }
        } catch (IOException e) {
            final String msg = localStrings.getLocalString("deploy.errOpeningArtifact",
                    "deploy.errOpeningArtifact", path.getAbsolutePath());
            if (logReportedErrors) {
                report.failure(logger, msg, e);
            } else {
                report.setMessage(msg + path.getAbsolutePath() + e.toString());
                report.setActionExitCode(ActionReport.ExitCode.FAILURE);
            }
            return;
View Full Code Here

            ArchiveHandler archiveHandler = deployment.getArchiveHandler(archive, type);
            if (tracing!=null) {
                tracing.addMark(DeploymentTracing.Mark.ARCHIVE_HANDLER_OBTAINED);
            }
            if (archiveHandler==null) {
                report.failure(logger,localStrings.getLocalString("deploy.unknownarchivetype","Archive type of {0} was not recognized",path.getName()));
                return;
            }

            // create an initial  context
            ExtendedDeploymentContext initialContext = new DeploymentContextImpl(report, logger, archive, this, env);
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.