-->
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: Dynamically add mappings
PostPosted: Thu Jul 27, 2006 10:26 pm 
Newbie

Joined: Thu Jul 27, 2006 10:18 pm
Posts: 1
Is it possible to dynamically add mapping files to the SessionFactory? We are building a generic runtime system that will dynamically generate in-memory mapping files from databasee schema metadata and would like to lazily add these generated mapping files to the SessionFactory at runtime.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 27, 2006 11:59 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
No, not without much hackery inside SessionFactoryImpl. However, there's nothing to stop you from discarding your old factory and creating a new one. It's not a speedy operation, not something that you'd do for every request, but presumably adding new mapping files would be a rare event anyway.

_________________
Code tags are your friend. Know them and use them.


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.