This applies somewhat to both 4.0.3 and EAP 4.5 2210.
First a little background:
My JNDI datasource descriptors work beautifully when I define them in my own
deployment descriptor file under $/conf/Catalina/localhost;
however, I have yet to successfully get Tomcat to recognize my JNDI
datasource descriptors when I put them within it's server.xml file. I have
even used the Tomcat Administration console application to define them, so
that it would craft them properly, and choose where within the server.xml
file it wanted to put them. Yet, they never work unless I supply them in my
own deployment descriptor.
Therein lies the rub with debugging webapps in Idea. Idea creates a
temporary deployment descriptor (c:/Documents and
Files/Me/.IntellijStuff/Blah/Blah/Blah/.../ROOT.xml). In EAP4.5, I find
help documentation for adding JNDI descriptors to weblogic apps, and to CMP
EJBs, but I can see no way to inform a Tomcat webapp that it should inject
additional JNDI datasources of my choosing into its temporary, generated
deployment descriptor file.