-->
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: Multiple Session factory
PostPosted: Fri May 06, 2011 6:34 am 
Newbie

Joined: Fri May 06, 2011 6:09 am
Posts: 1
I need to have 1 application per client database,suppose i had a application,i want to run it in different departments with with different DB's
but it should create a session factory at run time based on request..or some way to have more than 1 session factories...how it can be possible is any 1 having solution for this ?


Top
 Profile  
 
 Post subject: Re: Multiple Session factory
PostPosted: Fri May 06, 2011 7:50 am 
Newbie

Joined: Tue Mar 01, 2011 3:43 am
Posts: 2
cfg.xml file per client
from the code you create 2 config object as follow -
configDB1 = new Configuration ().configure("filename1.cfg.xml");
configDataBase2 = new Configuration ().configure("fileName2.cfg.xml");


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.