security - get 2035 on connecting to the base queue -
I'm running a remote Java client to connect to the remote MQ queue.
-
When I type Java code to write in the alias queue, it works fine.
-
When I try
On the queue there are authorizations: browse + DSP + + Ink + Pin + Set + Settle
The Java code is as follows
Import com.ibm.mq. MQC; Import com.ibm.mq.MQEnvironment; Import com.ibm.mq.MQException; Import com.ibm.mq.MQGetMessageOptions; Import com.ibm.mq.MQMessage; Import com.ibm.mq.MQPutMessageOptions; Import com.ibm.mq.MQQueue; Import com.ibm.mq.MQQueueManager; Public class MQSniffer {} } om.ibm.mq.MQException: MQJE001: Completion code 2, com.bmm Thanks J / ** * @ Ultimate Argus * / / ** * @ Ultimate Argus * / Public Static Zero Main (string [] Args) {string hostname = "XXXX"; String channel = "channel"; String qManager = "qmgr"; MQQueueManager qMgr; MQEnvironment.hostname = hostname; MQEnvironment.channel = Channel; MQEnvironment.properties.put (MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES); Try {qMgr = New MQQueueManager (qManager); Int openOptions = MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_INQUIRE | MQC.MQOO_OUTPUT; MQQueue system_default_local_queue = qMgr.accessQueue ("PHYSICAL_QUEUE_NAME", // ***** Get an Exception on this Call ***** OpenOptS, Blank, Blank, Blank); System.out.println ("**** is current depth" + system_default_local_queue.getCurrentDepth ()); MQMessage hello_world = new MQMessage (); Hello_World.LiteUtF ("Hello World!"); MQPutMessageOptions pmo = New MQPutMessageOptions (); System_default_local_queue.put (hello_world, pmo); System.out.println ("keep the message"); System_default_local_queue.close (); // disconnect from queue manager qMgr.disconnect (); } Hold (MQException pre) {System.out.println ("An MQSeries error occurred: closing code" + ex.completionCode + "Reason code" + ex.reasonCode); Ex.printStackTrace (); } Hold (java.io.IOException pre) {System.out.println ("There was an error while writing the message buffer:" + east); }}
WMQ checks permissions on first object . So if you open a nickname, the permissions are checked on the nickname and not the base queue. If you open a base queue, the permissions are checked on the base queue and can not be from any alias which can indicate it is no hope that the ability to open the alias means the ability to open the base queue .
I have more details here: .
Comments
Post a Comment