I had problems with this, but I don't have an exact simple example handy.
I had problems with the JNDI lookup. The JNDI browser in Glassfish didn't
show me what I expected i.e. jndi/(pool-name).
I ended up using the java code shown here:
http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html
To see what JNDI resources were available. Note that listing the
JNDI contexts didn't work like I expected, I still don't understand why.
I THINK I had to leave off the jndi, or set up a resource-reference or
something.
I wish I had a simpler answer, or at least one better than "stick with tomcat"
(which is what I find myself doing).
[Message sent by forum member 'cobrien' (cobrien)]
http://forums.java.net/jive/thread.jspa?messageID=236779