An event source sends events in the form of Java objects.
Specifically, each event is an instance of a class implementing the org.eclipse.hyades.logging.events.cbe.CommonBaseEvent
interface, which is a Java representation of the Common Base Event specification.
For more information, see The Common Base Event model.
To send an event, use the sendEvent() methods of the Emitter interface.
When you submit an event to an emitter, the following occurs:
- The emitter calls the complete() method of the event, triggering optional
content completion. See Completing event content automatically for
more information.
- The emitter assigns a sequence number and global instance identifier to
any event that does not already have them.
- The emitter validates the event to ensure that it conforms to the Common
Base Event specification.
Note: The current Common Base Event specification
allows only one extended data element with a given name at each level of the
event containment hierarchy, but this restriction will not be included in
future versions of the specification and is not enforced by the Common Event
Infrastructure.
- If filtering is active, the emitter checks the event against the current
filter criteria to determine whether the event should be sent or discarded.
- Finally, if the event is valid and passes the filter criteria, the emitter
sends the event to the event server for persistence and distribution to event
consumers.
If the event is not valid, or if the emitter encounters a problem when
trying to send the event to the event server, an exception is thrown.
Note: If WebSphere security is enabled, the application user ID must be mapped
to the eventCreator or eventAdministrator role to send events using synchronous
EJB transmission.