Files
ofbiz-framework/framework/service/entitydef/entitymodel.xml
T
Andrew Zeneski d4c785dad4 implemented ServiceSemaphore; built in locking to prevent services (when defined) from running at the same time; uses database record to work with a cluser of application servers. Three modes are available:
None - Does no locking
Wait - Waits for the previous service to complete (currently up to 5 minutes)
Fail - Fails when the same service is already running

use the semaphore="none|wait|fail" in the service definition (none is the default when the attribute is not defined)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@575074 13f79535-47bb-0310-9956-ffa450edef68
2007-09-12 20:58:44 +00:00

143 lines
7.0 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd">
<!-- ========================================================= -->
<!-- ======================== Defaults ======================= -->
<!-- ========================================================= -->
<title>Entity of an Open For Business Project Component</title>
<description>None</description>
<copyright>Copyright 2001-2006 The Apache Software Foundation</copyright>
<author>None</author>
<version>1.0</version>
<!-- ========================================================= -->
<!-- ======================== Data Model ===================== -->
<!-- The modules in this file are as follows: -->
<!-- - org.ofbiz.service.schedule -->
<!-- - org.ofbiz.service.semaphore -->
<!-- ========================================================= -->
<!-- ========================================================= -->
<!-- org.ofbiz.service.schedule -->
<!-- ========================================================= -->
<entity entity-name="JobSandbox" package-name="org.ofbiz.service.schedule" title="Job Scheduler Sandbox Entity"
sequence-bank-size="100">
<field name="jobId" type="id-ne"></field>
<field name="jobName" type="name"></field>
<field name="runTime" type="date-time"></field>
<field name="poolId" type="name"></field>
<field name="statusId" type="id"></field>
<field name="parentJobId" type="id"></field>
<field name="previousJobId" type="id"></field>
<field name="serviceName" type="name"></field>
<field name="loaderName" type="name"></field>
<field name="maxRetry" type="numeric"></field>
<field name="authUserLoginId" type="id-vlong"></field>
<field name="runAsUser" type="id-vlong"></field>
<field name="runtimeDataId" type="id"></field>
<field name="recurrenceInfoId" type="id"></field>
<field name="runByInstanceId" type="id"></field>
<field name="startDateTime" type="date-time"></field>
<field name="finishDateTime" type="date-time"></field>
<field name="cancelDateTime" type="date-time"></field>
<prim-key field="jobId"/>
<relation type="one" fk-name="JOB_SNDBX_RECINFO" rel-entity-name="RecurrenceInfo">
<key-map field-name="recurrenceInfoId"/>
</relation>
<relation type="one" fk-name="JOB_SNDBX_RNTMDTA" rel-entity-name="RuntimeData">
<key-map field-name="runtimeDataId"/>
</relation>
<relation type="one" fk-name="JOB_SNDBX_AUSRLGN" title="Auth" rel-entity-name="UserLogin">
<key-map field-name="authUserLoginId" rel-field-name="userLoginId"/>
</relation>
<relation type="one" fk-name="JOB_SNDBX_USRLGN" title="RunAs" rel-entity-name="UserLogin">
<key-map field-name="runAsUser" rel-field-name="userLoginId"/>
</relation>
<relation type="one" fk-name="JOB_SNDBX_STTS" rel-entity-name="StatusItem">
<key-map field-name="statusId"/>
</relation>
<index name="JOB_SNDBX_RUNSTAT">
<index-field name="runByInstanceId"/>
<index-field name="statusId"/>
</index>
</entity>
<entity entity-name="RecurrenceInfo"
package-name="org.ofbiz.service.schedule"
title="Recurrence Info Entity">
<field name="recurrenceInfoId" type="id-ne"></field>
<field name="startDateTime" type="date-time"></field>
<field name="exceptionDateTimes" type="very-long"></field>
<field name="recurrenceDateTimes" type="very-long"></field>
<field name="exceptionRuleId" type="id-ne"></field>
<field name="recurrenceRuleId" type="id-ne"></field>
<field name="recurrenceCount" type="numeric"></field>
<prim-key field="recurrenceInfoId"/>
<relation type="one" fk-name="REC_INFO_RCRLE" rel-entity-name="RecurrenceRule">
<key-map field-name="recurrenceRuleId"/>
</relation>
<relation type="one" fk-name="REC_INFO_EX_RCRLE" title="Exception" rel-entity-name="RecurrenceRule">
<key-map field-name="exceptionRuleId" rel-field-name="recurrenceRuleId"/>
</relation>
</entity>
<entity entity-name="RecurrenceRule"
package-name="org.ofbiz.service.schedule"
title="Recurrence Rule Entity">
<field name="recurrenceRuleId" type="id-ne"></field>
<field name="frequency" type="short-varchar"></field>
<field name="untilDateTime" type="date-time"></field>
<field name="countNumber" type="numeric"></field>
<field name="intervalNumber" type="numeric"></field>
<field name="bySecondList" type="very-long"></field>
<field name="byMinuteList" type="very-long"></field>
<field name="byHourList" type="very-long"></field>
<field name="byDayList" type="very-long"></field>
<field name="byMonthDayList" type="very-long"></field>
<field name="byYearDayList" type="very-long"></field>
<field name="byWeekNoList" type="very-long"></field>
<field name="byMonthList" type="very-long"></field>
<field name="bySetPosList" type="very-long"></field>
<field name="weekStart" type="short-varchar"></field>
<field name="xName" type="very-long"></field>
<prim-key field="recurrenceRuleId"/>
</entity>
<entity entity-name="RuntimeData" package-name="org.ofbiz.service.schedule" title="Runtime Data Entity"
sequence-bank-size="100">
<field name="runtimeDataId" type="id-ne"></field>
<field name="runtimeInfo" type="very-long"></field>
<prim-key field="runtimeDataId"/>
</entity>
<!-- ========================================================= -->
<!-- org.ofbiz.service.semaphore -->
<!-- ========================================================= -->
<entity entity-name="ServiceSemaphore" package-name="org.ofbiz.service.semaphore" title="Semaphore Lock Entity"
sequence-bank-size="100">
<field name="serviceName" type="name"></field>
<field name="lockThread" type="name"></field>
<field name="lockTime" type="date-time"></field>
<prim-key field="serviceName"/>
</entity>
</entitymodel>