IBM WAS wsadmin更新群集应用程序

时间:2017-12-13 11:24:35

标签: websphere jython

我编写了一个用于更新IBM WAS应用程序服务器的jython脚本

<script>
    var crmMain = angular.module('crmApp', ['ngRoute','ngMaterial']);
    crmMain.controller('customerDetailController',function customerDetailController($scope, $http, customerDetailFactory,$window) {
        $scope.client = [];

        $scope.init = function () {
            $scope.getCustomerData();
        };

        $scope.getCustomerData = function () {
            customerDetailFactory.getCustomerDetailData().then(function 
(response) {
                $scope.client = response.data;
            });
        };

        $scope.getCustDetail = function (Name) {
            var custDetail = [];
            custDetail = customerDetailFactory.getCustomerDetailData(Name).then(function (response) {
            alert(response.data.cust_Name);
            return response.data;
        });
        return custDetail;
    };
    $scope.init();

});

crmMain.factory('customerDetailFactory', ['$http', function ($http) {
var factory = {};
var url = 'phpFile/customerDetail.php';

factory.getCustomerDetailData = function (Name) {

    return $http({
        method: 'POST',
        url: url,
        data: {
            'functionName': 'clientDetailPage',
            'customerName': Name
        }
    });
};
return factory;

}]);
</script>

其中cellName,nodeName和serverName是来自命令行的arg。

问题是:如何使用Jython和AdminApp.update命令更新集群?服务器和集群更新之间的区别是什么。

1 个答案:

答案 0 :(得分:0)

如果您只更新应用程序的内容,则不必重新提供目标

一般情况下,AdminApp.update()会合并&#34;绑定&#34;使用-operation update时。

所以你可能需要这样的东西:

AdminApp.update("MyEAR", "app", ["-appname", "MyEAR",
                "-contents", "./MyEAR.ear",
                "-operation", "update"])
AdminConfig.save()

请注意,在同一链接中,如果您需要不同的合并行为,还有其他一些选项,例如update.ignore.newupdate.ignore.old