Skip to content

Instantly share code, notes, and snippets.

@MikaelAmborn
Created February 15, 2011 20:17
Show Gist options
  • Save MikaelAmborn/828161 to your computer and use it in GitHub Desktop.
Save MikaelAmborn/828161 to your computer and use it in GitHub Desktop.
DataSource ds = getApplicationContext().getBean("dataSource");
DatabaseDataSourceConnection jdbcConnection = new SpringDatabaseDataSourceConnection(ds);
try {
DatabaseOperation.INSERT.execute(jdbcConnection, createDataSetFromFile("ourTestDataXmlFile.xml"));
finally {
DataSourceUtils.releaseConnection(jdbcConnection.getConnection(), ds);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment