直到ejbTimeout结束,MDB onMessage才开始。它不应该异步启动吗?
|
我们有一个javax.ejb.TimedObject,它将消息排队到MDB,就像这样...
ctx = new InitialContext();
QueueConnectionFactory qCF = (QueueConnectionFactory) ctx
.lookup(\"java:comp/env/jms/queueconnfactory\");
Queue q = (Queue) ctx.lookup(\"java:comp/env/jms/queue\");
conn = qCF.createQueueConnection();
session = conn.createQueueSession(true,
Session.AUTO_ACKNOWLEDGE);
QueueSender sender = session.createSender(q);
TextMessage txtMsg = session.createTextMessage();
txtMsg.setLongProperty(JobMonitorUtil.JOB_REFERENCE_ID, filingId);
txtMsg.setLongProperty(JobMonitorUtil.JOB_ID, jobId);
txtMsg.setLongProperty(JobMonitorUtil.JOB_RUN_SID, jobRunSId);
sender.send(txtMsg);
session.close();
conn.close();
当我调试此文件时(在Weblogic 10.3.1.0上),我跳过了sender.sent(txtMsg)行,并且希望onMessage断点几乎立即被命中。直到我让ejbTimeout运行(实际上是我退出TimerImpl.timerExpired时),它才达到我的断点。消息队列在生成消息的同一服务器上。
在我看来,这很奇怪。
MDB消息不是异步发送的吗?
这可能是配置问题,还是应该如何工作?
没有找到相关结果
已邀请:
1 个回复
细瑞