start up:
The total process, start.java launches OFBIZ according to Startup.properties, then start the launch process according to the configured Container, and then starts the configured Container.
Start.java
It itself is a thread that can receive instructions and stop OFBIZ.
Note that a usage: setShutDownhook, you can set the content that the thread is executed, refer to RumTime.Addshutdownhook (Thread Hook)
In StartServer (), first through the ClassPath object, initialize the LIB you need to use, construct the ClassLoader, then start Server through StartUPloader
The Config class corresponds to Startup.properties, then ContainerConfig is based on OFBIZ-containers.xml
Org.ofbiz.base.container.containerLoader.Load ()
Then start, the container defined in the OFBIZ-Containers.xml, 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 Components that require Load according to Component-loading.xml
Next, start each Component, there is a configuration file of OFBIZ-Component.xml in each Component's directory, OFBIZ is loaded according to this, then Container.Start (); the so-called Load Component is actually changing ClassPath
ComponentConfig.java corresponds to OFBIZ-Component.xml,
In jetty, it will be configured according to whether the component is configured, WebApp is determined to load those WebApp to WebApplicationContext.
2) ClassLoader-Container
3) Jotm-container
For Transaction Processing
4) RMI-DISPATCHER
Instant RemoteDispatcherImpl should be the RMI Server end, but for web development, it may be useless. For other client applications, you can connect to RMI Server via RMI Client.
Instantiate Delegator, Dispacher, to read the configuration of Entity, Service
5) Jetty-Container
Start Jetty service
6) Beanshell-Container
Start Beanshell
Classpath.java
Use a Vector record in ClassPath, each of the vector represents items in a classpath, such as a JAR file
Then reconstruct a ClassLoader for all follow-up,