I am trying to change properties in hibernate.cfg.xml but my code doesn't work.
public static void changeConfiguration(String login, String password){
Configuration cfg = new Configuration();
cfg.configure();
cfg.setProperty("hibernate.connection.password", password);
cfg.setProperty("hibernate.connection.username", login);
}
Any idea why thats doesnt work? My file hibernate.cfg.xml always looks the same.