Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MQ Queue Properties using Java

Status
Not open for further replies.

antony10

Technical User
Dec 21, 2005
3
DE
Hi,

I have Some problem when i want to get the Queue Properties by using some java Program using MQ (com.ibm.mq.jar).I am getting

MQJE001: An MQException occurred: Completion Code 2, Reason 2058
MQJE036: Queue manager rejected connection attempt.Thanks in advance for help
 
2058 means you have the queue manager name incorrect....remember that case is important.
 
Hi,
Thanks for the reply.The Program i wrote is a multiple Program Which gives (Q Mgr Details,Channel Details ,and i want to get the Queue Details it is giving error.
System.out.println("Coming for Getting the Queue Details");
try{
int openOptions = MQC.MQOO_INPUT_SHARED |MQC.MQOO_FAIL_IF_QUIESCING | MQC.MQOO_SAVE_ALL_CONTEXT ;

int InhibitGet;

String dType="Nothing";
String qType="Nothing";
String iPut="Nothing";
String iGet="Nothing";
String share="Nothing";
String tControl = "Nothing";
String tType = "Nothing";
int qTypeNum=0;
// GregorianCalendar DateTime;
String Date;
String Time;

// MQQueueManager myQM = new MQQueueManager("STAR_SF_QM1");
// System.out.println("CONN="+myQM.isConnected());
// MQQueue queue = myQM.accessQueue("MUA_GW2SF_RES",openOptions,null,null,null);
// System.out.println("Connected to Queue");
// System.out.println("Curr Depth="+queue.getCurrentDepth());

com.ibm.mqbind.MQQueueManager queueManager = new com.ibm.mqbind.MQQueueManager("STAR_SF_QM1");
MQQueue bindqueue = queueManager.accessQueue("MUA_2SF_REQ",openOptions,"STAR_SF_QM1",null,null);
System.out.println(bindqueue.getCurrentDepth());
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top