-->
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.  [ 3 posts ] 
Author Message
 Post subject: Dynamic configuration
PostPosted: Wed Feb 21, 2007 3:23 am 
Newbie

Joined: Mon Nov 20, 2006 4:02 pm
Posts: 7
I have a web app that's running with Hibernate. One of the requirements is dynamic configuration - that is, I need to have Hibernate add to its existing mappings, new files that are created at runtime. I've looked at the Configuration class, but the documentation seems to indicate that this is only good for the initial configuration. I've also looked at classes like HbmBinder, but it's not clear if this will work, or which of the binding methods to use. Can anyone suggest how I might accomplish this? Your help will be appreciated.

Tom


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 18, 2008 8:19 am 
Newbie

Joined: Mon Feb 18, 2008 8:03 am
Posts: 1
Hi,

I am having similar requirement,Is this Possible ?
Please reply for any other solutions or pointers for this.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 18, 2008 10:41 am 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
You have to re-init the Configuration class and rebuild your SessionFactory, adding to it references to your new hbm.xml files, and somehow get their POJO class implementations into your application.

if your POJO class implementations need to be dynamically generated as a result of new or changed hbm.xml files, you need to perform some java-fu to get them into your application

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


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