public void handleMethodAnnotations(Method method, InjectionContainer container, Map<AccessibleObject, Injector> injectors)
{
EJB ref = container.getAnnotation(EJB.class, method);
if (ref != null)
{
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))
{
Class<?> businessInterface = method.getParameterTypes()[0];
if (ref.beanInterface() != null && ref.beanInterface() != Object.class)
{
businessInterface = ref.beanInterface();
}
ejbRefEncInjector(ref.mappedName(), encName, method.getName().substring(0), businessInterface, ref.beanName(), "@EJB", container);
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, businessInterface, "@EJB", encName);
}
}
super.handleMethodAnnotations(method, container, injectors);
}
}