创建weblogic的server和cluster

ip="10.20.0.2"
nwport=8001
wwport=9001

nwlist=[
    ('wtdsrwnw','Cluster_dsrwnw',8111),
    ('wtjscxnw','Cluster_jscxnw',8151),
    ('wtmhnw','Cluster_mhnw',8801),
    ('wttyrznw','Cluster_tyrznw',8701),
    ('wtwsjsnw','Cluster_wsjsnw',8501),
    ('wtwssbnw','Cluster_wssbnw',8101),
    ('wtwsznw','Cluster_wsznw',8401)
]

wwlist=[
    ('wtmhww','Cluster_mhww',9801),
    ('wtwsjsww','Cluster_wsjsww',9501),
    ('wtwssbww','Cluster_wssbww',9101),
    ('wtwszww','Cluster_wszww',9401)
]

def create_servers(port,serverlist):
    connect('weblogic','aaaaaa', 't3://%s:%s' %(ip,port))
    edit()
    startEdit()
    for server in serverlist:
        cd('/')
        cmo.createServer('%s' %server[0])
        cd('/Servers/%s' %server[0])
        cmo.setListenAddress('%s' %ip)
        cmo.setListenPort(server[2])

        cd('/')
        cmo.createCluster('%s' %server[1])

        cd('/Clusters/%s' %server[1])
        cmo.setClusterMessagingMode('unicast')
        cmo.setClusterBroadcastChannel('')

        cd('/Servers/%s' %server[0])
        cmo.setCluster(getMBean('/Clusters/%s' %server[1]))

    save()
    activate(block="true")
View Code

相关文章:

  • 2021-05-30
  • 2022-12-23
  • 2021-11-24
  • 2022-02-04
  • 2021-10-10
  • 2022-12-23
  • 2021-08-31
  • 2021-12-30
猜你喜欢
  • 2021-11-18
  • 2022-12-23
  • 2022-12-23
  • 2021-08-28
  • 2021-12-25
  • 2022-01-18
  • 2021-05-19
相关资源
相似解决方案