(OFBIZ-11136) ‘AdminServer’ provides a portable way to manage life-cycle of the OFBiz process remotely by allowing administrator to check its running status or shutting it down. Previously the ‘AdminServer’ class was a special thread opening a socket and launched at startup. However since this class is about managing some run-time resources with a life-cycle, it matches perfectly the container abstraction. A benefit of making ‘AdminServer’ a container is that the startup process is now simpler and more uniform. Administrators can now prevent remote shutdown of OFBiz for security reasons by removing the container declaration. Additionally They can delegate the process management job to the init process (PID 0) of the hosting system like Systemd [1] by replacing this container with another one. [1] https://www.freedesktop.org/software/systemd/man/systemd-notify.html git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1863024 13f79535-47bb-0310-9956-ffa450edef68
39 lines
1.6 KiB
XML
39 lines
1.6 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.
|
|
-->
|
|
|
|
<ofbiz-component name="base"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
|
|
<resource-loader name="main" type="component"/>
|
|
<classpath type="dir" location="dtd"/>
|
|
<classpath type="dir" location="config"/>
|
|
|
|
<test-suite loader="main" location="testdef/basetests.xml"/>
|
|
|
|
<!-- load the naming (JNDI) server -->
|
|
<container name="naming-container" loaders="rmi" class="org.apache.ofbiz.base.container.NamingServiceContainer">
|
|
<property name="host" value="0.0.0.0"/>
|
|
<property name="port" value="1099"/>
|
|
</container>
|
|
<!-- load the administration server -->
|
|
<container name="admin-container" loaders="main" class="org.apache.ofbiz.base.container.AdminServerContainer"/>
|
|
|
|
</ofbiz-component>
|