Results 1 to 2 of 2

Thread: Upgrading web app to multi tenant - up front advice sought!

  1. #1
    Join Date
    Oct 2006
    Posts
    100

    Default 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?

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,695

    Default

    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.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •