简体   繁体   English

(Jboss 5)在War文件中未检测/部署带注释的消息驱动的Bean

[英](Jboss 5) Annotated Message Driven beans not detected/deployed in War file

Got the following annotated mdb which works when deployed as a jar(even without the ejb.jar.xml) into Jboss but doesn't work when deployed within a war, mdbs seem to be ignored.I have an existing project which is a war and would like to just inject as is today as the mdb needs to reference the jars in the lib folder & also classses in war. 我得到了以下带注释的mdb,它在以jar形式部署(即使没有ejb.jar.xml时)也可以工作到Jboss中,但是在战争中部署时却不起作用,mdbs似乎被忽略了。并想按今天的样子注入,因为mdb需要引用lib文件夹中的jar并在war中进行分类。 I am basically looking for the easiest option to for it to work so I dont need make much changes to the existing war structure. 我基本上是在寻找最简单的方法来使其正常工作,因此我不需要对现有的战争结构进行太多更改。 Any ideas please ? 有什么想法吗?

@MessageDriven(
        activationConfig = { @ActivationConfigProperty(
                propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
                @ActivationConfigProperty(
                        propertyName = "destination", propertyValue = "queue/testqueue1")
        })
public class MessageConsumer implements MessageListener {

 public void onMessage(Message message) {

        System.out.println("Received..............:" + message.getText());
    }
}

EJB 3.1 supports EJB deployment in .war files. EJB 3.1支持在.war文件中进行EJB部署。 No there's no support for EJB 3.1 in JBoss AS 5.x. 不,JBoss AS 5.x中不支持EJB 3.1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM