OFBiz Start-up

Source: Internet
Author: User


Start:
The overall process, Start.java starts the ofbiz according to Startup.properties, and then completes the boot process according to the container of the Ofbiz-containers.xml boot configuration.
Start.java
itself is a thread that can receive instructions, stop ofbiz,
Note One usage: Setshutdownhook, you can set the content to execute when the thread exits, refer to Rumtime.addshutdownhook (thread hook)
In StartServer (), first through the Classpath object, initialize the Lib to be used, construct the ClassLoader, and then start the server by Startuploader.
The Config class corresponds to Startup.properties, and then Containerconfig is based on the Ofbiz-containers.xml
Org.ofbiz.base.container.ContainerLoader.load ()
And then start, ofbiz-containers.xml defined in each container, with the corresponding class,
Component-container,org.ofbiz.base.container.componentcontainer
Classloader-container
Jotm-container
Rmi-dispatcher
Jetty-container
Beanshell-container
Load these corresponding class

1) Component-container
Componentloaderconfig, get a list of component that need load according to Component-load.xml

Next, start each component, in each component directory there is ofbiz-component.xml configuration file, OFBiz load component according to this, and then Container.start (); The so-called load component is actually changing the classpath
Componentconfig.java corresponds, Ofbiz-component.xml,
In jetty, the component is configured again, WebApp to determine the load of those webapp to Webapplicationcontext
2) Classloader-container
3) Jotm-container
For transaction processing
4) Rmi-dispatcher
Instantiating Remotedispatcherimpl, the RMI server side should be started, but may not be useful for web development, and for other client applications, you can connect to RMI server via RMI client.
Instantiate the Delegator,dispacher, thus reading the configuration of the Entity,service

5) Jetty-container
Start the jetty service
6) Beanshell-container
Start BeanShell




Classpath.java
Use a vector to record each item in the Classpath,vector that represents an entry in a classpath, such as a jar file
And then reconstruct a classloader for all subsequent use,

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.