跳到主要內容

發表文章

目前顯示的是 7月, 2009的文章

MQ PCF API簡介

可以透過該API管理QMGR MQAgent.java--- package cgw.mq.admin; import cgw.mq.bean.MQManageBean; import com.ibm.mq.MQEnvironment; import com.ibm.mq.MQException; import com.ibm.mq.pcf.PCFMessageAgent; public class MQAgent { private PCFMessageAgent agent; public MQAgent(MQManageBean bean ,int ccsid){ //MQEnvironment.CCSID = ccsid; try { PCFMessageAgent agent = new PCFMessageAgent(bean.getMqm_ip(),bean.getMqm_port(),bean.getAdmin_channel()); } catch (MQException e) { e.printStackTrace(); } agent.setCharacterSet(ccsid); } public PCFMessageAgent getAgent() { return agent; } public void close() throws MQException{ agent.disconnect(); } } MQManageBean.java--- package cgw.mq.bean; public class MQManageBean { private String mqm_ip; private int mqm_port; private String admin_channel; public String getAdmin_channel() { return admin_channel; } public void setAdmin_channel(String admin_channel) { this.admin_channel = admin_channel; } public String getMqm_ip() {