title: How to send message in ActiveMQ queue from webservice class in Mule
body: <p>I have a mule flow :-
  I have the following flow :- </p>
  
  <pre><code>&lt;context:property-placeholder location="classpath:conf/DBConnectionProp.properties"/&gt;
  &lt;spring:beans&gt;
  &lt;spring:bean id="DB_Source" name="DB_Source" class="org.enhydra.jdbc.standard.StandardDataSource"&gt;
  &lt;spring:property name="url" value="${url}"/&gt;
  &lt;spring:property name="driverName" value="${driverName}"/&gt;
  &lt;/spring:bean&gt;
  &lt;spring:bean id="LookUp" name="LookUp" class="com.vertu.services.schema.maindata.v1.Dao.MainDataDAOImpl"&gt;
  &lt;spring:property name="dataSource" ref="DB_Source"/&gt;
  &lt;/spring:bean&gt;
  
  &lt;spring:bean id="objectStore" class="org.mule.util.store.SimpleMemoryObjectStore"/&gt;
  &lt;/spring:beans&gt;
  
  
  &lt;jdbc-ee:connector name="Database_Global" dataSource-ref="DB_Source" validateConnections="true" queryTimeout="-1" pollingFrequency="0" doc:name="Database"&gt;
  &lt;reconnect frequency="1000" count="3" /&gt;
  &lt;jdbc-ee:query key="InsertQuery" value="INSERT INTO getData(ID,NAME,AGE,DESIGNATION)VALUES(?,?,?,?)"/&gt;
  &lt;jdbc-ee:query key="RetriveQuery" value="Select * from getData where ID=?"/&gt;
  &lt;jdbc-ee:query key="CheckRowExistsQuery" value="Select count(*) from getData where ID=?"/&gt;
  &lt;jdbc-ee:query key="UpdateQuery" value="UPDATE getData SET NAME=?, AGE=?, DESIGNATION = ? WHERE ID=?"/&gt;
  &lt;jdbc-ee:query key="DeleteQuery" value="DELETE FROM getData WHERE ID=?"/&gt;
  &lt;/jdbc-ee:connector&gt;
  
  &lt;jms:activemq-connector name="Active_MQ" brokerURL="tcp://localhost:61616" validateConnections="true" doc:name="Active MQ"/&gt;
  
  &lt;flow name="db_exceptionsFlow" doc:name="db_exceptionsFlow" &gt;
  &lt;http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8082" path="mainData" doc:name="HTTP"/&gt;
  &lt;cxf:jaxws-service serviceClass="com.test.services.schema.maindata.v1.MainData" doc:name="SOAP"/&gt;
  
  &lt;until-successful objectStore-ref="objectStore" maxRetries="5" secondsBetweenRetries="10" doc:name="Until Successful"&gt;
  &lt;component class="com.test.services.schema.maindata.v1.Impl.MainDataImpl" doc:name="JavaMain_ServiceImpl"/&gt; 
  &lt;/until-successful&gt;
  
  &lt;mulexml:object-to-xml-transformer doc:name="Object to XML"/&gt;
  &lt;logger message="Response :- #[message.payload]" level="INFO" doc:name="Logger"/&gt;
  
  &lt;catch-exception-strategy doc:name="Catch Exception Strategy"&gt;
  &lt;jms:outbound-endpoint queue="errorQueue" connector-ref="Active_MQ" doc:name="JMS"/&gt;
  &lt;/catch-exception-strategy&gt;
  &lt;/flow&gt;
  
  &lt;!-- &lt;flow name="db_retryFlow" doc:name="db_retryFlow" &gt;
  &lt;jms:inbound-endpoint connector-ref="Active_MQ" address="jms://tcp:errorQueue" doc:name="JMS" exchange-pattern="request-response"/&gt;
  
  &lt;logger level="INFO" message="message :-#[message.payload]" doc:name="Logger"/&gt;
  &lt;/flow&gt; --&gt; 
  &lt;/mule&gt;
  </code></pre>
  
  <p>But now the issue is:-</p>
  
  <p>It is creating errorQueue but no message message is there in the
  queue when DB server is not available.. </p>
  
  <p>Since it is a web service I have put the implement class (com.test.services.schema.maindata.v1.Impl.MainDataImpl) which is responsible for DB operation under until successful</p>
  
  <p>One more issue is incase of success (when DB endpoint is available) it is not showing any response in SOAPUI</p>
  
  <p>Please help... so that I can put the message in ActiveMQ whenever DB endpoint is not available and can retrieve the message from ActiveMQ whenever DB endpoint is available again and use the message for DB interaction ....</p>