When running test-app in grails 3.0, or run-app, grails runs its own version of the embedded Tomcat server. I was able to conclude this from the following link: https://rosh
In Grails 3, you do it like this: SampleTomcatJndiApplication
Typically, in Grails web applications, this is in /grails-app/init/Application.groovy
/grails-app/init/Application.groovy
(In my case, I commented out the jndiDataSource() part and just used postProcessContext().)
jndiDataSource()
postProcessContext()
Source: Graeme Rocher