Examples of failure()


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

        } catch (Exception e) {
            String msg = localStrings.getLocalString(GenericCrudCommand.class,
                    "GenericCrudCommand.method_invocation_exception",
                    "Exception while invoking {0} method : {1}",
                    targetMethod.toString(), e.toString());
            report.failure(logger, msg, e);
        }
    }

    @Override
     public CommandModel getModel() {
View Full Code Here

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

        if (parentBean==null) {
            String msg = localStrings.getLocalString(GenericCrudCommand.class,
                    "GenericCreateCommand.target_object_not_found",
                    "The CrudResolver {0} could not find the configuration object of type {1} where instances of {2} should be added",
                    resolver.getClass().toString(), parentType, targetType);
            result.failure(logger, msg);
            return;
        }
       
        try {
            ConfigSupport.apply(new SingleConfigCode<ConfigBeanProxy> () {
View Full Code Here

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

                        if (cbp!=null) {
                            String msg = localStrings.getLocalString(GenericCrudCommand.class,
                                    "GenericCreateCommand.already_existing_instance",
                                    "A {0} instance with a \"{1}\" name already exist in the configuration",
                                    targetType.getSimpleName(), name);
                            result.failure(logger, msg);
                            throw new TransactionFailure(msg);
                        }
                    }

                    try {
View Full Code Here

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

                    } catch (Exception e) {
                        String msg = localStrings.getLocalString(GenericCrudCommand.class,
                                "GenericCrudCommand.method_invocation_exception",
                                "Exception while invoking {0} method : {1}",
                                targetMethod.toString(), e.toString());
                        result.failure(logger, msg, e);
                        throw new TransactionFailure(msg,e);
                    }

                   
                    CreationDecorator<ConfigBeanProxy> decorator = null;
View Full Code Here

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

                    if (decorator==null) {
                        String msg = localStrings.getLocalString(GenericCrudCommand.class,
                                "GenericCreateCommand.decorator_not_found",
                                "The CreationDecorator {0} could not be found in the habitat, is it annotated with @Service ?",
                                create == null ? "null" : create.decorator().toString());
                        result.failure(logger, msg);
                        throw new TransactionFailure(msg);
                    } else {
                        // inject the decorator with any parameters from the initial CLI invocation
                        manager.inject(decorator, paramResolver);
View Full Code Here

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

        } catch(TransactionFailure e) {
            String msg = localStrings.getLocalString(GenericCrudCommand.class,
                    "GenericCreateCommand.transaction_exception",
                    "Exception while adding the new configuration : {0} ",
                    getRootCauseMessage(e));
            result.failure(logger, msg);
        }
    }

    @Override
    public CommandModel getModel() {
View Full Code Here

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

                        targets,
                        context,
                        paramMap,
                        habitat);
            } catch (Exception e) {
                report.failure(logger, e.getMessage());
            }
        }
    }
}
View Full Code Here

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

                        targets,
                        context,
                        paramMap,
                        habitat);
            } catch (Exception e) {
                report.failure(logger, e.getMessage());
            }
        }
    }
}
View Full Code Here

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

        Deployer deployer = ctrInfo.getDeployer();
        try {
            deployer.unload(appCtr, context);
            ctrInfo.unload(context);
        } catch(Exception e) {
            report.failure(context.getLogger(), "Exception while shutting down application container", e);
            return false;
        }
        appCtr=null;
        return true;
    }
View Full Code Here

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

        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
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.