users@glassfish.java.net

Re: How I can obtain the JNDI name from a DataSource in my app?

From: <glassfish_at_javadesktop.org>
Date: Wed, 28 Apr 2010 10:27:16 PDT

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