Skip to content

Instantly share code, notes, and snippets.

@tomgullo
Created September 1, 2009 07:05
Show Gist options
  • Save tomgullo/178954 to your computer and use it in GitHub Desktop.
Save tomgullo/178954 to your computer and use it in GitHub Desktop.
bind user connection to groovy sql
//bind user connection to groovy sql
Connection conn = dataSource.getConnection(username, password)
def hibernateSession = sessionFactory.currentSession
hibernateSession.reconnect(conn)
def sql = new Sql(sessionFactory.getCurrentSession().connection())
//
//perform sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment