Sorry for a too late response... And thanks for reply!
I've said that it is like a workaround, because the code that want to know the DataSource name for lookup, is a lib in JAR within an EAR. And the persistence.xml is in another lib (another JAR in EAR).
So, I had to find the persistence.xml by myself and then, traverse the XML to find the node where is the name of the DataSource.
It really looks fine?
[Message sent by forum member 'eudesf']
http://forums.java.net/jive/thread.jspa?messageID=399436