java - Updating deprecated WAS-MQ code -


i working on migration of 6.1 based application 7.0 found below 2 statements

com.ibm.mq.mqenvironment.securityexit = null; // 1 

and

mqqueueconnectionfactory factory = new mqqueueconnectionfactory(); factory.settransporttype(jmsc.mqjms_tp_client_mq_tcpip); // 2 
  1. on line# 1 securityexit deprecated doc says:

    the security exit used when connecting queue manager. allows customise security flows occur when attempt made connect queue manager. if want provide own security exit, define class implements mqsecurityexit interface , assign securityexit instance of class. if set field null no security exit called.

    what understand com.ibm.mq.mqsecurityexit interface needs implemented. assign securityexit instance of class mean ?

  2. on line# 2 jmsc deprecated. doc says:

    this parameter can passed mqconnectionfactory.settransporttype(int) indicate application should connect queue manager in client tcp/ip mode.

    also interface doc says:

    use constants defined in classes in com.ibm.mq.constants package instead

    the doc com.ibm.mq.constants of not help.

any in replacing deprecated statements appreciated.

it means need create instance of implementation of mqsecurityexit class , set security exit property. this

   // in mysecurityexit.java    class mysecurityexit implements mqsecurityexit     {        // must provide implementation of securityexit method        public byte[] securityexit(mqchannelexit       channelexitparms,                                   mqchanneldefinition channeldefinition,                                   byte[]              agentbuffer)        {            // exit code goes here...        }    }     // in main program...    mqenvironment.securityexit = new mysecurityexit();    ...    // other initialisation    mqqueuemanager qmgr        = new mqqueuemanager(""); 

the settransporttype method determines how application connects wmq queue manager, whether application , queue manager communicate on shared memory or socket or http etc. possible values method defined here


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -