title: send message from java program to activemq using mule
body: <p>Iam trying to send a string message from a java program to queue in ActiveMQ using MULE.Iam new to mule this is my mule-config.xml </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;mule xmlns="http://www.mulesoft.org/schema/mule/core"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:jms="http://www.mulesoft.org/schema/mule/jms"
        xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
        http://www.springframework.org/schema/tool http://www.springframework.org/schema/tool/spring-tool-3.0.xsd
        http://www.mulesoft.org/schema/mule/jms http://www.mulesoft.org/schema/mule/jms/3.1/mule-jms.xsd
        http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.1/mule.xsd"&gt;
  
  
  &lt;jms:activemq-connector name="jmsConnector" 
      specification="1.1" 
      brokerURL="tcp://localhost:61616" /&gt;
  &lt;model name="jmsModel"&gt;
      &lt;service name="jmsService"&gt;
          &lt;inbound&gt;
  
          &lt;/inbound&gt;
          &lt;outbound&gt;
              &lt;pass-through-router&gt;
                  &lt;jms:outbound-endpoint queue="myQueue" /&gt;
              &lt;/pass-through-router&gt;
          &lt;/outbound&gt;
      &lt;/service&gt;
  &lt;/model&gt;
  &lt;/mule&gt;
  </code></pre>
  
  <p>and following is my java class</p>
  
  <pre><code>public class MuleCaller {
  
      public static void main(String args[])
      {
  
          MuleCaller springCaller = new MuleCaller();
          springCaller.runListner();
          //  spAsync.onMessage(null);
  }
  public void runListner(){
  
      ClassPathXmlApplicationContext appContext = new ClassPathXmlApplicationContext(new String[] {
              "mule-config.xml"
          });
  
      }
  </code></pre>
  
  <p>What are the mistakes here, and iam not clear what to be written in </p>
  
  <p>Thanks and regards</p>