哪位 大虾 给我10分 我等会还他 !!50分!!

huitongrr 2008-03-25 03:08:12
我要体温 少10分啊 给我10分 20 分的等会 我提问 你门去接分 我给你门多多!!
...全文
97 16 打赏 收藏 转发到动态 举报
写回复
用AI写文章
16 条回复
切换为时间正序
请发表友善的回复…
发表回复
huitongrr 2008-03-25
  • 打赏
  • 举报
回复
十分感谢您 等我给揭贴 给你分啊 呵呵 !!
huitongrr 2008-03-25
  • 打赏
  • 举报
回复
呵呵 官方的我看了, 英语太多 我看的很费劲! 我不是做IBM对日外包 我是给 中国移动做的工程! 奥运网管项目 !!!
ee4456 2008-03-25
  • 打赏
  • 举报
回复
你想要JMS TOPIC连接方式的例子的话建议你去找JMS管方文档API,应该可以找到吧
ee4456 2008-03-25
  • 打赏
  • 举报
回复
呵呵,不好意思了,这个问题没碰到过,你是做IBM对日外包的??这问题为什么不交给他们上边去解决。
huitongrr 2008-03-25
  • 打赏
  • 举报
回复
,btw ??? 什么意思啊 哈哈 我都被憋疯了!
huitongrr 2008-03-25
  • 打赏
  • 举报
回复
好!

package com;

import com.ibm.mq.*;

/*
* 成功的访问mq 的java 类
*/
public class FirstMqTest {
// public static void main(String[] args[]){
// FirstMqTest first = new FirstMqTest();
// first.test();
// }
public static void main(String args[]){
FirstMqTest first = new FirstMqTest();
first.test();

}
public void test(){
String qManager = "P_TD_QM"; //QueueManager name
String qName = "DOWN_FROM_SA_P";//Queue Name
try {
//configure connection parameters
MQEnvironment.hostname="10.64.8.54";//MQ Server name or IP
MQEnvironment.port=1415;//listenr port
MQEnvironment.channel="CH1";//Server-Connection Channel
MQEnvironment.CCSID =819;
// Create a connection to the QueueManager
System.out.println("Connecting to queue manager: "+qManager);
MQQueueManager qMgr = new MQQueueManager(qManager);
// Set up the options on the queue we wish to open
int openOptions = MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_OUTPUT;
// Now specify the queue that we wish to open and the open options
System.out.println("Accessing queue: "+qName);
MQQueue queue = qMgr.accessQueue(qName, openOptions);
// Define a simple WebSphere MQ Message ...
MQMessage msg = new MQMessage();
// ... and write some text in UTF8 format
msg.writeUTF("Hello, World!");
// Specify the default put message options
MQPutMessageOptions pmo = new MQPutMessageOptions();
// Put the message to the queue
System.out.println("Sending a message...");

/*
* 在此测试一下 mq 的传输次列
*
*/
for(int j=0;j< 5;j++){
String str ="test11111111111";
str = str+j;
msg.writeUTF(str);
queue.put(msg, pmo);
}
queue.put(msg, pmo);
// Now get the message back again. First define a WebSphere MQ message
// to receive the data
MQMessage rcvMessage = new MQMessage();

// Specify default get message options
MQGetMessageOptions gmo = new MQGetMessageOptions();
// Get the message off the queue.
System.out.println("...and getting the message back again");
queue.get(rcvMessage, gmo);
// And display the message text...
String msgText = rcvMessage.readUTF();
System.out.println("The message is: " + msgText);
// Close the queue
System.out.println("Closing the queue");
queue.close();
// Disconnect from the QueueManager
System.out.println("Disconnecting from the Queue Manager");
qMgr.disconnect();
System.out.println("Done!");
}
catch (MQException ex) {
System.out.println("A WebSphere MQ Error occured : Completion Code "
+ ex.completionCode + " Reason Code " + ex.reasonCode);
}
catch (java.io.IOException ex) {
System.out.println("An IOException occured whilst writing to the message buffer: "
+ ex);
}

}
}

--------------------------------------------------------------------------------------------------------------
以上是我以前写程序
但是 我现在发现 我门需要是用TOPIC连接方式, 而我上面的是用QUEUE连接方式, 所以 想请问一下 我需要怎么做才能用TOPIC连接 方式, 在网上都找了 N天了都没有找到 !!!!!! 还有,我感觉是不是 只有JMS才能采用TOPIC连接方式,但是我这是刚刚接受做这个IBM MQ程序 不知道 JMS该怎么做TOPIC连接,在网上看见 ! 疯掉了!!! 实在 希望 能够 指点一下 不胜感激!!!!
ee4456 2008-03-25
  • 打赏
  • 举报
回复
没看到你那个帖子不知道是哪个,。不如你把问题贴着吧,我看看
logi22 2008-03-25
  • 打赏
  • 举报
回复
好了,你又少了20分了。
笑死我了,btw,你的问题我看了,但是我不会。。
huitongrr 2008-03-25
  • 打赏
  • 举报
回复
我问了 很多遍了! 下面还有个提问 也是我的!!

下面还有的叫 [象大家请教]那个帖子 也是 我的 你肯有人解决没?

你体温把3 我去拿分去!!哈哈
ee4456 2008-03-25
  • 打赏
  • 举报
回复
有没有意思啊,要问问题就问吧,分少了也没人怪啊???一样有人回答
ee4456 2008-03-25
  • 打赏
  • 举报
回复
额,怎么给你分吧???我提问题,你来拿分?
huitongrr 2008-03-25
  • 打赏
  • 举报
回复
为什么 帮帮忙啊!
huitongrr 2008-03-25
  • 打赏
  • 举报
回复
哇!!这好事都没人来啊!!!!!!!!!!!!! 真是君子不贪图小便宜啊 我的天啊!!!
那就当帮忙行不!!!!!!!!!!!!!!!!
huitongrr 2008-03-25
  • 打赏
  • 举报
回复
那给我 30 分吧 我给你门 80 分!!!
huitongrr 2008-03-25
  • 打赏
  • 举报
回复
我草!! 吗的 20分怎么又没了 强烈鄙视 这破网站!!你弄个默认给分做什么啊!!我去!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ee4456 2008-03-25
  • 打赏
  • 举报
回复
那你这不是出了20分了吗???怎么给你分?

67,538

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧