我是 EJB3 开发人员的新人。当我编写 EJB3 mdb 并且想将其部署到我的 jboss (jboss-4.2.3.GA) 时,这里有一些错误信息:
--- MBeans 等待其他 MBeans --- ObjectName: jboss.j2ee:jar=HelloWorldEjb.jar,name=QueneMDB01,service=EJB3 状态: FAILED 原因: org.jboss.deployment.DeploymentException: 必需的配置属性RequiredConfigPropertyM etaData@12c08c7 [name=destination descriptions=[DescriptionMetaData@1941dc9[language=zh]]] 用于在激活配置 [ActivationConfigProperty(destinationType=javax.jms.Queue)、ActivationConfigProperty(acknowledgeMode=Auto -acknowledge)] ra=jboss.jca: service=RARDeployment,name='jms-ra.rar'
--- MBean 是问题的根本原因 --- ObjectName:jboss.j2ee:jar=HelloWorldEjb.jar,name=QueneMDB01,service=EJB3 状态:失败原因:org.jboss.deployment.DeploymentException:必需的配置属性RequiredConfigPropertyM etaData@12c08c7[name=destination descriptions=[DescriptionMetaData@1941dc9[language=zh]]] 在激活配置 [ActivationConfigProperty(destinationType=javax.jms.Queue)、ActivationConfigProperty 中找不到消息类型“javax.jms.MessageListener” (acknowledgeMode=Auto-acknowledge)] ra=jboss.jca: service=RARDeployment,name='jms-ra.rar'
我的 mdb 是:
@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue") })
public class QueneMDB01 implements MessageListener
{
public void onMessage(Message msg) {
// TODO Auto-generated method stub
try {
TextMessage textMessage = (TextMessage) msg;
System.out.println("MyQueneMDBBean is called "
+ textMessage.getText() + " ");
} catch (JMSException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}