이 규칙은 다음 애플리케이션 관리 메소드의 사용을 플래그 지정합니다.
이러한 메소드는 WebSphere Application Server 버전 5.0에서 더 이상 사용되지 않으며 기능을 제공하지 않습니다. 동일한 클래스의 setModuleInfo 메소드에 대한 호출로 대체할 수 있습니다.
예를 들어, moveModule에 대한 호출은 다음과 유사합니다.
|
appManagement.moveModule(appName, prefs, uniqueModuleURI, objectName, workspaceID);
|
동일한 인수를 여러 번 사용하면 setModuleInfo 메소드를 사용하여 코딩할 수 있습니다. 샘플은 다음과 같습니다.
|
int TARGET_COL = 2; String newTarget = null; // Get the new target from the ObjectName if (objectName.getKeyProperty("server")!=null) { newTarget = objectName.getKeyProperty("server"); } else if (objectName.getKeyProperty("cluster")!=null) { newTarget = objectName.getKeyProperty("cluster"); } if (newTarget!=null) { Vector taskVector = appManagement.getModuleInfo(appName, prefs, uniqueModuleURI, workspaceID); Iterator iter = taskVector.iterator(); // Loop through the task data while ( iter.hasNext()) { AppDeploymentTask task = (AppDeploymentTask) iter.next(); String taskName = task.getName().trim(); // Find the MapModulesToServers task if (taskName.equals("MapModulesToServers")) { String[][] taskData = task.getTaskData(); for (int i=1; i<taskData.length; i++) { // update the target taskData[i][TARGET_COL] = newTarget; } break; } } appManagement.setModuleInfo(appName, prefs, uniqueModuleURI, workspaceID, taskVector); } |
클래스에 대한 추가 정보는 Information Center에서 다음을 참조하십시오.