I am trying to use @Resource(lookup="") to look up a resource configured in Glassfish 3.1. I am using Eclipse 3.5.
I've set -Djava.endorsed.dirs=${GLASSFISH_HOME}/modules/endorsed and added javax.annotation.jar to my projects build bath but still it doesn't compile.
I am not able to see the lookup parameter with @Resource.
Could someone help me understand why am I not getting the lookup parameter with @Resource?
Are you sure the
javax.annotation.jarthat you are using is the one for JavaEE6 (and not for a prior version), sincelookupwas introduced in JavaEE 6. Check the MANIFEST of that jar to confirm.