Hello,
I need help to configure a Hibernate.
We have several users/companies that access the application using there own url, for exampel "[login to view URL]".
However, each company has their owb database/schema and we want Hibernate to be configured to select a correct Database/Schema based on which url is used in the web page request.
## Deliverables
We are using hibernate-spring-wicket in a webapp deployed in Tomcat.
MySQL is used as database. Currently each customer run a single
instance of our application in a dedicated tomcat, using one dedicated
physical database each.
We want to consolidate our servers by moving several customers from
their own separate tomcats into a single shared tomcat backed by a
single mysql server using separate logical databases/schemas for each
customer. The idea is to simply select the correct database/schema
based on which frontend-adress the customer requests. e.g. if the customer requests the webpage "[login to view URL]" the application should use the database schema "company1" for all
requests, while simultaneously selecting different schemas for other users (company2, company3 etc).
Currently we configure hibernate using various properties-files but these are by their nature application-wide and we dont want that, as explained above we want dynamic selection of database/schema for each session.
How do we do this in hibernate? The delivery should either be instructions for us to this and we verify by actually doing this or you setting up hibernate for us or setting up a test environment with hibernate and a MySQl database and provide means for us to see that it works as we wanted.