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. 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. No there's no support for EJB 3.1 in JBoss AS 5.x.