Package br.gov.frameworkdemoiselle

Examples of br.gov.frameworkdemoiselle.DemoiselleException


            .getDescription(), fieldEntry.getValue().getGetterMethod(), fieldEntry.getValue()
            .getSetterMethod());
        attributes.add(attributeInfo);

      } catch (javax.management.IntrospectionException e) {
        throw new DemoiselleException(bundle.getString("mbean-introspection-error", managedType.getType()
            .getSimpleName()));
      }
    }

    // Para cada operação descoberta no ManagementController, cria um operationInfo correspondente
View Full Code Here


    try {
      ObjectName objectName = new ObjectName(name);
      instance = server.registerMBean(mbean, objectName);
    } catch (Exception e) {
      logger.error(bundle.getString("mbean-registration-error",name),e);
      throw new DemoiselleException(bundle.getString("mbean-registration-error",name), e);
    }

    return instance;
  }
View Full Code Here

    try {
      server.unregisterMBean(objectName);
    } catch (Exception e) {
      logger.error(bundle.getString("mbean-deregistration",objectName.getCanonicalName()),e);
      throw new DemoiselleException(bundle.getString("mbean-deregistration",objectName.getCanonicalName()), e);
    }
  }
View Full Code Here

   */
  private String getFromXML() {
    Set<String> persistenceUnits = factory.getCache().keySet();

    if (persistenceUnits.size() > 1) {
      throw new DemoiselleException(bundle.getString("more-than-one-persistence-unit-defined",
          Name.class.getSimpleName()));
    } else {
      return persistenceUnits.iterator().next();
    }
  }
View Full Code Here

      if (lockMode!=null
          && lockMode!=LockModeType.NONE
          && lockMode!=LockModeType.OPTIMISTIC_FORCE_INCREMENT){
        String message = getBundle().getString("passivable-scope-without-optimistic-lock" , configuration.getEntityManagerScope().toString());
        getLogger().error(message);
        throw new DemoiselleException(message);
      }
    }
  }
View Full Code Here

      type = Reflections.forName(canonicalName);

    } catch (ClassCastException cause) {
      // TODO Colocar a mensgaem apropriada mostrando como utilizar a anotação @Name corretamente com a injeção de
      // Logger.
      throw new DemoiselleException(null, cause);
    }

    return create(type);
  }
View Full Code Here

        buffer.append(", ");
        buffer.append(qualifier.getClass().getCanonicalName());
      }

      String message = getBundle().getString("bean-not-found", buffer.toString());
      throw new DemoiselleException(message, cause);
    }

    return instance;
  }
View Full Code Here

    try {
      instance = (T) getReference(getBeanManager().getBeans(beanClass), beanClass);

    } catch (NoSuchElementException cause) {
      String message = getBundle().getString("bean-not-found", beanClass.getCanonicalName());
      throw new DemoiselleException(message, cause);
    }

    return instance;
  }
View Full Code Here

    try {
      instance = (T) getReference(getBeanManager().getBeans(beanName));

    } catch (NoSuchElementException cause) {
      String message = getBundle().getString("bean-not-found", beanName);
      throw new DemoiselleException(message, cause);
    }

    return instance;
  }
View Full Code Here

  public ManagedType(Class<?> type) {
    bundle = new ResourceBundle("demoiselle-core-bundle",Locale.getDefault());

    if (type == null) {
      throw new DemoiselleException(bundle.getString("management-null-class-defined"));
    }
    if (!type.isAnnotationPresent(ManagementController.class)) {
      throw new DemoiselleException(bundle.getString("management-no-annotation-found", type.getCanonicalName()));
    }

    this.type = type;
    fields = new TreeMap<String, FieldDetail>();
    operationMethods = new TreeMap<String, MethodDetail>();
View Full Code Here

TOP

Related Classes of br.gov.frameworkdemoiselle.DemoiselleException

Copyright © 2018 www.massapicom. 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.