기본 이벤트 팩토리로 공통 기본 이벤트 컨텐츠 생성

기본 공통 기본 이벤트 컨텐츠 핸들러는 WebSphere® Application Server 런타임 정보로 공통 기본 이벤트를 채웁니다. 이 컨텐츠 핸들러는 공통 기본 이벤트 템플리트를 사용하여 공통 기본 이벤트를 채울 수도 있습니다.

다음 예의 경우처럼 서버가 CommonBaseEventLogRecords를 작성하면 기본 컨텐츠 핸들러가 사용됩니다.
// Get a named logger
Logger logger = Logger.getLogger("com.ibm.someLogger");
// Log to the logger -- implicitly the default content handler
// will be associated with the CommonBaseEvent contained in the
// CommonBaseEventLogRecord. 
logger.warning("MSG_KEY_001");
이전 예에서 공통 기본 이벤트 템플리트를 지정하려면, Logger.properties 파일은 com.ibm.someLogger에 대한 eventfactory 항목으로 제공되어야 합니다. 유효한 템플리트가 classpath에 있는 경우, 공통 기본 이벤트를 채우면 로거의 이벤트 팩토리는 WebSphere Application Server 런타임 정보 외에 지정된 템플리트의 컨텐츠를 사용합니다. 템플리트가 classpath에 없거나 유효하지 않은 경우, 공통 기본 이벤트를 채우면 로거의 이벤트 팩토리는 WebSphere Application Server 런타임 정보만 사용합니다.
또한 기본 컨텐츠 핸들러는 글로벌 이벤트 팩토리 컨텍스트에서 제공된 이벤트 팩토리 홈과 연관됩니다. WebSphere Application Server에서 생성된 컨텐츠와 유사한 컨텐츠로 채워야 하는 공통 기본 이벤트 작성에 편리합니다.
// Request the event factory from the global event factory home
EventFactory eventFactory =
   EventFactoryContext.getInstance().getEventFactoryHome().getEventFactory(templateName);

// Create a Common Base Event
CommonBaseEvent commonBaseEvent = eventFactory.createCommonBaseEvent();

// Complete the Common Base Event using content from the template (if specified previously)
// and the server runtime information.
eventFactory.getContentHandler().completeEvent(commonBaseEvent);
이전 예에서, templateName으로 참조된 템플리트가 classpath에 있고 템플리트가 유효한 경우, 공통 기본 이벤트로 채우면 이벤트 팩토리 홈은 템플리트의 컨텐츠를 WebSphere Application Server 런타임 정보와 결합하는 컨텐츠 핸들러를 사용하는 이벤트 팩토리를 리턴합니다. 템플리트가 classpath에 없거나 유효하지 않은 경우, 공통 기본 이벤트를 채우면 이벤트 팩토리 홈은 WebSphere Application Server 런타임 정보만 사용하는 컨텐츠 핸들러를 사용하는 이벤트 팩토리를 리턴합니다.

기본 컨텐츠 핸들러는 다음 런타임 정보로 서버 환경의 공통 기본 이벤트를 채웁니다.

CommonBaseEvent.globalInstanceId
값: unique_record_id

completeEvent 메소드를 호출하기 전에 CommonBaseEvent.globalInstanceId 값이 널인 경우에만 이 값을 설정합니다.

CommonBaseEvent.msg
값: MsgDataElement 요소를 기반으로 하는 로컬화된 메시지.

completeEvent 메소드를 호출하기 전에 CommonBaseEvent.msg 메시지가 널인 경우에만 이 값을 설정합니다.

CommonBaseEvent.severity
값: CommonBaseEventLogRecord 레코드에서 설정된 레벨의 값을 기반으로 설정합니다. 레벨 >= Level.SEVERE이면 50으로 설정합니다. 레벨 >= Level.WARNING이면 30으로 설정합니다. 기본값은 10으로 설정됩니다.

completeEvent 메소드를 호출하기 전에 CommonBaseEvent.severity 값이 널인 경우에만 이 값을 설정합니다.

CommonBaseEvent.ComponentIdentification.component
값: CommonBaseEventLogRecord 레코드에서 설정된 LoggerName 값을 기반으로 설정합니다.

completeEvent 메소드를 호출하기 전에 CommonBaseEvent.ComponentIdentification.component가 널인 경우에만 이 값을 설정합니다.

CommonBaseEvent.ComponentIdentification.componentIdType
값: "Unknown"

completeEvent 메소드를 호출하기 전에 CommonBaseEvent.ComponentIdentification.componentIdType 값이 널인 경우에만 이 값을 설정합니다.

CommonBaseEvent.ComponentIdentification.executionEnvironment
값: OSname[OSarch]#OSversion

completeEvent 메소드를 호출하기 전에 CommonBaseEvent.ComponentIdentification.executionEnvironment 값이 널인 경우에만 이 값을 설정합니다.

CommonBaseEvent.ComponentIdentification.instanceId
값: cellName\nodeName\serverName

completeEvent 메소드를 호출하기 전에 CommonBaseEvent.ComponentIdentification.instanceId 값이 널인 경우에만 이 값을 설정합니다. 이 값이 클라이언트 애플리케이션에서 무시되기 때문에 서버 환경에서만 설정합니다.

CommonBaseEvent.ComponentIdentification.location
값: 호스트 이름

completeEvent 메소드를 호출하기 전에 CommonBaseEvent.ComponentIdentification.location 및 CommonBaseEvent.ComponentIdentification.locationType 값 모두가 널인 경우에만 이 값을 설정합니다.

CommonBaseEvent.ComponentIdentification.locationType
값: 호스트 이름

completeEvent 메소드를 호출하기 전에 CommonBaseEvent.ComponentIdentification.location 및 CommonBaseEvent.ComponentIdentification.locationType 값 모두가 널인 경우에만 이 값을 설정합니다.

CommonBaseEvent.ComponentIdentification.processId
값: 내부적으로 생성된 프로세스 수 표시.

completeEvent 메소드를 호출하기 전에 CommonBaseEvent.ComponentIdentification.processId 값이 널인 경우에만 이 값을 설정합니다.

CommonBaseEvent.ComponentIdentification.subComponent
값: CommonBaseEventLogRecord 레코드의 sourceClassName.sourceMethodName 이름에서 설정된 sourceClassName 및 sourceMethodName 이름의 값을 기반으로 설정됩니다.

completeEvent 메소드가 호출되고 sourceClassName 및 sourceMethodName 이름 모두가 설정되기 전에 CommonBaseEvent.ComponentIdentification.subComponent 값이 널인 경우에만 이 값을 설정합니다.

CommonBaseEvent.ComponentIdentification.threadId
값: JVM(Java™ Virtual Machine) 스레드 이름의 값으로 설정합니다.

completeEvent 값이 호출되기 전에 CommonBaseEvent.ComponentIdentification.threadId 값이 널인 경우에만 이 값을 설정합니다.

CommonBaseEvent.ComponentIdentification.componentType
값: http://www.ibm.com/namespaces/autonomic/WebSphereApplicationServer

completeEvent 메소드를 호출하기 전에 CommonBaseEvent.ComponentIdentification.componentType 값이 널인 경우에만 이 값을 설정합니다.

CommonBaseEvent.MsgDataElement.msgLocale
값: JVM의 기본 로케일을 기반으로 설정합니다.

completeEvent 메소드를 호출하기 전에 CommonBaseEvent.msg 값이 널인 경우에만 이 값을 설정합니다.

CommonBaseEvent.Situation.categoryName
값: ReportSituation

completeEvent 메소드를 호출하기 전에 CommonBaseEvent.Situation 값이 널인 경우에만 이 값을 설정합니다.

CommonBaseEvent.Situation.situationType.type
값: ReportSituation

completeEvent 메소드를 호출하기 전에 CommonBaseEvent.Situation 값이 널인 경우에만 이 값을 설정합니다.

CommonBaseEvent.Situation.situationType.reasoningScope
값: EXTERNAL

completeEvent 메소드를 호출하기 전에 CommonBaseEvent.Situation 값이 널인 경우에만 이 값을 설정합니다.

CommonBaseEvent.Situation.situationType.reportCategory
값: LOG

completeEvent 메소드를 호출하기 전에 CommonBaseEvent.Situation 값이 널인 경우에만 이 값을 설정합니다.

completeEvent 메소드가 컨텐츠 핸들러에서 호출되는 경우 reporterComponentIdentification ID가 존재하지 않으면 sourceComponentIdentification 값이 채워집니다. 그렇지 않으면, reporterComponentIdentification ID가 대신 채워집니다.


주제 유형을 표시하는 아이콘 참조 주제



시간소인 아이콘 마지막 업데이트 날짜: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=rtrb_cbegencontent
파일 이름:rtrb_cbegencontent.html