Regular |
|
Joined: Sun Aug 01, 2004 6:49 pm Posts: 76
|
Hibernate version: 2.1.6
I have a "hibernate.cfg.xml" file with some default connection properties. But if I try to override them in my application the changes will not take effect.
Excerpt from the configuration file:
[...]
<property name="hibernate.connection.username">rxot</property>
[...]
Try to override:
[...]
Configuration configuration = new Configuration().configure();
configuration.setProperty("hibernate.connection.username", "root");
hibernateSessionFactory = configuration.buildSessionFactory();
[...]
If I try to connect hibernate raises a connection error. If I use the correct username "root" already in the configuration file the connection succeeds.
What am I missing?
Thomas
|
|