|
|
This post has NOT been accepted by the mailing list yet.
Hi, I can't connect to JNDI datasource, what i do wrong? I use tomcat 7 and grails 2
1) I change my DataSource.groovy and put there
production {
dataSource {
pooled = false
dbCreate = "update"
jndiName = "jdbc/updateServerDS"
}
}
4) in ...tomcat/conf/server.xml
<Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase"/> <Resource auth="Container" driverClassName="com.mysql.jdbc.Driver"
logAbandoned="true" maxActive="-1" maxIdle="200" maxWait="20000"
name="jdbc/UPDATE_SERVER_DS" password="" removeAbandoned="true"
removeAbandonedTimeout="1800" type="javax.sql.DataSource"
url="jdbc:mysql://localhost:3306/update_server?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8&autoReconnect=true&CLIENT_MULTI_STATEMENTS=true&CLIENT_MULTI_RESULTS=true"
username="root" validationQuery="select 1" />
|