Jboss& EJB3部署错误

时间:2012-07-25 14:00:10

标签: jboss ejb-3.0

我是EJB3 dev的新手。 当我编写EJB3 mdb并且我想将它部署到我的jboss(jboss-4.2.3.GA)时 一些错误信息在这里:

  

---等待其他MBean的MBean --- ObjectName:jboss.j2ee:jar = HelloWorldEjb.jar,name = QueneMDB01,service = EJB3 State:   FAILED原因:org.jboss.deployment.DeploymentException:必需   配置属性RequiredConfigPropertyM   etaData @ 12c08c7 [名称=目标   mess = [DescriptionMetaData @ 1941dc9 [language = zh]]] for messag   在激活配置中找不到ingType'javax.jms.MessageListener'   [ActivationConfigProperty(destina tionType = javax.jms.Queue),   ActivationConfigProperty(acknowledgeMode =自动确认)]   ra = jboss.jca:service = RARDeployment,name ='jms-ra.rar'

     

--- MBEANS是问题的根本原因--- ObjectName:jboss.j2ee:jar = HelloWorldEjb.jar,name = QueneMDB01,service = EJB3 State:   FAILED原因:org.jboss.deployment.DeploymentException:必需   配置属性RequiredConfigPropertyM   etaData @ 12c08c7 [名称=目标   mess = [DescriptionMetaData @ 1941dc9 [language = zh]]] for messag   在激活配置中找不到ingType'javax.jms.MessageListener'   [ActivationConfigProperty(destina tionType = javax.jms.Queue),   ActivationConfigProperty(acknowledgeMode =自动确认)]   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();
        }
    }
}

1 个答案:

答案 0 :(得分:0)

从您的错误中我会说您忘记添加目的地名称(可能是队列名称)。

FAILED Reason: org.jboss.deployment.DeploymentException: Required config property RequiredConfigPropertyM etaData@12c08c7[name=destination descriptions=[DescriptionMetaData@1941dc9[language=zh]]

实施例: http://www.javaissues.com/2011/06/ejb3-message-driven-bean-hello-world.html

顺便说一下,你已经在JBoss中设置了你的队列/主题吗?

希望这有帮助, 戴夫