依預設,會啟用記載功能,且會將連接器在其作業期間所發現的所有錯誤,輸出到 Tomcat_directory/logs 目錄下的 connector.log 檔中。唯一的例外是 blueprintLogger,它會在相同目錄之下,寫入它自己的日誌 blueprint.log 中。
追蹤會提供連接器作業的其他非錯誤相關資訊,以供進行除錯。依預設會停用追蹤。您可以利用 JMX 主控台來啟用它。如果已適當配置伺服器,任何 JMX 主控台都可以用來啟用追蹤。這些是 jconsole 的指示,它是 Java™ SDK 所提供的 JMX 主控台。
Tomcat Application Server 必須配置為接受來自 JMX 主控台的連線。
Dcom.sun.management.jmxremoteDcom.sun.management.jmxremote.port=9004Dcom.sun.management.jmxremote.authenticate=falseDcom.sun.management.jmxremote.ssl=false
第一行會啟用 JMX 遠端登入。第二行指定用來接聽送入的 JMX 主控台要求的埠。下兩行則停用鑑別和加密,這在正式作業環境中可能並不恰當。
如需更進階的 JMX 配置,請參閱位於 http://Tomcat.apache.org/tomcat-5.5-doc/monitoring.html#Enabling_JMX_Remote 的 Tomcat 說明文件
不需對 WebSphere® Application Server JVM 內容進行任何變更,即可利用 jconsole 來連接。 不過,您必須建立啟動 Script 和內容檔。啟動 Script 範例如下:
@echo off
set WAS_HOME=C:\PROGRA~2\IBM\SDP\runtimes\base_v7
set HOST=localhost:2809
set PROPS_DIR=c:\temp
:: properties
set PROPS=
set PROPS=%PROPS% -Dcom.ibm.CORBA.ConfigURL=file:/%PROPS_DIR%/sas.client.props
set PROPS=%PROPS% -Djava.naming.provider.url=corbaname:iiop:%HOST%
:: classpath
set CLASSPATH=
set CLASSPATH=%CLASSPATH%;%WAS_HOME%\java\lib\tools.jar
set CLASSPATH=%CLASSPATH%;%WAS_HOME%\runtimes\com.ibm.ws.admin.client_7.0.0.jar
set CLASSPATH=%CLASSPATH%;%WAS_HOME%\runtimes\com.ibm.ws.ejb.thinclient_7.0.0.jar
set CLASSPATH=%CLASSPATH%;%WAS_HOME%\runtimes\com.ibm.ws.orb_7.0.0.jar
set CLASSPATH=%CLASSPATH%;%WAS_HOME%\java\lib\jconsole.jar
:: start jconsole using was jdk
start %WAS_HOME%\java\bin\javaw.exe -classpath %CLASSPATH% %PROPS%
sun.tools.jconsole.JConsole service:jmx:iiop://%HOST%/jndi/JMXConnector
範例 Script 是寫成 Windows .bat Script。您需要將 WAS_HOME 的值變更為 WebSphere Application Server 安裝目錄的 8.3 路徑,並將 PROPS_DIR 變更為含有下列內容檔且名稱為 sas.client.props 的目錄:
com.ibm.CORBA.securityEnabled=true
com.ibm.CORBA.authenticationTarget=BasicAuth
com.ibm.CORBA.authenticationRetryEnabled=true
com.ibm.CORBA.authenticationRetryCount=3
com.ibm.CORBA.validateBasicAuth=true
com.ibm.CORBA.securityServerHost=
com.ibm.CORBA.securityServerPort=
com.ibm.CORBA.loginTimeout=300
com.ibm.CORBA.loginSource=prompt
com.ibm.CORBA.loginUserid=
com.ibm.CORBA.loginPassword=
com.ibm.CORBA.krb5ConfigFile=
com.ibm.CORBA.krb5CcacheFile=
com.ibm.CSI.performStateful=true
com.ibm.CSI.performClientAuthenticationRequired=false
com.ibm.CSI.performClientAuthenticationSupported=true
# 從這裡開始,全部是 false
com.ibm.CSI.performTLClientAuthenticationRequired=false
com.ibm.CSI.performTLClientAuthenticationSupported=false
com.ibm.CSI.performTransportAssocSSLTLSRequired=false
com.ibm.CSI.performTransportAssocSSLTLSSupported=false
com.ibm.CSI.performMessageIntegrityRequired=false
com.ibm.CSI.performMessageIntegritySupported=false
com.ibm.CSI.performMessageConfidentialityRequired=false
com.ibm.CSI.performMessageConfidentialitySupported=false
# 不需要
#com.ibm.ssl.alias=DefaultSSLSettings
com.ibm.CORBA.requestTimeout=180
依預設,追蹤器會設定為 INFO 層次,這在 log4j 中是低優先順序。INFO 追蹤層次表示連接器內的追蹤陳述式不會輸出到 connectorTrace.log 檔中。
使用多種追蹤器的組合通常能得出最佳結果。在調查問題時,請確定已啟用連接器的追蹤器。在調查 Rational ClearQuest 和 Service Desk 之間的問題時,請啟用 cq、sdAdapter 和 serviceDesk 追蹤器。在執行藍圖推播時,除了藍圖追蹤器,也請啟用 Rational 伺服器(如 rqm 和 reqPro)。