建立配置和設定作用配置

配置檔可以支援多重配置,不過,每一個時間點只能有一個配置在作用中。 配置檔中的所有高階元素都含有選用的 configuration 屬性。這個屬性適用於元素及其子項。 這會比較 <AgentControllerConfiguration> 元素的 activeConfiguration 屬性。 只有在配置有相同名稱或沒有指定任何 configuration 屬性時,元素及其子項才會載入到 Agent Controller 配置中。 以下是支援配置的高階元素:

在以下 serviceconfig.xml 檔的程式碼範例中,每一種不同類型的元素(主機和代理程式)都將配置屬性設為 "default"。

<Hosts configuration="default">
  <Allow host="LOCAL" />
</Hosts>
<Agent configuration="default" name="My Log Agent" type="Logging">
  <Option type="environment" name="LOG_HOME" value="%LOG_HOME%" />
</Agent>

如需 Java 側寫代理程式的相關資訊,請參閱側寫工具的文件。

相關作業
管理 Agent Controller
 



(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.