If you want to use multi-DB for multi-tenant (let's say tenant01 and tenant02)
I think you can create config file should likes:
<bean id="sessionFactory_tenant01" class="xxxxx">
<property name="configLocation" value="cfg_tenant01.xml"/>
</bean>
<bean id="sessionFactory_tenant02" class="xxxxx">
<property name="configLocation" value="cfg_tenant02.xml"/>
</bean>
and then, in your java code, you can get different bean instance for
different tenant via [ID],
code looks like:
BeanFactory.getBean("sessionFactory_" + tenantID,SessionFactory.class);
You can read this document for more information:
http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/beans/factory/BeanFactory.html#getBean%28java.lang.String,%20java.lang.Class%29
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]