-->
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: Hibernate Connection Parameters
PostPosted: Mon Jul 08, 2013 4:32 am 
Newbie

Joined: Mon Jul 08, 2013 4:13 am
Posts: 2
Hi, I am new to Hibernate. Does Hibernate support a connection provider strategy where a connection is selected (to be provided) based on arguments passed in during runtime (which may be different between calls)?

For example, something like
getConnection("key for connection X") returns connection 'X'
getConnection("key for connection Y") returns connection 'Y'


Top
 Profile  
 
 Post subject: Re: Hibernate Connection Parameters
PostPosted: Mon Jul 08, 2013 4:43 am 
Newbie

Joined: Mon Jul 08, 2013 4:13 am
Posts: 2
Ahh, of course! http://docs.jboss.org/hibernate/orm/4.1/javadocs/org/hibernate/service/jdbc/connections/spi/MultiTenantConnectionProvider.html#getConnection(java.lang.String)

Multi-tenant connection strategy was exactly what I was looking for (i.e., getConnection(String tenantIdentifier) ...)


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.