title: Glassfish 3.1 - How to configure JMS on multiple domains?
body: <p>Due to classloading issues I need to deploy an ear and a war in separate domains in the same instance of Glassfish 3.1.1.  The war sends messages to a queue and and MDB in the ear should receive and action it.</p>
  
  <p>The JMS is set up in the domains thusly:</p>
  
  <p><strong>domain1 default_JMS_host</strong> (server-config | Java Message Service | JMS Hosts):</p>
  
  <pre><code>Type = local
  Host = localhost
  Port = 7676
  </code></pre>
  
  <p><strong>domain2 default_JMS_host</strong> (server-config | Java Message Service | JMS Hosts):</p>
  
  <pre><code>Type = remote
  Host = localhost
  Port = 7676
  </code></pre>
  
  <p>Originally I had the port on domain2 set to 5076, but that caused connection refused exceptions on domain startup.</p>
  
  <p>With this setup everything seems to load fine (no errors in domain2 server.log) but it doesn't pick up the messages put in the queue by the war file.  I have confirmed that the messages are being put in the queue by the war using the command:</p>
  
  <pre><code>/&lt;glassfish&gt;/mq/bin/imqcmd list dst -b localhost:7676 -u admin
  </code></pre>
  
  <p>I have tried searching for how to set up JMS with multiple domains in the same Glassfish instance, but haven't found anything useful.  Can someone point me to a good resource on how to set this up?</p>