Start Entrance Start.java analysis

Source: Internet
Author: User

Framework launcher in Package:Org.ofbiz.base.start

Entrance is: main method of Start.java

Start.java Launcher Content:

Steps

Details

Into the compared with his test

help/status/shutdown/ or execute a command

Load configuration

from environment variable ofbiz.system.props
Get configuration files from the command org/ofbiz/base/start/" +  command   +  ". Properties
about configuration and variable loading, focusing on /framework/start/src/org/ofbiz/base/start/ Config.java readconfig (string config)

Initializing the classpath load class library

List of class libraries see Config.java initclasspath () and readconfig ()

Initialize the log folder

-

Creating a listener thread

Start the socket server, listen for 0 ports (see ofbiz.admin.port properties, Start.properties or other)

Join addshutdownhook to runtime

Trigger on exit, do graceful exit

Initialize startloaders

Create a list of initiator instances, most of which are Containerloader an element, and in some cases splashloader.

Start.java , initstartloaders (), Containerloader.java , load (), Loadcontainer ()

Componentcontainer.java, init ()->loadcomponents ()->loadcomponentfromconfig () Loadcomponentdirectory ()

->file configfile = fileutil.getfile (componentlocation + "/ofbiz-component.xml");-> loop call LoadComponent () add the module's jar package to classpath

Where Componentconfig.java is the parsing of the XML file in java .

Start () of Start ()->startuploader, Start () of the container

Container list defaults from framework/base/config/ofbiz-containers.xml

Start Entrance Start.java analysis

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.