Properties properties = new Properties();
properties.put(Environment.DATASOURCE, ds);
cfg.addProperties(properties);
SchemaExport export = new SchemaExport(cfg);
export.execute(true, true, false, false);
Database hibernateDatabase = new HibernateClassicDatabase();
hibernateDatabase.setDefaultSchemaName("PUBLIC");
hibernateDatabase.setDefaultCatalogName("TESTDB");
hibernateDatabase.setConnection(new JdbcConnection(new HibernateConnection("hibernate:classic:" + HIBERNATE_CONFIG_FILE)));