tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schlichtherle <christ...@schlichtherle.de>
Subject ejb-jar.xml ignored for some EJB JAR in EAR
Date Thu, 29 Aug 2013 07:19:11 GMT
Hi,

I have two EJB JARs in my EAR. Each of them has an ejb-jar.xml which configures the type of
destination for messaging like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-jar xmlns = "http://java.sun.com/xml/ns/javaee"
             xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"
             version = "3.1">
        <enterprise-beans>
            <session>
                <ejb-name>UpdateManagerBean</ejb-name>
                <resource-env-ref>
                    <resource-env-ref-name>destination</resource-env-ref-name>
                    <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
                    <mapped-name>jms/TrueUpdate Agent</mapped-name>
                </resource-env-ref>
            </session>
        </enterprise-beans>
    </ejb-jar>

and the corresponding code looks like this:

    @Singleton
    public class UpdateManagerBean extends ... {

        @Resource(name = "destination", lookup = "jms/TrueUpdate Agent")
        private Destination destination;

        …
    }

The purpose here is to define the type of Destination (Queue or Topic) at deployment time.

This works fine with the other bean in the EAR, but not the bean shown here. An example EAR
can be found in the ticket I created yesterday.

This used to work in 1.5.2, so I suppose it's a regression.

Regards,
Christian


Mime
View raw message