throw new IllegalStateException("@Resource incompatible type="+resource.type()+ " with field type ="+f.getType());
//get the mappedName if there is one
String mappedName = (resource.mappedName()!=null && !resource.mappedName().trim().equals("")?resource.mappedName():null);
//get other parts that can be specified in @Resource
Resource.AuthenticationType auth = resource.authenticationType();
boolean shareable = resource.shareable();
//check if an injection has already been setup for this target by web.xml
Injection webXmlInjection = webXmlInjections.getInjection(getTargetClass(), f);
if (webXmlInjection == null)