Announcement Announcement Module
No announcement yet.
Best practice for storing mandator data Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Best practice for storing mandator data

    hi spring-users

    we'd like to develop some basic services with spring to provide a common base for any type of applications we will develop. these apps should use these services to avoid reenventing the wheel again and again.

    we need to implement the base services in a way that the applications are mandator-aware. additionally we want to store any mandator's data in its own database (otherwise it would be a pain to move a mandator).

    let's say that we build an application that stores its data in a database table called "foo". this would mean that every mandator has this foo-table in its database.
    if a user from mandator1 logs in and uses the application, the app must use the database data of mandator1. at the same time another user from mandator2 can use the same application to work with its data from the database of mandator2.

    is this architecture possible with spring and hibernate-mappings? and if yes, do we need to switch the datasource in the DAOs at runtime? or even create a DAO instance for every datasource?

    thanks for your help and greetings