Grails app - JNDI on Tomcat Vs Weblogic

Typically, the Grails application runs on Tomcat. I recently worked on Weblogic. I followed all the notes: notel link link And my application really works in Weblogic, but ... I have a problem with how the data source works ...

Having this in my DataSource.groovy file:

production {
    dataSource {
        dbCreate = "validate"
        resourceRef="true"
        jndiName = "java:/comp/env/jdbc/myGrails"

Does the work on Tomcat. But it will not 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 not on Tomcat.

How to configure jndiName in Datasource.groovy to work on both Weblogic and Tomcat?

: Tomcat vs Weblogic JNDI Lookup , . , , Spring ( ), Grails. , - Grails/Datasource.groovy.

+4
1
0

Source: https://habr.com/ru/post/1531824/


All Articles