hibernateTemplate.setFlushMode(HibernateTemplate.FLUSH_NEVER);
hibernateTemplate.execute(
new HibernateCallback() {
public Object doInHibernate(Session session) throws HibernateException, SQLException {
Connection con = session.connection();
Dialect dialect = Dialect.getDialect(configuration.getProperties());
DatabaseMetadata metadata = new DatabaseMetadata(con, dialect);
String[] sql = configuration.generateSchemaUpdateScript(dialect, metadata);
executeSchemaScript(con, sql);
return null;
}