Hi!
I have a groovy application which is using an Oracle DB as DataSource.
In DataSource.groovy I've set:
dataSource {
pooled = true
driverClassName = "oracle.jdbc.driver.OracleDriver"
username = "scott"
password = "tiger
//loggingSql = true
}
For some performance reasons at some points I am accesing the DB using sql in the following way:
def sql = Sql.newInstance("jdbc:oracle:thin:@localhost:1521:XE", "scott", "tiger", "oracle.jdbc.driver.OracleDriver")
That is, username and password are hardwired twice in the application. My question is if it possible to address in my application to the attributes username and password already set in the DataSource.groovy.
Thanks in advance,
Luis