日期:2014-05-20  浏览次数:20666 次

一个MDB部署后无法启动JBOSS的问题
我编写了一个MDB,发布到JBOSS以后,启动JBOSS的时候就显示如下所示的提示信息:

14:30:16,546 INFO [TomcatDeployment] deploy, ctxPath=/jmx-console, vfsUrl=jmx-console.war
14:30:18,562 INFO [JBossASKernel] Created KernelDeployment for: ejb_mdb.jar
14:30:18,578 INFO [JBossASKernel] installing bean: jboss.j2ee:jar=ejb_mdb.jar,name=MDBQueueBean,service=EJB3
14:30:18,578 INFO [JBossASKernel] with dependencies:
14:30:18,578 INFO [JBossASKernel] and demands:
14:30:18,578 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService
14:30:18,578 INFO [JBossASKernel] and supplies:
14:30:18,578 INFO [JBossASKernel] Class:javax.jms.MessageListener
14:30:18,578 INFO [JBossASKernel] jndi:null
14:30:18,578 INFO [JBossASKernel] Added bean(jboss.j2ee:jar=ejb_mdb.jar,name=MDBQueueBean,service=EJB3) to KernelDeployment of: ejb_mdb.jar
14:30:18,796 INFO [EJBContainer] STARTED EJB: cn.edu.cqu.ejb.MDBQueueBean ejbName: MDBQueueBean

然后就停在这里再也不动了,也没有任何的错误信息。

以下是我的MDB类:
package cn.edu.cqu.ejb;

import javax.ejb.ActivationConfigProperty;
import javax.ejb.MessageDriven;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;

@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/MDBQueue") }

)
public class MDBQueueBean implements MessageListener {

public void onMessage(Message msg) {
try {
TextMessage textMsg = (TextMessage) msg;
System.out
.println("MDBQueueBean gets: [" + textMsg.getText() + "]");
} catch (JMSException e) {
e.printStackTrace();
}
}

}

请问各位,这是为什么呢?

------解决方案--------------------
给出的日志没有提示错啊!
请楼主,分析下 D:\jboss-5.0.0.GA\server\default\log
下面的日志文件,应该有详细的报错信息
------解决方案--------------------
你的 MDB 部署没有问题 ,有错误信息吗