Examples of OperationFailedException


Examples of org.jboss.as.controller.OperationFailedException

            newControllers.add(target.addService(LogServices.loggerName(name), service)
                    .addListener(verificationHandler)
                    .setInitialMode(ServiceController.Mode.ACTIVE)
                    .install());
        } catch (Throwable t) {
            throw new OperationFailedException(new ModelNode().set(t.getLocalizedMessage()));
        }
        try {
            // install logger handler services
            final ModelNode handlers = HANDLERS.resolveModelAttribute(context, model);
            if (handlers.isDefined()) {
                newControllers.addAll(LogServices.installLoggerHandlers(target, name, handlers, verificationHandler));
            }
        } catch (Throwable t) {
            throw new OperationFailedException(new ModelNode().set(t.getLocalizedMessage()));
        }
    }
View Full Code Here

Examples of org.jboss.as.controller.OperationFailedException

                    .setInitialMode(ServiceController.Mode.ACTIVE)
                    .install());


        } catch (Throwable t) {
            throw new OperationFailedException(new ModelNode().set(t.getLocalizedMessage()));
        }
        try {
            // install logger handler services
            if (handlers.isDefined()) {
                newControllers.addAll(LogServices.installLoggerHandlers(target, name, handlers, verificationHandler));
            }
        } catch (Throwable t) {
            throw new OperationFailedException(new ModelNode().set(t.getLocalizedMessage()));
        }
    }
View Full Code Here

Examples of org.jboss.as.controller.OperationFailedException

            final String replacement = CommonAttributes.REPLACEMENT.resolveModelAttribute(context, node).asString();
            final boolean replaceAll = CommonAttributes.REPLACE_ALL.resolveModelAttribute(context, node).asBoolean();
            return new SubstituteFilter(pattern, replacement, replaceAll);
        }
        final String name = node.hasDefined(CommonAttributes.FILTER.getName()) ? node.get(CommonAttributes.FILTER.getName()).asString() : node.asString();
        throw new OperationFailedException(new ModelNode().set(MESSAGES.invalidFilter(name)));
    }
View Full Code Here

Examples of org.jboss.as.controller.OperationFailedException

     * @throws OperationFailedException if the size is invalid.
     */
    public static long parseSize(final ModelNode node) throws OperationFailedException {
        final Matcher matcher = SIZE_PATTERN.matcher(node.asString());
        if (!matcher.matches()) {
            throw new OperationFailedException(new ModelNode().set(MESSAGES.invalidSize(node.asString())));
        }
        long qty = Long.parseLong(matcher.group(1), 10);
        final String chr = matcher.group(2);
        if (chr != null) {
            switch (chr.charAt(0)) {
                case 'b':
                case 'B':
                    break;
                case 'k':
                case 'K':
                    qty <<= 10L;
                    break;
                case 'm':
                case 'M':
                    qty <<= 20L;
                    break;
                case 'g':
                case 'G':
                    qty <<= 30L;
                    break;
                case 't':
                case 'T':
                    qty <<= 40L;
                    break;
                default:
                    throw new OperationFailedException(new ModelNode().set(MESSAGES.invalidSize(node.asString())));
            }
        }
        return qty;
    }
View Full Code Here

Examples of org.palo.viewapi.exceptions.OperationFailedException

          } finally {
            ConnectionPoolManager.getInstance().disconnect(getAccount(xView.getAccountId()), sessionId, "WPaloCubeViewConverter.convertLegacyView2");
          }
         
        } catch (PaloIOException e) {
          throw new OperationFailedException(
              "Could not find legacy view for '" + xView.getName() + "'!");
        }
      }
      return null;
    } finally {
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.