Usually my Grails app is run on Tomcat. I recently was making it work for Weblogic. I followed all the notes here: notel reference link And my app does work on Weblogic, but... I have a problem in how the datasource works...
Having this in my DataSource.groovy file:
production {
dataSource {
dbCreate = "validate"
resourceRef="true"
jndiName = "java:/comp/env/jdbc/myGrails"
Makes it work on Tomcat. But it won't work on Weblogic.
Having this in my DataSource.groovy file:
production {
dataSource {
dbCreate = "validate"
resourceRef="true"
jndiName = "jdbc/myGrails"
Makes it work on Weblogic, but then not on Tomcat.
How can I configure the jndiName in Datasource.groovy to have it work on both Weblogic and Tomcat?
I did read through this post: Tomcat vs Weblogic JNDI Lookup But couldn't find a solution that worked for me. I might not have understood since it was geared more towards Spring (which I don't know very well) and not specifically Grails. Hoping someone can help me with a Grails/Datasource.groovy solution.