-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: problem with overriding configuration properties
PostPosted: Sat Aug 28, 2004 6:10 pm 
Regular
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


Top
 Profile  
 
 Post subject: SOLVED: problem with overriding configuration properties
PostPosted: Mon Aug 30, 2004 9:03 am 
Regular
Regular

Joined: Sun Aug 01, 2004 6:49 pm
Posts: 76
I'm very sorry. My error was my own fault I initialized the session again at an other point. :-(

Thomas


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.