I've tried this one too, but does not work.
Code:
// Together
cfg.configure(CONFIG_FILE_LOCATION)
.setProperty("hibernate.connection.username", DB_USERNAME)
.setProperty("hibernate.connection.password", DB_PASSWORD);
// Separated
cfg.configure(CONFIG_FILE_LOCATION);
cfg.setProperty("hibernate.connection.username", DB_USERNAME);
cfg.setProperty("hibernate.connection.password", DB_PASSWORD);
// Changing order
cfg.setProperty("hibernate.connection.username", DB_USERNAME)
.setProperty("hibernate.connection.password", DB_PASSWORD)
.configure(CONFIG_FILE_LOCATION);
// No one worked...
// PS: I've made all these tests with "connection.username"
// and "connection.password" too...
I know it should works, setting the whole configuration by this way, but I really like to work together with configuration file.
Is there someone else to give me a light?
Thx,
Rodrigo G. Tavares de Souza
Campinas - Brazil