Package javax.ejb

Examples of javax.ejb.EJB.mappedName()


            if(field.get(testCase) == null) // only try to lookup fields that are not already set
            {
               EJB fieldAnnotation = (EJB) field.getAnnotation(ejbAnnotation);
               try
               {
                  Object ejb = lookupEJB(field.getType(), fieldAnnotation.mappedName());
                  field.set(testCase, ejb);
               }
               catch (Exception e)
               {
                  log.fine("Could not lookup " + fieldAnnotation + ", other Enrichers might, move on. Exception: " + e.getMessage());
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

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

/* 297 */         if (container.getAnnotation(IgnoreDependency.class, method) == null)
/*     */         {
/* 299 */           if (isIgnoreDependency(container, ref))
/* 300 */             log.debug("IGNORING <ejb-ref> DEPENDENCY: " + encName);
/*     */           else {
/* 302 */             ejbRefDependency(ref.mappedName(), ref.beanName(), container, method.getParameterTypes()[0], "@EJB", encName);
/*     */           }
/*     */         }
/*     */       }
/* 306 */       super.handleMethodAnnotations(method, container, injectors);
/*     */     }
View Full Code Here

/* 318 */         if (container.getAnnotation(IgnoreDependency.class, field) == null)
/*     */         {
/* 320 */           if (isIgnoreDependency(container, ref))
/* 321 */             log.debug("IGNORING <ejb-ref> DEPENDENCY: " + encName);
/*     */           else
/* 323 */             ejbRefDependency(ref.mappedName(), ref.beanName(), container, field.getType(), "@EJB", encName);
/*     */         }
/* 325 */         ejbRefEncInjector(ref.mappedName(), encName, field.getType(), ref.beanName(), "@EJB", container);
/*     */       }
/* 327 */       super.handleFieldAnnotations(field, container, injectors);
/*     */     }
View Full Code Here

/* 320 */           if (isIgnoreDependency(container, ref))
/* 321 */             log.debug("IGNORING <ejb-ref> DEPENDENCY: " + encName);
/*     */           else
/* 323 */             ejbRefDependency(ref.mappedName(), ref.beanName(), container, field.getType(), "@EJB", encName);
/*     */         }
/* 325 */         ejbRefEncInjector(ref.mappedName(), encName, field.getType(), ref.beanName(), "@EJB", container);
/*     */       }
/* 327 */       super.handleFieldAnnotations(field, container, injectors);
/*     */     }
/*     */   }
/*     */
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.getName().substring(0), 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.