You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Shi Jinghai (JIRA)" <ji...@apache.org> on 2017/03/02 01:55:45 UTC
[jira] [Updated] (OFBIZ-9233) Enable a service to run by a specific
service engine
[ https://issues.apache.org/jira/browse/OFBIZ-9233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shi Jinghai updated OFBIZ-9233:
-------------------------------
Attachment: OFBIZ-9233-20170301.patch
This patch implemented multi-service-engine functions.
It introduces a new attribute to service define: service-engine-name. If it's not set, the default service-engine will be used, i.e.
<service name="testJavaDefaultScv" engine="java" export="true" validate="false" require-new-transaction="true"
location="org.apache.ofbiz.common.CommonServices" invoke="testService">
<description>Test default service engine name.</description>
<attribute name="defaultValue" type="Double" mode="IN" default-value="999.9999"/>
<attribute name="message" type="String" mode="IN" optional="true"/>
<attribute name="resp" type="String" mode="OUT"/>
</service>
if set, the assigned service-engine will used, i.e.
<service name="testJavaSpecificScv" engine="java-specific" export="true" validate="false" require-new-transaction="true"
location="org.apache.ofbiz.common.CommonServices" invoke="testService" service-engine-name="specific">
<description>Test specific service engine name.</description>
<attribute name="defaultValue" type="Double" mode="IN" default-value="999.9999"/>
<attribute name="message" type="String" mode="IN" optional="true"/>
<attribute name="resp" type="String" mode="OUT"/>
</service>
The example services aboved are in 2 new test cases: testJavaDefaultInvocation and testJavaSpecificInvocation, run
./gradlew "ofbiz --test component=service"
to check whether the services run by different service engines and with different poolIds.
> Enable a service to run by a specific service engine
> ----------------------------------------------------
>
> Key: OFBIZ-9233
> URL: https://issues.apache.org/jira/browse/OFBIZ-9233
> Project: OFBiz
> Issue Type: Improvement
> Components: framework
> Affects Versions: Trunk
> Reporter: Shi Jinghai
> Assignee: Shi Jinghai
> Priority: Minor
> Fix For: Trunk
>
> Attachments: OFBIZ-9233-20170301.patch, OFBIZ-9233-MultiServiceEnginesEnv.png
>
>
> Currently, all of the services of OFBiz are run by the 'default' service engine.
> In a project, we have to make a service run by different service engines rather than the 'default' one, i.e. order services run by 'order' service engine and 'orderpool', shipment services run by 'shipment' service engine and 'shipmentpool'.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)