I need to configure a datasource to use in grails.
I created file scripts/_Events.groovy with content bellow:
eventConfigureTomcat = {tomcat ->
print "Applying changes to tomcat configuration..."
}
The question is: how can I use tomcat instance to configure a datasource in deployment time?
Note1: if there’s a solution using something like server.xml file, it’s great too.
Note2: tomcat object is a instance of org.apache.catalina.startup.Tomcat
Tks.
Solved!
I putted this in
config.groovy:See also.