wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes dynamicall decide which database has to be referred Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "dynamicall decide which database has to be referred" Watch "dynamicall decide which database has to be referred" New topic
Author

dynamicall decide which database has to be referred

pavan bukka
Greenhorn

Joined: Jan 01, 2013
Posts: 21
Hi all ,
we have developed an application called document management system which has been developed using spring and hibernate , now we want give this application on trial basis to the clients. to do so what we have done is we have created separate database for each client , User while logging in will be giving his user name and password along with client id based on client id i have to refer the database .
(for example i have created two databases with the names AAA and BBB and restored these databases with our application database, while user logging if he gives client id as AAA then the database named AAA has to be refer ed for all his transactions ,if the client id is BBB then database BBB has to be referred , these databases schema and all the stored procedures will be same but data will be based on clients )

how to dynamically decide which database has to be referred in hibernate.


with regards,
bukka pavan kumar.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: dynamicall decide which database has to be referred
 
Similar Threads
simple example problem
muliple db's accessed by 1 application server
More than 30 joins in a query because polymorphism
Objects (please can someone clear this up)
J2EE & EJB roles in Ireland