When you extend or customize Liferay Portal, usually you end up using the default Liferay database.
Some clients require that their data be stored in a database other than Liferay database when they customize the Portal application using Liferay. This may be because their data is sensitive and they want additional security. Some corporates such as Banking and Insurance have strict security policies and compliance in place to protect the data.
There have been articles on how to connect to a different database in custom portlets in Liferay EXT environment. However, there are few articles on soutions to connection to a separate databases in Liferay Plugins SDK.
It is favorable to use build-service in the Plugins SDK to connect to a separate database because all your database access code will be automatically generated, thanks to Liferay's architecture and tools.
My article "Connecting to Separate Database Using Build-service in Plugins SDK" at Liferay's Wiki site describes an implementation to achieve this.
Your comments would be greatly appreciated.
- By Xinsheng Robert Chen
Sr. Architect and Consultant at CIGNEX USA