Hi all,

I'm looking to upgrade an existing web app to a multi tenant SaaS solution. The existing product is based on Spring 3.0 and Hibernate 3.3, ontop of MySQL5. It uses a distinct Spring based DAO tier that is based around use of 'HibernateDaoSupport' and the use of XML configuration.

The multi tenant solution requires support for both a separate database for a tenant and separate schema in a database (multiple tenants each having their own schema in a single database).

Reviewing all the available docs there seem to be two ways forward:
  • Use Hibernate 4.1 (how stable is this?) Will this work with Spring 3.0?
  • Customize Hibernate 3.x for with data source routers, custom connection factories etc. There are a number of bog postings and article out there that elaborate different solutions


For various reasons I have to keep the XML configuration. Before I launch into this project I'm hoping I can tap the experience of other spring developers who have already been down this path.

Any suggestions?