The container-1 in OFBiz

Source: Internet
Author: User

In OFBiz, there are mainly three kinds of container

  1. Container when the system starts

    650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6E/AA/wKioL1WCbe7CLfMBAAJRrxpd7o0715.jpg "title=" Start Container.png "alt=" wkiol1wcbe7clfmbaajrrxpd7o0715.jpg "/> This is called in the startup class, according to the framework\base\config\ Loading other containers in the definition in Ofbiz-containers.xml

  2. The container used to load the component

    650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6E/AE/wKiom1WCbQKSgNVuAAVkMc4P3IM658.jpg "title=" Component Load Container.png "alt=" Wkiom1wcbqksgnvuaavkmc4p3im658.jpg "/>

    The container defined here will be started by the top-level container, executing the specified class

    The container defined here is basically when the component is not loaded

  3. Container defined in the Component-load.xml component

    650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6E/AA/wKioL1WCb9nyzGFLAAgvZ0ig_po991.jpg "title=" The container in the component. png "alt=" wkiol1wcb9nyzgflaagvz0ig_po991.jpg "/> The container on this side is basically executed after the component configuration has all been loaded.



  4. Get container        list<containerconfig.container> defined in all components  containersdefinedincomponents = componentconfig.getallcontainers ();         for  (containerconfig.container containercfg:  containersdefinedincomponents)  {             boolean matchingloaderfound = false;             if  (Utilvalidate.isempty (containercfg.loaders)  &&  Utilvalidate.isempty (loaders))  { //Compare start level                  matchingLoaderFound = true;             } else {                 for  (String loader:  loaders)  {                     if  (Utilvalidate.isempty (containercfg.loaders)  | |  containercfg.loaders.contains (loader))  {                         matchingloaderfound  = true;                         break;                     }                 }             }            if  ( Matchingloaderfound)  {                debug.loginfo ("Loading  Component ' s container:  " + containercfg.name, module);                 Container tmpContainer =  Loadcontainer (Containercfg, args);  //load container, execute the Init method in it                  this.loadedcontainers.add (TmpContainer);//Add Cache                 debug.loginfo ( "Loaded component ' s container: "  + containercfg.name, module);             }        }

Summarize:

The container of these three places is not different, mainly because of the starting sequence and the role of the problem to write these container in different configuration files

This article from the "Sea Dragon" blog, declined reprint!

The container-1 in OFBiz

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.