Web / Apache OFBiz Interview questions
What is the difference between SECA and EECA?
SECA (Service Event Condition Action) and EECA (Entity Event Condition Action) both trigger extra logic automatically, but they hook into different layers of the framework.
| SECA | EECA |
| Fires on a service invocation event (before/after, success/failure) | Fires on a raw entity operation (create, store, remove) |
Defined in a component's *Services.xml alongside the service | Defined in an entity's EECA definition file |
| Typically chains another service as the action | Typically invokes a service in reaction to a low-level data change |
In practice SECA is used far more often, since most business logic flows through services anyway. EECA is reserved for cases where you need to react even when an entity is modified outside a "proper" service call - a bulk import that writes directly through the delegator, for example.
More Related questions...