tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Touzery <>
Subject registering a JMS MDB works through annotations, not through ejb-jar.xml
Date Thu, 23 Mar 2017 09:27:23 GMT

     I'm having trouble registering an MDB through the ejb-jar.xml.

     If I have the annotations on the MDB, like so:

@MessageDriven(activationConfig = {
    @ActivationConfigProperty(propertyName = "destinationType", 
propertyValue = "javax.jms.Queue"),
    @ActivationConfigProperty(propertyName = "destination", 
propertyValue = "tmsAlertQueue")},
        mappedName = "jms/tmsAlertQueue")
public class AlertMessageHandler extends 
BaseMessageHandler<AlertBatchDto> implements MessageListener {

     Everything works fine. But I'd rather have the annotations in the 
ejb-jar.xml (so I can turn them on or off through config). I have this 
(and those exact annotations worked on glassfish =>

<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar xmlns = ""
          version = "3.1"
          xmlns:xsi = ""
          xsi:schemaLocation = "">





     But that doesn't work. I know tomee parses the ejb-jar.xml, because 
if I put garbage in it, I get an error. I'm testing in arquillian right 
now actually, and registering the ejb-jar through shrinkwrap like so:

                 .addAsWebInfResource("WEB-INF/ejb-jar.xml", "ejb-jar.xml")

     I've tried modifying the ejb-jar root element for JEE7, like so:

<ejb-jar xmlns=""

     And also adding the metadata-complete attribute (both to true and 
false), to no avail. The log file doesn't tell me much.

     Any idea what I can do next?

     Thank you!


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message