Wolf-Dieter Fink,
Thanks. This is a ejb 3 app. I have tested with @Resource injection and DS reference working fine. My problem is I will be using Toplink native API to make database changes (No JPA). Toplink configuration is loaded from a sessions.xml file with a DS JNDI reference. Internally Toplink doing a context.lookup by datasource name. It was failing because of name not found exception. I was testing if JBOSS allows context.lookup by DS JNDI name.