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 2018/01/11 10:33:00 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-20180111.patch

In the OFBIZ-9233-20180111.patch, a new attribute "service-engine-name" is introduced to service element in service define file, i.e. in framework/service/servicedef/services_test_serviceengine_specific.xml:

{code:xml}
<?xml version="1.0" encoding="UTF-8"?>

<services service-engine-name="specific" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="../dtd/services.xsd">
    <description>Test services run on the "specific" service engine</description>

    <service name="testJavaSpecificScv" engine="java-specific" export="true" validate="false" require-new-transaction="true"
            location="org.apache.ofbiz.common.CommonServices" invoke="testService">
        <description>Test "specific" service engine.</description>
        <attribute name="defaultValue" type="Double" mode="IN" default-value="888.8888"/>
        <attribute name="message" type="String" mode="IN" optional="true"/>
        <attribute name="resp" type="String" mode="OUT"/>
    </service>
</services>
{code}

This service-engine-name value will be set to every services defined in the file, this makes it simple to change a service running pool dynamically in the future.

When running an async service in scheduler, if the poolId is wrong configured according to current service define, the poolId in JobSandbox can be automatically changed. The sample is the jobId="TestJSSOnDefault" in framework/service/testdef/data/MultiServiceEngineScheduledServiceData.xml.

> 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
>         Attachments: OFBIZ-9233-20170301.patch, OFBIZ-9233-20170413.patch, OFBIZ-9233-20180111.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.4.14#64029)