I am confused between two @Resource annotation @Resource .
The Java documentation says:
mapped name:. The product-specific name for which this resource should be mapped. The name of this resource, defined by a name element or default, is a name that is a local component of the application using the resource. (This is the name in the JNDI java namespace: comp / env.) Many application servers provide a way to map these local names to resource names known to the application server. This display name is often the global JNDI name, but can be any form of name.
lookup:. The name of the resource that this link points to. It can reference any compatible resource using global JNDI names.
My question is how to choose a matching name and search , based on what criteria?
source share