By default, the resource references are bound to java:comp/env/ namespace. With your configuration:
you managed to prefix another "env" to it. So either you have to lookup java:comp/env/env/test or change the res-ref-name to just "test":
and look it up as java:comp/env/test
In respect to the original question, I had a DS initially created by the jndi name: jdbc/TestDS.
But in Jboss the naming convention for the same needs to be somewhat like java:/jdbc/TestDS.
Could you please tell me how shall I look this DS in my application? Shall this be still through "jdbc/TestDS" or shall this be "java:/jdbc/TestDS"
Thanks. I actually got it working using the resource ref java:comp/env/test. Now you've solved the full mystery for me.
Vivek, please create a separate thread for your question.
Can I ask another question? In my EJB when I do the JNDI look-up I've written "java:comp/env/test". What I'd like to know is are the jndi look-ups from within an EJB under a specific namespace? I'd assumed based on the above they would be under java:comp/env, but if I do a look-up on test this is not mapped in the resource ref. I then figured it was directly under java but a look-up on comp/env/test also does map. Can you help on this too please?