Apps typically should know nothing about the global jndi name of resources, to reduce coupling to the target runtime environment. The resource reference name in the app's naming context should be sufficient.
For your testing purpose, you can iterate thru all entries in jndi tree and compare each to the resource from java:comp/env lookup. Not sure if it works.
[Message sent by forum member 'cf126330']
http://forums.java.net/jive/thread.jspa?messageID=481304