UDDI 노드 구성 특성의 관리

구성 특성을 설정하여 UDDI 노드 런타임 동작을 관리하기 위해 UDDI 레지스트리 관리 인터페이스를 사용할 수 있습니다.

UDDI 노드 런타임 동작은 여러 구성 특성의 설정에 의해 영향을 받습니다. UddiNode MBean에서는 구성 특성을 검사하고 업데이트하도록 다음 조작을 제공합니다.
  • getProperties
  • getProperty
  • updateProperty
  • updateProperties

WebSphere® Application Server에 대한 샘플에서 UDDI 레지스트리 샘플의 ManagePropertiesSample 클래스는 이러한 조작을 보여줍니다.

getProperties
ConfigurationProperty 오브젝트로 모든 구성 특성의 콜렉션을 리턴합니다.
  1. getProperties 조작을 호출하십시오.
    List properties = uddiNode.getProperties();
  2. ConfigurationProperty 오브젝트에 각 콜렉션 멤버를 캐스트하십시오.
     if (properties != null) {
        for (Iterator iter = properties.iterator(); iter.hasNext();) {
           ConfigurationProperty property = (ConfigurationProperty) iter.next();
           System.out.println(property);
        }
     }
ConfigurationProperty 오브젝트가 있을 때, ID, 값 및 유형과 같은 속성을 조사할 수 있습니다. 특성이 읽기 전용이거나 초기화에 필요한지 여부를 판별할 수 있고 이름 및 설명 메시지 키를 가져올 수 있습니다. 예를 들어, toString 메소드를 호출하면 다음 예제와 유사한 결과가 리턴됩니다.
      ConfigurationProperty
      id: operatorNodeIDValue
      nameKey: property.name.operatorNodeIDValue
      descriptionKey: property.desc.operatorNodeIDValue
      type: java.lang.String
      value: uddi:capnscarlet:capnscarlet:server1:default
      unitsKey: 
      readOnly: true
      required: true
      usingMessageKeys: false
      validValues: none

샘플 패키지에서 messages.properties 자원을 사용하여 지정된 로케일에 대한 설명 및 변환된 이름을 검색하기 위해 nameKey 및 descriptionKey 값을 사용할 수 있습니다.

getProperty
지정된 ID로 ConfigurationProperty 오브젝트를 리턴합니다. 사용 가능한 특성 ID는 해당 특성 목적에 대한 설명으로 PropertyConstants에 지정됩니다.
  1. getProperty 조작을 호출하십시오.
    ConfigurationProperty property = 
    uddiNode.getProperty(PropertyConstants.DATABASE_MAX_RESULT_COUNT);
  2. 특성 값을 검색하기 위해 오브젝트를 리턴하는 getValue 메소드를 사용할 수 있지만, 이 경우 특성은 정수 유형입니다. 따라서, 편의성 메소드 getIntegerValue를 사용하여 값을 검색하는 것이 용이합니다.
    int maxResults = property.getIntegerValue();
updateProperty
지정된 ID를 가진 ConfigurationProperty 오브젝트의 값을 업데이트합니다. 사용 가능한 특성 ID는 해당 특성 목적에 대한 설명으로 PropertyConstants에 지정됩니다. ConfigurationProperty 오브젝트에서 Setter 메소드를 호출할 수 있더라도, UDDI 노드에서 업데이트되는 유일한 값은 값입니다. 특성을 업데이트하려면 일반적으로 다음 단계를 사용하십시오.
  1. ConfigurationProperty 오브젝트를 작성하고 해당 ID를 설정하십시오.
    ConfigurationProperty defaultLanguage = new ConfigurationProperty();
    defaultLanguage.setId(PropertyConstants.DEFAULT_LANGUAGE);
  2. 값을 설정하십시오.
    defaultLanguage.setStringValue("ja");
  3. updateProperty 조작을 호출하십시오.
    uddiNode.updateProperty(defaultLanguage);
updateProperties
단일 요청에서 여러 ConfigurationProperty 오브젝트를 업데이트합니다. updateProperty 조작과 동일한 방식으로 ConfigurationProperty 오브젝트를 설정하십시오.
  1. 목록에 업데이트된 정책을 추가하십시오.
    List updatedProperties = new ArrayList();
                    
    updatedProperties.add(updatedProperty1);
    updatedProperties.add(updatedProperty2);
  2. updateProperties 조작을 호출하십시오.
    uddiNode.updateProperties(updatedProperties);

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



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