Examples of JndiInject


Examples of org.jboss.ejb3.annotation.JndiInject

      // complete
   }

   public void handleMethodAnnotations(Method method, InjectionContainer container, Map<AccessibleObject, Injector> injectors)
   {
      JndiInject ref = method.getAnnotation(JndiInject.class);
      if (ref != null)
      {
         if (!method.getName().startsWith("set"))
            throw new RuntimeException("@EJB can only be used with a set method: " + method);
         String encName = InjectionUtil.getEncName(method);
         if (!container.getEncInjectors().containsKey(encName))
         {
            container.getEncInjectors().put(encName, new LinkRefEncInjector(encName, ref.jndiName(), "@JndiInject"));
         }
         injectors.put(method, new JndiMethodInjector(method, encName, container.getEnc()));
      }
   }
View Full Code Here

Examples of org.jboss.ejb3.annotation.JndiInject

      }
   }
  
   public void handleFieldAnnotations(Field field, InjectionContainer container, Map<AccessibleObject, Injector> injectors)
   {
      JndiInject ref = field.getAnnotation(JndiInject.class);
      if (ref != null)
      {
         String encName = InjectionUtil.getEncName(field);
         if (!container.getEncInjectors().containsKey(encName))
         {
            container.getEncInjectors().put(encName, new LinkRefEncInjector(encName, ref.jndiName(), "@JndiInject"));
         }
         injectors.put(field, new JndiFieldInjector(field, encName, container.getEnc()));
      }
   }
View Full Code Here

Examples of org.jboss.ejb3.annotation.JndiInject

/*    */   {
/*    */   }
/*    */
/*    */   public void handleMethodAnnotations(Method method, InjectionContainer container, Map<AccessibleObject, Injector> injectors)
/*    */   {
/* 74 */     JndiInject ref = (JndiInject)method.getAnnotation(JndiInject.class);
/* 75 */     if (ref != null)
/*    */     {
/* 77 */       if (!method.getName().startsWith("set"))
/* 78 */         throw new RuntimeException("@EJB can only be used with a set method: " + method);
/* 79 */       String encName = InjectionUtil.getEncName(method);
/* 80 */       if (!container.getEncInjectors().containsKey(encName))
/*    */       {
/* 82 */         container.getEncInjectors().put(encName, new LinkRefEncInjector(encName, ref.jndiName(), "@JndiInject"));
/*    */       }
/* 84 */       injectors.put(method, new JndiMethodInjector(method, encName, container.getEnc()));
/*    */     }
/*    */   }
View Full Code Here

Examples of org.jboss.ejb3.annotation.JndiInject

/*    */     }
/*    */   }
/*    */
/*    */   public void handleFieldAnnotations(Field field, InjectionContainer container, Map<AccessibleObject, Injector> injectors)
/*    */   {
/* 90 */     JndiInject ref = (JndiInject)field.getAnnotation(JndiInject.class);
/* 91 */     if (ref != null)
/*    */     {
/* 93 */       String encName = InjectionUtil.getEncName(field);
/* 94 */       if (!container.getEncInjectors().containsKey(encName))
/*    */       {
/* 96 */         container.getEncInjectors().put(encName, new LinkRefEncInjector(encName, ref.jndiName(), "@JndiInject"));
/*    */       }
/* 98 */       injectors.put(field, new JndiFieldInjector(field, encName, container.getEnc()));
/*    */     }
/*    */   }
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.