68 Problem Determination Using Self-Managing Autonomic Technology
3.6 Generating Common Base Events
The Autonomic Computing Toolkit provides two ways to generate Common Base
Events. The first is using the Common Base Event APIs provided in the
org.eclipse.hyades.logging.event.cbe package. This Java package is located in
the hlcbe101.jar file and is available from the Eclipse Web site at:
http://www.eclipse.org/tptp/index.html
It is also shipped with the Autonomic Computing Toolkit as part of the Generic
Log Adapter component.
The second way is by using the Generic Log Adapter that is suitable for existing
applications that already generate text-based log files.
Generating Common Base Events using APIs
In some cases, we want to generate Common Base Events directly. For example,
if we are writing our new application to provide the application’s tracing as
Common Base Events, we might also want an application to generate Common
Base Events and send them directly to a resource manager or log them into a
file. To accomplish this, there are APIs provided to generate and configure a
Common Base Event object that we can use for each event we need to report
(see Figure 3-2).
Figure 3-2 Generating Common Base Events directly from the application
The Common Base Event API provides the CommonBaseEvent class that
implements the interface called ICommonBaseEvent. The interface
ICommonBaseEvent is part of the package org.eclipse.hyades.logging.core. This
package is provided by the Eclipse project at:
http://www.eclipse.org/tptp/index.html
It is also provided by the Autonomic Computing Toolkit in the Generic Log
Adapter component and can be found in the <GLA_inst_dir>\lib\hlcore.jar file,
where <GLA_inst_dir> is the Generic Log Adapter component installation
directory.
Common
Base Event
Application
Common
Base
Event API
Message