"Chapter 32: Java EE Examples Using the JMS API"
"An Application Example That Consumes Messages from a Remote Server"
Also please note that there is a n open issue
https://glassfish.dev.java.net/issues/show_bug.cgi?id=3462 for which you have to use the workaround of changing the jms service type to LOCAL (default is EMBEDDED)
[Message sent by forum member 'rampsarathy' (rampsarathy)]