look like an interesting solution. do you have an example? read the blog post that was posted 2007. also noticed you added multi-tenant support for hibernate 4 but don't really see how that would come into play as this is swaping out the datasource and thus would seem to be redundant if using the architecture that hibernate requests.