An event consumer can synchronously retrieve historical events
from the persistent data store by querying the event server.
Why and when to perform this task
The persistent data store is implemented as a separate component
called a data store plug-in. The Common Event Infrastructure includes
a default data store plug-in, which supports event queries based on a subset
of XPath syntax. If you want to use a different data store, you can implement
your own data store plug-in.
To query the event server, use the event
access interface.
Steps for this task
- Create an event access bean.
This bean is a Java
2 Platform, Enterprise Edition (J2EE) stateless session bean. The bean interface
provides methods for querying the event server. An event consumer uses an
instance of the event access bean for all synchronous event queries.
- Query events.
You can query events in the following
ways:
Specify a global instance identifier to retrieve a specific single
event.
Specify an event group to retrieve events associated with that event
group. You can optionally refine the query by specifying an additional event
selector. This action retrieves only those events that match both the event
group and the event selector.
Specify a known event and an association type to retrieve events that
are associated with the known event.
Query and purge events.