Package javax.enterprise.inject

Examples of javax.enterprise.inject.UnsatisfiedResolutionException


      BeanManager beanManager) {

    Bean<CassandraOperations> cassandraOperationsBean = this.cassandraOperationsMap.get(qualifiers.toString());

    if (cassandraOperationsBean == null) {
      throw new UnsatisfiedResolutionException(String.format("Unable to resolve a bean for '%s' with qualifiers %s.",
          CassandraOperations.class.getName(), qualifiers));
    }

    return new CassandraRepositoryBean<T>(cassandraOperationsBean, qualifiers, repositoryType, beanManager,
        getCustomImplementationDetector());
View Full Code Here


                                                Annotation []bindings)
  {
    WebComponent component = getWebComponent(createBaseType(type));

    if (component == null) {
      throw new UnsatisfiedResolutionException(L.l("Can't find a bean for '{0}' because no beans implementing that class have been registered with the injection manager {1}.",
                                                   type, this));
    }
    else {
      ArrayList<Bean<?>> enabledList = component.getEnabledBeanList();

      if (enabledList.size() == 0) {
        throw new UnsatisfiedResolutionException(L.l("Can't find a bean for '{0}' because no beans implementing that class have been registered with the injection manager {1}.",
                                                     type, this));
      }
      else {
        return new UnsatisfiedResolutionException(L.l("Can't find a bean for '{0}' because no beans match the type and bindings {1}.\nBeans:{2}",
                                                      type,
                                                      toList(bindings),
                                                      listToLines(enabledList)));
      }
    }
View Full Code Here

                                       ij.getMember().getDeclaringClass().getName(),
                                       ij.getMember().getName(),
                                       e.getMessage()),
                                   e);
    } catch (UnsatisfiedResolutionException e) {
      throw new UnsatisfiedResolutionException(L.l("{0}.{1}: {2}",
                                                   ij.getMember().getDeclaringClass().getName(),
                                                   ij.getMember().getName(),
                                                   e.getMessage()),
                                   e);
    } catch (IllegalProductException e) {
View Full Code Here

                                               Annotation []qualifiers)
  {
    WebComponent component = getWebComponent(createTargetBaseType(type));

    if (component == null) {
      throw new UnsatisfiedResolutionException(L.l("Can't find a bean for '{0}' because no beans implementing that class have been registered with the injection manager {1}.",
                                                   type, this));
    }
    else {
      ArrayList<Bean<?>> enabledList = component.getEnabledBeanList();

      if (enabledList.size() == 0) {
        throw new UnsatisfiedResolutionException(L.l("Can't find a bean for '{0}' because no beans implementing that class have been registered with the injection manager {1}.",
                                                     type, this));
      }
      else {
        return new UnsatisfiedResolutionException(L.l("Can't find a bean for '{0}' because no beans match the type and qualifiers {1}.\nBeans:{2}",
                                                      type,
                                                      toList(qualifiers),
                                                      listToLines(enabledList)));
      }
    }
View Full Code Here

       
        throw new AmbiguousResolutionException(loc + e.getMessage(), e);
      } catch (UnsatisfiedResolutionException e) {
        String loc = getLocation(_field);
       
        throw new UnsatisfiedResolutionException(loc + e.getMessage(), e);
      } catch (IllegalProductException e) {
        String loc = getLocation(_field);
       
        throw new IllegalProductException(loc + e.getMessage(), e);
      } catch (InjectionException e) {
View Full Code Here

          return bean;
      }

      throw injectManager.unsatisfiedException(type, qualifiers);
    } catch (UnsatisfiedResolutionException e) {
      throw new UnsatisfiedResolutionException(location + e.getMessage(), e);
    } catch (AmbiguousResolutionException e) {
      throw new AmbiguousResolutionException(location + e.getMessage(), e);
    } catch (InjectionException e) {
      throw new InjectionException(location + e.getMessage(), e);
    }
View Full Code Here

TOP

Related Classes of javax.enterprise.inject.UnsatisfiedResolutionException

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.