Package javax.ejb

Examples of javax.ejb.EJB.mappedName()


                                + " couldn't find EJB for " + resourceReference.getResourceType().getName());
                    }
                }
            }

            String mappedName = ejbAnnotation.mappedName();
            String jndiName = convertToJndiName(resourceReference.getResourceType(), mappedName);
            X result = lookupEjb(jndiName, resourceReference.getResourceType());

            return result;
        }
View Full Code Here


        resourceType = getResourceType();
      }
      this.beanName = resourceBeanName;
      this.name = resourceName;
      this.lookupType = resourceType;
      this.mappedName = resource.mappedName();
    }

    @Override
    protected Object getResourceToInject(Object target, String requestingBeanName) {
      if (StringUtils.hasLength(this.beanName)) {
View Full Code Here

        resourceType = getResourceType();
      }
      this.beanName = resourceBeanName;
      this.name = resourceName;
      this.lookupType = resourceType;
      this.mappedName = resource.mappedName();
    }

    @Override
    protected Object getResourceToInject(Object target, String requestingBeanName) {
      if (StringUtils.hasLength(this.beanName)) {
View Full Code Here

        resourceType = getResourceType();
      }
      this.beanName = resourceBeanName;
      this.name = resourceName;
      this.lookupType = resourceType;
      this.mappedName = resource.mappedName();
    }

    @Override
    protected Object getResourceToInject(Object target, String requestingBeanName) {
      if (StringUtils.hasLength(this.beanName)) {
View Full Code Here

        resourceType = getResourceType();
      }
      this.beanName = resourceBeanName;
      this.name = resourceName;
      this.lookupType = resourceType;
      this.mappedName = resource.mappedName();
    }

    @Override
    protected Object getResourceToInject(Object target, String requestingBeanName) {
      if (StringUtils.hasLength(this.beanName)) {
View Full Code Here

    }


    public static String getEjbBindLocation(InjectionPoint injectionPoint) {
        EJB ejb = getResourceAnnotated(injectionPoint).getAnnotation(EJB.class);
        String mappedName = ejb.mappedName();
        if (!mappedName.equals("")) {
            return mappedName;
        }
        String name = ejb.name();
        if (!name.equals("")) {
View Full Code Here

         for(Field field : annotatedFields)
         {
            if(field.get(testCase) == null) // only try to lookup fields that are not already set
            {
               EJB fieldAnnotation = (EJB) field.getAnnotation(ejbAnnotation);
               Object ejb = lookupEJB(field.getType(), fieldAnnotation.mappedName());
               field.set(testCase, ejb);
            }
         }
        
         List<Method> methods = SecurityActions.getMethodsWithAnnotation(
View Full Code Here

               if (EJB.class.isAssignableFrom(annotation.annotationType()))
               {
                  parameterAnnotation = (EJB) annotation;
               }
            }
            String mappedName = parameterAnnotation == null ? null : parameterAnnotation.mappedName();
            Object ejb = lookupEJB(method.getParameterTypes()[0], mappedName);
            method.invoke(testCase, ejb);
         }
        
      }
View Full Code Here

         if (!method.getName().startsWith("set"))
            throw new RuntimeException("@EJB can only be used with a set method: " + method);
         String encName = getEncName(ref, method);
         if (!container.getEncInjectors().containsKey(encName))
         {
            ejbRefEncInjector(ref.mappedName(), encName, method.getParameterTypes()[0], ref.beanName(), "@EJB", container);
           
            if (container.getAnnotation(IgnoreDependency.class, method) == null)
            {
               if (isIgnoreDependency(container, ref))
                  log.debug("IGNORING <ejb-ref> DEPENDENCY: " + encName);
View Full Code Here

            if (container.getAnnotation(IgnoreDependency.class, method) == null)
            {
               if (isIgnoreDependency(container, ref))
                  log.debug("IGNORING <ejb-ref> DEPENDENCY: " + encName);
               else
                  ejbRefDependency(ref.mappedName(), ref.beanName(), container, method.getParameterTypes()[0], "@EJB", encName);
            }
         }

         super.handleMethodAnnotations(method, container, injectors);
      }
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.