We are developing a multi tenant application where we are using sing SessionFactory – multiple DataSources approach. We have written a DataSourceProxy and configured this to SessionFactory which switches b/w datasources based on tenantId. As we are using hibernate’s automatic table creation (create) to create tables in schema we need to create tables in each tenant specific schema on switching of dataSource (if not exists). Please let me know if you have any pointers.
Thanks in advance, Prashanth