Java Webapplication - How to Implement Saas Using

2019-05-26 21:44发布

We are having a web application developed j2ee/Spring.

We are planning to implement SaaS model by using different schema for each customer.

Please suggest the best way to do it.

We are blank how to start the process ? How can we map different customer to different DB ?

Thanks

2条回答
叼着烟拽天下
2楼-- · 2019-05-26 22:15

This is something you want to control with your ORM. Check out EclipseLink:

http://wiki.eclipse.org/EclipseLink/Development/Indigo/Multi-Tenancy

Alternatively, check out Hibernate's Multi-Tenancy: http://docs.jboss.org/hibernate/orm/4.1/devguide/en-US/html/ch16.html

I would go with tenant per schema.

查看更多
放我归山
3楼-- · 2019-05-26 22:37

For using different schema for each customer you need to come up with an identifier(s) that can be used to uniquely identify the customer schema or the tenant schema. It is usually a tenant identifier key.

Neil's answer has provided useful links on actually making connections to different tenant databases.

Below is a link to one of my posts that talks about the db architecture and related items.

Architecture for SaaS based online portal

查看更多
登录 后发表回答