-->
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.  [ 1 post ] 
Author Message
 Post subject: A little OT: Extending HibernateUtil singleton for >1 db
PostPosted: Tue Oct 26, 2004 6:11 am 
Newbie

Joined: Mon Oct 04, 2004 5:03 pm
Posts: 5
I read chapter 8 with great interest - have been looking into how to integrate hibernate into existing solutions for some weeks now.

Each hibernate factory instance is already placed in a JNDI location (this is deployment of the hibernate MBean via .sar files under jboss).

The HibernateUtil class singleton implementation looks very usable - and in fact works well in some of the applications I want to use it in. However - some of the applications need more than one datasource - and if I have understood it correctly this means one HibernateFactory per datasource.

Just wondered if the authors/readers had any thoughts - you could extend the singleton so that it took jndiName as parameter - but then every call to each method (getSession) etc would need the same. Or you could use the singleton to generate a non singleton (sort of a HibernateFactoryFactory). Was just interested in how folk would approach this?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.