-
Nov 26th, 2012, 05:08 AM
#1
Upgrading web app to multi tenant - up front advice sought!
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?
-
Nov 26th, 2012, 05:32 AM
#2
Spring 3.0 doesn't work with hibernate4 so that won't work...
We used a solution using Spring AOP and hibernate 3.2 which works like charm. It is documented here. The code changed somewhat in the latests years but the basic is still the same.
As long as you don't use 2nd level caching the solution can be used as is, else you also have to create a similair solution for the second level caching. But that should be along the same lines and shouldn't be too hard.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules