title: Grails external Jms broker (active mq)
body: <p>I have what will become an 'external' activemq server I'd like grails to be able to talk to. Right now I am just running it on my dev box.
  Here is what I have setup right now:</p>
  
  <p>1) Run activemq server<br>
  2) Run activemq/examples using ant to produce messages<br>
  3) View ActiveMQ admin site: <a href="http://localhost:8161/admin/queues.jsp" rel="nofollow">http://localhost:8161/admin/queues.jsp</a> verify that messages are in the queue.  </p>
  
  <p>4) Follow <strong>Mini Tutorial</strong> to create the Service and Controller: <a href="http://www.grails.org/ActiveMQ+Plugin" rel="nofollow">http://www.grails.org/ActiveMQ+Plugin</a>  </p>
  
  <p>5) Configured my Grails resources.groovy file as follows:</p>
  
  <pre><code>beans = {
      jmsConnectionFactory(SingleConnectionFactory){
          targetConnectionFactory = { ActiveMQConnectionFactory cf -&gt; brokerURL = 'tcp://localhost:61616' }
      }
  }
  </code></pre>
  
  <p>When I run the grails app I get a BindException saying port 61616 is already in use.<br>
  How do I configure this to use my server that is already running? </p>
  
  <p>I've tried changing 'localhost' to '127.0.0.1' and to my LAN ip, but no luck, it keeps trying to setup its own embedded activemq server.</p>
  
  <p>Any ideas?</p>