-->
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.  [ 4 posts ] 
Author Message
 Post subject: Can we change connection string during runtime?
PostPosted: Mon Jan 05, 2009 10:13 pm 
Beginner
Beginner

Joined: Mon Jan 05, 2009 7:08 am
Posts: 24
hello

Can we change connection string during runtime? I came across this it appears to me that we can't?

http://forum.springframework.net/showthread.php?p=10338

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 05, 2009 11:59 pm 
Regular
Regular

Joined: Wed Oct 15, 2008 6:59 am
Posts: 103
Location: Chennai
ya u can change connection string by creating new Configuration object and don't forget to build ur sessionFactory.

_________________
If u feel it will help you, don't forget to rate me....


Top
 Profile  
 
 Post subject: Thanks - code fragment?
PostPosted: Tue Jan 06, 2009 12:20 am 
Beginner
Beginner

Joined: Mon Jan 05, 2009 7:08 am
Posts: 24
THanks but code fragment? Need some example to work with... I Googled didn't find anything in this regards.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 06, 2009 8:43 am 
Regular
Regular

Joined: Wed Oct 15, 2008 6:59 am
Posts: 103
Location: Chennai
Configuration config=new Configuration();
config.configure("/hibernate.cfg.xml");
config.addResource("Report1.hbm.xml");
.....

_________________
If u feel it will help you, don't forget to rate me....


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.