Web / Apache OFBiz Interview questions
What is a delegator in OFBiz?
A delegator is OFBiz's handle to the Entity Engine for a given tenant/data source. Every entity operation - findOne, findList, create, store, removeByAnd - is called on a delegator instance rather than on a raw JDBC connection.
The delegator name (commonly default) is resolved via entityengine.xml to a specific set of JDBC connection settings and entity group mappings, which is also how OFBiz supports multiple data sources or tenants from one codebase.
Services and screens usually get the delegator from the current dispatch context rather than instantiating one directly, keeping data access consistent across a whole request.
More Related questions...