Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 1.06 KB

README.md

File metadata and controls

26 lines (19 loc) · 1.06 KB

CDI Events with dynamic qulifier

Events

Beans may produce and consume events. This facility allows beans to interact in a completely decoupled fashion, with no compile-time dependency between the interacting beans. Most importantly, it allows stateful beans in one architectural tier of the application to synchronize their internal state with state changes that occur in a different tier.

An event comprises:

  • A Java object - the event object;
  • A set of instances of qualifier types - the event qualifiers

copied from cdi tutorials

Project

Was described the second one. Used the qualifier NotificationByType.java for dynamic choosing which observer will be invoked. All observers are in observers package. For testing, you can use a simple controller which fire different Notification.java related on notification type.