Dears,
Per specs , "Bean provider may use
java language annotations or deployment descriptor to declare entries that are needed in the naming context"
I tried to use DD for creating a simple env entry, and the container created the env entry in the JNDI context ["java:comp/env/trialNumber"]
However when i removed the entry from the DD, used the bean code only to declare the env entry using @resource annotation ,and tried to get the env entry via JNDI lookup ...it didn't work.
Is @Resource used only to inject in target ref (without creating entries in JNDI context)
Or it can be used to create entries in JNDI context?
Working DD example :
This is the code that doesn't get any object (after removing entries from DD)