for (Field field : fields) {
Resource resource = (Resource) field.getAnnotation(Resource.class);
Class type = getInjectionType(resource.type(), null, field);
if (WebServiceContext.class == type) {
holder.addInjection(field.getDeclaringClass().getName(),
new Injection(field.getDeclaringClass().getName(), getInjectionName(null, field), ABSOLUTE_JNDI_NAME));
}
}
List<Method> methods = finder.findAnnotatedMethods(Resource.class);
for (Method method : methods) {
Resource resource = (Resource) method.getAnnotation(Resource.class);
Class type = getInjectionType(resource.type(), method, null);
if (WebServiceContext.class == type) {
holder.addInjection(method.getDeclaringClass().getName(),
new Injection(method.getDeclaringClass().getName(), getInjectionName(method, null), ABSOLUTE_JNDI_NAME));
}
}
}