Thanks for your reply. But, From which *-ds.xml my app will look up if I have given two <jndi-name> entires with same name, each in two different *-ds.xml, say my-ds.xml and your-ds.xml? Thanks in advance
The first one will deploy (assuming it has no other problems). The second one will get a deployment error due to the duplicate name, and will not deploy.
Satya: I think you're assuming that your application will be somehow looking for the datasource by its file name (...-ds.xml),
but the file name is not relevant. Applications will look up the data source by their JNDI name, which is specified inside the XML file.