【发布时间】:2022-10-05 16:18:27
【问题描述】:
我已经在 websphere 的队列连接工厂中配置了队列管理器 当前设置未启用 SSL。
我想启用这两件事
- 使用 SSL 保护与 IBM MQ 的通信
- 指定要使用的 SSI
需要您的帮助才能通过 jython 编辑这些内容
我已经在 websphere 的队列连接工厂中配置了队列管理器 当前设置未启用 SSL。
我想启用这两件事
需要您的帮助才能通过 jython 编辑这些内容
使用modifyWMQConnectionFactory 命令执行此任务。
请参见下面的示例:
#Set QCF Name
qcfName='MYQCF'
#Set custom SSL config name
sslConfig='CUSTOMSSLSettings'
#Get the list of all QCF's in the environment
qcfList=AdminConfig.list('MQQueueConnectionFactory').splitlines()
#You can futher refine this command and restrict the query to a specific resource scope
#eg: qcfList=AdminConfig.list('MQQueueConnectionFactory', clusterId).splitlines()
#Iterate the list and update the config for MYQCF
for qcf in qcfList:
if qcfName == AdminConfig.showAttribute(qcf, 'name'):
print 'Enable SSL config for QCF: '+qcfName+' and use '+sslConfig+' SSL configuration'
AdminTask.modifyWMQConnectionFactory(qcf, '[-sslType SPECIFIC -sslConfiguration '+sslConfig+']')
else:
print 'Skip SSL config update for QCF: '+AdminConfig.showAttribute(qcf, 'name')
#save the changes
AdminConfig.save()
【讨论】: