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


                // write both
                t = deployment.prepareAppConfigChanges(lifecycleContext);
                deployment.registerAppInDomainXML(null, lifecycleContext, t);
            }
        } catch(Exception e) {
            report.failure(logger, e.getMessage());
        }
    }
}
View Full Code Here

                    ParameterMapExtractor extractor = new ParameterMapExtractor(this);
                    ParameterMap paramMap = extractor.extract(Collections.EMPTY_LIST);
                    paramMap.set("DEFAULT", appName);
                    ClusterOperationUtil.replicateCommand("disable", FailurePolicy.Error, FailurePolicy.Warn, targets, context, paramMap, habitat);
                } catch (Exception e) {
                    report.failure(logger, e.getMessage());
                    return;
                }
            }
        } else if ( isVersionExpressionWithWilcard ){
View Full Code Here

                    // nothing to do : success
                    report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
                    return;
                }
            } catch (VersioningException e) {
                report.failure(logger, e.getMessage());
                return;
            }
        }

        if (env.isDas() || !isundeploy) {
View Full Code Here

            try {
                DeploymentCommandUtils.replicateEnableDisableToContainingCluster(
                        "disable", domain, target, appName, habitat, context, this);

            } catch (Exception e) {
                report.failure(logger, e.getMessage());
                return;
            }
        }

View Full Code Here

        try {
            report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
            run();
            report.setMessage(Strings.get("restartReq"));
        } catch (TransactionFailure ex) {
            report.failure(context.getLogger(), Strings.get(transactionErrorMessageKey()), ex);
        } catch (SecureAdminCommandException ex) {
            report.failure(context.getLogger(), ex.getLocalizedMessage());
        }
    }
   
View Full Code Here

            run();
            report.setMessage(Strings.get("restartReq"));
        } catch (TransactionFailure ex) {
            report.failure(context.getLogger(), Strings.get(transactionErrorMessageKey()), ex);
        } catch (SecureAdminCommandException ex) {
            report.failure(context.getLogger(), ex.getLocalizedMessage());
        }
    }
   
    /*
     * Exeutes the command with no action report.  Primarily useful from the
View Full Code Here

        try {
            report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
            run();
            report.setMessage(Strings.get("restartReq"));
        } catch (TransactionFailure ex) {
            report.failure(context.getLogger(), Strings.get(transactionErrorMessageKey()), ex);
        } catch (SecureAdminCommandException ex) {
            report.failure(context.getLogger(), ex.getLocalizedMessage());
        }
    }
   
View Full Code Here

            run();
            report.setMessage(Strings.get("restartReq"));
        } catch (TransactionFailure ex) {
            report.failure(context.getLogger(), Strings.get(transactionErrorMessageKey()), ex);
        } catch (SecureAdminCommandException ex) {
            report.failure(context.getLogger(), ex.getLocalizedMessage());
        }
    }
   
    /*
     * Exeutes the command with no action report.  Primarily useful from the
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

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.