Configuration configuration = (Configuration) configurations.get(key);
if (configuration==null) {
log.debug("creating hibernate configuration from cfg '"+cfgFileName+"' and properties '"+propertiesFileName+"'");
File cfgFile = new File(cfgFileName);
configuration = new Configuration();
configuration.configure(cfgFile);
if (propertiesFileName!=null) {
try {
File propertiesFile = new File(propertiesFileName);
FileInputStream propertiesInputStream = new FileInputStream(propertiesFile);
Properties properties = new Properties();