Skip to content

Instantly share code, notes, and snippets.

@ondrej-kvasnovsky
Created December 15, 2014 21:21
Show Gist options
  • Save ondrej-kvasnovsky/8bb4220a8d2c4b456914 to your computer and use it in GitHub Desktop.
Save ondrej-kvasnovsky/8bb4220a8d2c4b456914 to your computer and use it in GitHub Desktop.
GrailsConnectionPool
package com.vaadin.grails.datasource
import com.vaadin.data.util.sqlcontainer.connection.SimpleJDBCConnectionPool
import com.vaadin.grails.Grails
import org.codehaus.groovy.grails.commons.GrailsApplication
import java.sql.SQLException
class GrailsConnectionPool extends SimpleJDBCConnectionPool {
GrailsConnectionPool() throws SQLException {
super(
Grails.get(GrailsApplication).config.dataSource.driverClassName as String,
Grails.get(GrailsApplication).config.dataSource.url as String,
Grails.get(GrailsApplication).config.dataSource.username as String,
Grails.get(GrailsApplication).config.dataSource.password as String
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment