users@glassfish.java.net

Re: Using JMS for duplex communication

From: Major Péter <majorpetya_at_sch.bme.hu>
Date: Tue, 18 Jan 2011 17:38:46 +0100

Hi,

> By default, applications will connect to the JMS broker defined in the
> JMS service configuration (in your examples, either the embedded broker
> or the remote broker). You can also override this on a per-connection
> basis by configuring the connection factory explicitly. So it sounds as
> if you've basically got it right.

How can I configure a MDB to use a given connectionfactory?

>> What did I do wrong?
>
> Are you asking why setting "AddressList=mq://localhost:7676/jms" in the
> topic connection factory on your "client app" didn't cause it to receive
> messages from the "master app" running on a different machine?

it's running on the same machine (since it's just a PoC), so this wasn't
the problem.

> First thing, you need to replace "localhost" with the hostname on which
> your "master app" was running.
>
> Was this for a MDB? In this case you need to set addressList on the MDB
> something like this:
>
> @MessageDriven(name="foo", mappedName = "bar", activationConfig = {
> @ActivationConfigProperty(propertyName = "AddressList", propertyValue =
> "mq://somehost:7676")
> })

This was the missing part! Thanks!!
Although I didn't find any documentation where this "magic" property was
described (at least not in the EJB 3.0 core spec), do you know any doc
resource for these properties? (The docs.sun.com links are broken :'( )
Thanks

Regards,
Peter