users@glassfish.java.net

Re: [JMS] MDB problem - cannot make this work

From: <glassfish_at_javadesktop.org>
Date: Tue, 11 Nov 2008 05:26:40 PST

Hi.
You were right, I have to set the mappedName attribute on my MDB to specify the destination on which it listens for new messages. And yes, the physical destination was created for me automatically. My example works fine now.
I am reading "EJB3 in Action", and the code for defininf the MDB was:

[code]
@MessageDriven(
    name="ShippingRequestProcessor",
    activationConfig = {
        @ActivationConfigProperty(
            propertyName="destinationType",
            propertyValue="javax.jms.Queue"),
        @ActivationConfigProperty(
            propertyName="destinationName",
            propertyValue="jms/ShippingRequestQueue")
    }
)
[/code]
and I thought the last @ActivationConfigProperty is used to determine the destination. So, to make things a little clearer for me, I have the following questions:
1. is there any resource somwehere in the net which would tell me which propertyName and their values can be used for Glassfish? As I assume this is not standardized in the specs, and varies from provider to provider, just as JPA properties?
2. there are numerous places I read that mappedName attribute is not portable and may not work with different application servers. What does this actually mean for me? And why do we have to specify the destination with a non-portable attribute?
If these are silly questions to you, forgive me as I am inexperienced in all of this.

And lastly, I would like to thank all the people who helped me in this thread with their examples and explanations.
[Message sent by forum member 'szczyp' (szczyp)]

http://forums.java.net/jive/thread.jspa?messageID=316016