Details
-
Type:
New Feature
-
Status:
Community Resolved
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 6.1.0 CE RC1
-
Fix Version/s: None
-
Component/s: Database, Service Builder
-
Labels:None
-
Environment:at revision 91616
-
Similar Issues:
-
Liferay Contributor's Agreement:Accept
Description
Ability to connect different data source in plugins through the service-builder
For example, the entity "DocumentType" has defined with data-source, session-factory, tx-manager.
When the service-builder generates services, apply "data-source", "session-factory", "tx-manager" in the XML configuration files.
<entity name="DocumentType" table="DOCUMENTTYPE" uuid="false" local-service="true" remote-service="true" data-source="mdbDataSource" session-factory="mdbSessionFactory" tx-manager="mdbTransactionManager">
<!-- PK fields -->
<column name="documentTypeId" type="long" primary="true" />
<!-- Other fields -->
<column name="name" type="String" />
<column name="description" type="String" />
</entity>

When the entity "DocumentType" has defined without data-source, session-factory, tx-manager, the service-builder should use default values: "liferayDataSource", "liferaySessionFactory" and "liferayTransactionManager" for data-source, session-factory, tx-manager, respectively.