我正在将基于 WAS 6.1 的应用程序迁移到 WAS 7.0 我发现以下两个语句
com.ibm.mq.MQEnvironment.securityExit = null; // 1
和
MQQueueConnectionFactory factory = new MQQueueConnectionFactory();
factory.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP); // 2
在第 1 行
securityExit已弃用,文档说:The security exit used when connecting to a queue manager. It allows you to customise the security flows that occur when an attempt is made to connect to a queue manager. If you want to provide your own security exit, define a class that implements the MQSecurityExit interface and assign securityExit to an instance of that class. If you set this field to null no security exit is called.我从中了解到的是
com.ibm.mq.MQSecurityExit需要实现接口。将 securityExit 分配给该类的实例是什么意思?第 2 行
JMSC已弃用。医生说:This parameter can be passed to MQConnectionFactory.setTransportType(int) to indicate that the application should connect to the queue manager in client TCP/IP mode.对于界面,文档还说:
Use the constants defined in the classes in the com.ibm.mq.constants package insteadcom.ibm.mq.constants的文档没有多大帮助。
感谢您在替换已弃用的语句方面的任何帮助。