Files
ofbiz-framework/framework/service/config/serviceengine.xml
T
Jacques Le Roux c386f6ab30 Set different ports for testing in a CI environment (e.g. Jenkins) https://issues.apache.org/jira/browse/OFBIZ-4794
*What's for?*
Finally, OOTB the port offset is interesting in 2 cases:
# To eventually run Sonar on OFBiz sources https://issues.apache.org/jira/browse/INFRA-3590
# To simultaneously run the demos without having to change much things, just one parameter (this will need to have the same commited in R13.07... to be discussed...)

Of course, It can be used for other purposes outside of the ASF context...

*How it's done?*
Basically, I just added a portoffset integer parameter to 3 ant targets (of course this JVM param can also be used in a Java call from command line): start, start-pos, start-both,

The portoffset parameter is set to zero by default in ClassLoaderContainer.java. 
If a value is passed, it's then grabed by Config.java and passed to ClassLoaderContainer.java, where it's set to this value.

 The portoffset is then used to change in one shoot all the default ports values defined (in config or hardcoded), and the admin port value
This is done in following classes:
CatalinaContainer
NamingServiceContainer
ServiceEngine through ServiceLocation
RmiServiceContainer
XMLRPCClientEngine
XmlRpcTests

To avoid hardcoding locations in services definitions, I also created 2 service-locations: main-http and main-soap

*To summarize:* these changes will be used to run "ant start" with a portoffset value which will take care of all ports values, including admin port. For running R12.04 demo as stable we will still need to create a patch for the last time. R13.07 could have a similar patch applied since it's not yet released...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1533839 13f79535-47bb-0310-9956-ffa450edef68
2013-10-19 22:07:35 +00:00

116 lines
5.9 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.
-->
<service-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/service-config.xsd">
<service-engine name="default">
<!-- Name of the service to use for authorization -->
<authorization service-name="userLogin"/>
<!-- Job poller configuration. Many of these attributes are set to the job poller defaults, but they are included here for convenience. -->
<thread-pool send-to-pool="pool"
purge-job-days="4"
failed-retry-min="3"
ttl="120000"
jobs="100"
min-threads="2"
max-threads="5"
poll-enabled="true"
poll-db-millis="30000">
<run-from-pool name="pool"/>
</thread-pool>
<!-- Service Engine Configuration -->
<engine name="entity-auto" class="org.ofbiz.service.engine.EntityAutoEngine"/>
<engine name="group" class="org.ofbiz.service.group.ServiceGroupEngine"/>
<engine name="interface" class="org.ofbiz.service.engine.InterfaceEngine"/>
<engine name="java" class="org.ofbiz.service.engine.StandardJavaEngine"/>
<engine name="simple" class="org.ofbiz.minilang.SimpleServiceEngine"/>
<engine name="script" class="org.ofbiz.service.engine.ScriptEngine"/>
<!-- Engines that can be replaced by the generic script engine -->
<engine name="bsh" class="org.ofbiz.service.engine.BeanShellEngine"/>
<engine name="groovy" class="org.ofbiz.service.engine.GroovyEngine">
<parameter name="scriptBaseClass" value="org.ofbiz.service.engine.GroovyBaseScript"/>
</engine>
<engine name="jacl" class="org.ofbiz.service.engine.BSFEngine"/>
<engine name="javascript" class="org.ofbiz.service.engine.ScriptEngine"/>
<engine name="jpython" class="org.ofbiz.service.engine.BSFEngine"/>
<!-- -->
<engine name="route" class="org.ofbiz.service.engine.RouteEngine"/>
<engine name="http" class="org.ofbiz.service.engine.HttpEngine"/>
<engine name="jms" class="org.ofbiz.service.jms.JmsServiceEngine"/>
<engine name="rmi" class="org.ofbiz.service.rmi.RmiServiceEngine"/>
<engine name="soap" class="org.ofbiz.service.engine.SOAPClientEngine"/>
<!-- The engine xml-rpc-local is only used by a test service and for this reason it is configured to run on port 8080.
In order to use this in OFBiz change the port accordingly (for demo the default value is 8080)
-->
<engine name="xml-rpc-local" class="org.ofbiz.service.engine.XMLRPCClientEngine">
<parameter name="url" value="http://localhost:8080/webtools/control/xmlrpc"/>
<parameter name="login" value="admin"/>
<parameter name="password" value="ofbiz"/>
</engine>
<service-location name="main-rmi" location="rmi://localhost:1099/RMIDispatcher"/>
<service-location name="main-http" location="http://localhost:8080/webtools/control/httpService"/>
<service-location name="main-soap" location="http://localhost:8080/webtools/control/SOAPService"/>
<service-location name="entity-sync-rmi" location="rmi://localhost:1099/RMIDispatcher"/>
<service-location name="entity-sync-http" location="http://localhost:8080/webtools/control/httpService"/>
<service-location name="rita-rmi" location="rmi://localhost:1099/RMIDispatcher"/>
<service-location name="eedcc-test" location="http://localhost:8080/webtools/control/httpService"/>
<!-- default notification group for all services loaded with 'main' loader
- uncomment this to enable error notification for all services
- (default.fail.main, default.success.main can also be defined
<notification-group name="default.error.main">
<notification subject="Service Error ${model.serviceName}"
screen="component://content/widget/EmailScreens.xml#ServiceNotification"/>
<notify type="from">ofbiz@test.com</notify>
<notify type="to">error@test.com</notify>
</notification-group>
-->
<!-- Start-Up Services -->
<!--
- runtime-data-id refers to the RuntimeData entity for in-parameters
- runtime-delay is the milliseconds after startup this service should run
- run-in-pool is the name of the pool to run the job in; defaults to the send-to-poll (above)
<startup-service name="testScv" runtime-data-id="9900" runtime-delay="0" run-in-pool="pool"/>
-->
<!-- JMS Service Queue/Topic Configuration -->
<!--
<jms-service name="serviceMessenger" send-mode="all">
<server jndi-server-name="default"
jndi-name="jms/TopicConnectionFactory"
topic-queue="jms/OFBTopic"
type="topic"
username="admin"
password="admin"
listen="true"/>
</jms-service>
-->
</service-engine>
</service-config>