Object key = getKey(hibernateCfgResource,hibernatePropertiesResource);
Configuration configuration = (Configuration) configurations.get(key);
if (configuration==null) {
log.debug("creating hibernate configuration from cfg '"+hibernateCfgResource+"' and properties '"+hibernatePropertiesResource+"'");
configuration = new Configuration();
configuration.configure(hibernateCfgResource);
if (hibernatePropertiesResource!=null) {
try {
InputStream propertiesInputStream = AntHelper.class.getClassLoader().getResourceAsStream(hibernatePropertiesResource);
log.debug("properties input stream: "+propertiesInputStream);
Properties properties = new Properties();