The most respected entity engine in ofbiz, what is the benefit of our downward study (I have not known), first step, the creation of the entity engine
In OFBiz, the entity engine is created by the Catalina-container (Tomcat container)
<container name= "Catalina-container" loaders= "main" class= "Org.ofbiz.catalina.container.CatalinaContainer" > <!--static configuration for Tomcat---<property name= "delegator-name" value= "Default"/>//here is where the entity engine is configured <property name= "use-naming" value= "false"/> <property name= "Debug" value= "0"/> <proper Ty name= "Catalina-runtime-home" value= "Runtime/catalina"/>
Here the entity engine is created through the factory class This.delegator = Delegatorfactory.getdelegator (Containerconfig.getpropertyvalue (CC, "Delegator-na Me "," Default "));
The specific creation is created by the Genericdelegator class, where the side code has more than 2000 lines-
Gets the configuration information defined in Framework\entity\config\entityengine.xml This.delegatorinfo = Entityconfigutil.getdelegator ("Default ");
Model Load This.modelreader = Modelreader.getmodelreader (delegatorbasename); This.modelgroupreader = Modelgroupreader.getmodelgroupreader (Delegatorbasename);
This article from the "Sea Dragon" blog, declined reprint!
The entity engine in OFBiz delegator