Announcement Announcement Module
Collapse
No announcement yet.
is it possible to use same DAO's for different datasources Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • is it possible to use same DAO's for different datasources

    I'm not quite sure how to go about this. I have a web appplication that uses the same table model but in different databases. The user is allowed to switch which database to access dynamically, and since the data model is the same, the application doesn't change, just the database it points to changes.

    Anyway, I'm trying to convert it to a Hibernate/Spring architecture and since I define the session factory based on the 'datasource', do I have to define multiple session factories for each one?

    Anyone have any ideas how I should implement this, if it's even possible?

  • #2
    Take a look at DAOs with dynamic data source
    HTH
    Last edited by robyn; May 14th, 2006, 05:37 PM.

    Comment

    Working...
    X