이 규칙은 다음 애플리케이션 관리 메소드의 사용을 플래그 지정합니다.
-
com.ibm.websphere.management.application.AppManagement.moveModule()
-
com.ibm.websphere.management.application.AppManagementProxy.moveModule()
이러한 메소드는 WebSphere Application Server 버전 5.0에서 더 이상 사용되지 않으며
기능을 제공하지 않습니다. 다음에 대한 호출로 대체할 수 있습니다.
setModuleInfo
메소드를 사용할 수 있습니다.
예를 들어
moveModule
다음과 유사할 수 있습니다.
< 보안 범위 class = "코드">
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에서 다음을 참조하십시오.