추적 및 디버깅
TI(트랜잭션 통합자)는 WIP(Windows Initiated Processing) 호출과 HIP(호스트 시작 처리) 호출에 대한 자세한 추적을 제공합니다. 이 추적은 추적해야 하는 내용을 설명하는 호스트 통합 추적 정의 파일(.hitd)과 함께 앱 구성 파일에서 추적을 사용하도록 설정하여 수행됩니다. hitd 파일을 통해 추적을 설정하고 해제할 수 있습니다. 앱 구성 파일을 통해서도 추적을 설정하고 해제할 수 있지만, TI 프로세스가 시작될 때만 앱 구성 파일을 읽을 수 있으므로 새 구성이 적용되려면 TI 프로세스를 다시 시작해야 합니다.
다음 지침은 추적 파일이 C:\Tracing 폴더에 있는 추적의 설정 방법을 보여줍니다. 필요한 경우 다른 폴더를 사용할 수 있습니다. TI 프로세스를 실행하는 계정에 추적 폴더에 대한 읽기/쓰기 권한이 있어야 합니다.
추적 폴더 C:\Tracing 만들기
HITD(호스트 통합 추적 정의 파일) 만들기
추적 뷰어 시작(HIS 설치 필요): 시작 - 실행 – histraceviewer
파일 메뉴에서 새 정의 파일을 선택합니다.
트랜잭션 통합자 WIP:
선택합니다.
추적 크기 및 선택: 각 구성 요소에 대해 추적 수준을 설정할 수 있습니다. 추적 수준이 상위 구성 요소에서 설정된 경우 해당 추적 수준은 하위 구성 요소에도 적용됩니다.
- ‘추적 수준’을 마우스 오른쪽 단추로 클릭하고 ‘새 수준’을 선택합니다.
- 하나 이상의 수준을 선택하고 확인을 클릭합니다.
- 모든 옵션을 선택하면 확인을 클릭한 후 “모든” 항목이 반영됩니다.
- 새 HITD 파일을 C:\Tracing 디렉터리에 TI_Trace로 저장합니다. 추적 뷰어를 닫습니다.
- ‘추적 수준’을 마우스 오른쪽 단추로 클릭하고 ‘새 수준’을 선택합니다.
추적 구성 정보로 애플리케이션 구성 파일을 업데이트합니다.
WIP(Windows 시작 처리)의 경우 TI .Net 프로젝트의 app.config 추적 구성 정보로 수정할 수 있으며 애플리케이션이 컴파일될 때 appname>.exe.config 파일에 포함<됩니다. 애플리케이션이 이미 컴파일된 <경우 appname>.exe.config 파일을 이 정보로 직접 수정할 수 있습니다.
BizTalk 내에서 BAHA(호스트 애플리케이션용 BizTalk 어댑터)를 사용하는 경우, 수정해야 하는 구성 파일은 BizTalk 애플리케이션 내 BAHA 포트에 대해 선택된 BizTalk 호스트의 BizTalk Server exe 구성 파일입니다. 구성 파일은 %BTSINSTALLPATH%에 있으며 BAHA 포트에서 사용하는 32비트 또는 64비트 호스트 프로세스인지에 따라 BTSNTSvc.exe.config 또는 BTSNTSvc64.exe.config 이름이 있습니다.
HIP(호스트 시작 처리)를 사용하는 경우 HIPService.exe.config 파일을 수정해야 합니다. 이 파일은 %SNAROOT%에 있습니다.
configSections 요소 내에 다음 섹션 문을 추가합니다. configSections 요소가 없는 경우 추가
configSections> 문은 <구성> 직후<와 시작> 섹션 바로 <앞에 있어야 합니다.
HIS 2016의 경우 configSections 요소 내에 다음 줄을 입력합니다.
<configSections> <section name="hostIntegration.tracing" type="Microsoft.HostIntegration.ConfigurationSectionHandlers.Tracing.TracingConfigurationSectionHandler, Microsoft.HostIntegration.ConfigurationSectionHandlers, Version=10.0.1000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> </configSections>
HIS 2013의 경우 configSections 요소 내에 다음 줄을 입력합니다(차이점은 버전 변경임).
<configSections> <section name="hostIntegration.tracing" type="Microsoft.HostIntegration.ConfigurationSectionHandlers.Tracing.TracingConfigurationSectionHandler, Microsoft.HostIntegration.ConfigurationSectionHandlers, Version=9.0.1000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> </configSections>
/configuration 섹션 닫기 문 바로 앞 <의 구성 섹션 끝에 있는 섹션에 다음 기본 추적 구성> 요소를 추가합니다.
<hostIntegration.tracing xmlns="http://schemas.microsoft.com/HIS/Tracing/2020"> <traceOptions traceDefinitionFile="C:\Tracing\TI_Trace.hitd" writeTraceFile="true" fileNamePreamble="TI_Tracing" traceFileFolder="C:\Tracing\" /> </hostIntegration.tracing>
애플리케이션을 실행하여 추적을 시작합니다. 애플리케이션 구성 파일이 변경된 경우 추적을 사용하려면 TI 런타임에서 사용하는 프로세스를 다시 시작해야 합니다. BizTalk를 사용하는 경우 호스트 인스턴스를 다시 시작해야 합니다. IIS를 사용하는 경우 웹 사이트를 다시 시작해야 합니다. .Net exe를 실행하는 경우 해당 프로그램을 다시 시작해야 합니다.
C:\Tracing 폴더에서 하나 이상의 HITF(호스트 통합 추적 파일) 파일을 확인합니다. 파일의 이름은 TI_Tracing_<process id number>_<date 및 time.hitf>입니다. 예를 들면 다음과 같습니다.
TI_TRACING_6076_AUG_29_2017_13_00_52_421.HITF
HITF 파일을 두 번 클릭하여 추적 뷰어에서 열고 추적된 내용을 검사합니다. TI 프로세스가 여전히 실행 중인 경우 일부 추적 정보가 버퍼에 있을 수 있으며, 애플리케이션을 종료하거나 애플리케이션 내에서 다른 TI 호출을 실행하면 버퍼를 플러시하여 첫 번째 TI 호출의 전체 추적을 확인합니다.
TBGen invoke entered for Class: BankingCicsElmLink.Accounts Non-Persistent Attempting to acquire library reader and load HIS object assembly Method: GetBalance Using configured RE for this object Remote Environment: ELM Link RE Aggregate Converter: Microsoft.HostIntegration.TI.AggregateConverter, Microsoft.HostIntegration.TI.AggregateConverter, Version=10.0.1000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Primitive Converter: Microsoft.HostIntegration.Common.BasePrimitiveConverter, Microsoft.HostIntegration.Common.BasePrimitiveConverter, Version=10.0.1000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Transport: Microsoft.HostIntegration.TI.ELMTransport, Microsoft.HostIntegration.TI.ELMTransport, Version=10.0.1000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 State Machine: Microsoft.HostIntegration.TI.GenericLinkStateMachine, Microsoft.HostIntegration.TI.GenericLinkStateMachine, Version=10.0.1000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Invoking the state machine Generic Link state machine entered for method: GetBalance ELM Transport Initialized, Link: True, Codepage: 37 Header length: 35 Header Length: 35, Trailer Length: 0 Non-Persistent
추적 끄기
- 추적 뷰어에서 TI_Trace.hitd 파일을 열고 추적 수준을 제거합니다. hitd 파일이 저장되면 추적이 동적으로 해제됩니다. TI 애플리케이션을 다시 시작할 필요가 없습니다.
다양한 시나리오에 대한 샘플 애플리케이션 구성 파일
- .Net WIP 애플리케이션 프로그램에 대한 샘플
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="hostIntegration.ti.wip" type="Microsoft.HostIntegration.ConfigurationSectionHandlers.Ti.Wip.WipConfigurationSectionHandler, Microsoft.HostIntegration.ConfigurationSectionHandlers, Version=10.0.1000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<section name="hostIntegration.tracing" type="Microsoft.HostIntegration.ConfigurationSectionHandlers.Tracing.TracingConfigurationSectionHandler, Microsoft.HostIntegration.ConfigurationSectionHandlers, Version=10.0.1000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</configSections>
<hostIntegration.ti.wip xmlns="http://schemas.microsoft.com/his/Config/TiWip/2020">
<readOrder appConfig="first" cache="unused" registry="unused"/>
<remoteEnvironments>
<remoteEnvironment isDefault="true" name="ELM Link RE" timeout="5" codePage="37">
<elmLink ipAddress="localhost" ports="7511" requestHeaderFormat="Microsoft"/>
</remoteEnvironment>
</remoteEnvironments>
</hostIntegration.ti.wip>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/>
</startup>
<hostIntegration.tracing xmlns="http://schemas.microsoft.com/his/Tracing/2020">
<traceOptions traceDefinitionFile="C:\Tracing\TI_Trace.hitd"
writeTraceFile="true"
fileNamePreamble="TI_Tracing"
traceFileFolder="C:\Tracing\" />
</hostIntegration.tracing>
</configuration>
- 호스트 애플리케이션용 BizTalk 어댑터를 사용하는 BizTalk 애플리케이션 샘플 - %BTSINSTALLPATH%\BTSNTSvc.exe.config 또는 %BTSINSTALLPATH%\BTSNTSvc64.exe.config 파일:
Here is my text
- TI 런타임을 사용하는 IIS 애플리케이션에 대한 샘플
Here is my text
- TI HIP(호스트 시작 처리) 애플리케이션에 대한 샘플 - %SNAROOT%\HIPService.exe.config 파일:
Here is my text
참고 항목
SNA 추적 유틸리티 - TI 개체가 Host Integration Server 게이트웨이를 통해 APPC를 사용하는 경우 SNA 추적 유틸리티가 도움이 될 수 있습니다. 이 유틸리티는 호스트를 오가는 APPC 트래픽을 캡처합니다. TI 개체가 호스트 시스템과 TCP/IP를 통해 직접 통신하는 경우 이 유틸리티는 도움이 되지 않습니다.