Common Base Event content generated when using the WebSphere Application Server default event factory

When no other event factory is configured for a logger, the WAS uses its default event factory for creation of Common Base Events. The content handler associated with the default event factory populates fields as follows:

Field Value Notes
CommonBaseEvent.globalInstanceId unique record id only set if CommonBaseEvent.globalInstanceId was null before completeEvent() was called
CommonBaseEvent.msg localized message based on MsgDataElement only set if CommonBaseEvent.msg was null before completeEvent() was called
CommonBaseEvent.severity set based on value of Level set on CommonBaseEventLogRecord if level >= Level.SEVERE set to 50 else if level >= Level.WARNING set to 30 default set to 10 only set if CommonBaseEvent.severity was null before completeEvent() was called
CommonBaseEvent.ComponentIdentification.component set based on value of LoggerName set on CommonBaseEventLogRecord only set if CommonBaseEvent.ComponentIdentification.component was null before completeEvent() was called
CommonBaseEvent.ComponentIdentification.componentIdType "Unknown" only set if CommonBaseEvent.ComponentIdentification.componentIdType was null before completeEvent() was called
CommonBaseEvent.ComponentIdentification.executionEnvironment OSname[OSarch]#OSversion only set if CommonBaseEvent.ComponentIdentification.executionEnvironment was null before completeEvent() was called
CommonBaseEvent.ComponentIdentification.instanceId cellName\nodeName\serverName only set if CommonBaseEvent.ComponentIdentification.instanceId was null before completeEvent() was called only set in a server environment (ignored in a client application)
CommonBaseEvent.ComponentIdentification.location hostname only set if both CommonBaseEvent.ComponentIdentification.location and CommonBaseEvent.ComponentIdentification.locationType were null before completeEvent() was called
CommonBaseEvent.ComponentIdentification.locationType "Hostname" only set if both CommonBaseEvent.ComponentIdentification.location and CommonBaseEvent.ComponentIdentification.locationType were null before completeEvent() was called
CommonBaseEvent.ComponentIdentification.processId internally generated representation of process number only set if CommonBaseEvent.ComponentIdentification.processId was null before completeEvent() was called
CommonBaseEvent.ComponentIdentification.subComponent set based on values of sourceClassName and sourceMethodName set on CommonBaseEventLogRecord sourceClassName.sourceMethodName CommonBaseEvent.ComponentIdentification.subComponent was null before completeEvent() was called and both sourceClassName and sourceMethodName were set
CommonBaseEvent.ComponentIdentification.threadId set to value of JVM thread name only set if CommonBaseEvent.ComponentIdentification.threadId was null before completeEvent() was called
CommonBaseEvent.ComponentIdentification.componentType "http://www.ibm.com/namespaces/autonomic/WebSphereApplicationServer" only set if CommonBaseEvent.ComponentIdentification.componentType was null before completeEvent() was called
CommonBaseEvent.MsgDataElement.msgLocale set based on default locale of JVM only set if CommonBaseEvent.msg was null before completeEvent() was called
CommonBaseEvent.Situation.categoryName "ReportSituation" only set if CommonBaseEvent.Situation was null before completeEvent() was called
CommonBaseEvent.Situation.situationType.type "ReportSituation" only set if CommonBaseEvent.Situation was null before completeEvent() was called
CommonBaseEvent.Situation.situationType.reasoningScope "EXTERNAL" only set if CommonBaseEvent.Situation was null before completeEvent() was called
CommonBaseEvent.Situation.situationType.reportCategory "LOG" only set if CommonBaseEvent.Situation was null before completeEvent() was called

Note that the sourceComponentIdentification is populated if no reporterComponentIdentification exists when completeEvent is invoked on the ContentHandler, otherwise the reporterComponentIdentification will be populated instead.

The same content handler that WebSphere Application Server uses for generating its events can be used in your applications. Event factory instances can be obtained as follows

EventFactory eventFactory = EventFactoryContext.getInstance().getEventFactoryHome().getEventFactory(factoryName);
where factoryName is the name of the CommonBaseEvent template you wish to use with the factory.

The factoryName can also be specified as a configuration parameter for a logger. See Configuring Common Base Events for an application for more details.


 

Related Information


Configuring Common Base Events for an application
Common Base Event factory