-->
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: Quick question of configuration...
PostPosted: Wed Jan 04, 2006 9:45 am 
Newbie

Joined: Wed Feb 09, 2005 11:15 am
Posts: 7
Location: Argentina
Hibernate version: 3.0

Hi guys, i need to change the configuration of hibernate (connection.url, username, password, etc) but in runtime, without restart the application. Something like a parametrizable configuration. It's possible?.
Where are can find some examples?

Thanks..


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 04, 2006 10:10 am 
Newbie

Joined: Mon Dec 27, 2004 3:47 pm
Posts: 12
hmm, well there's two ways, i'd think.
First, create a new configuration, so :
Code:
Properties props = new Properties();
...
Configuration cfg = new Configuration()
    .addClass(org.hibernate.auction.Item.class)
    .addClass(org.hibernate.auction.Bid.class)
    .setProperties(props);


I'd think, though that creation of multiple SessionFactory's at runtime adhoc is going to be fairly expensive.

Second, you could set this up when the container starts, then just use the appropriate SessionFactory.


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.