It looks like you're creating a transactional session and never
calling commit().

On 09/11/2007, CobraTheSleek <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> ENV:
> ActiveMQ-Snapshot-5.0
> JBoss AS 4.2.1
>
> I have the following queues defined:
>
>  <mbean code="org.jboss.resource.deployment.AdminObject"
> name="activemq.queue:name=org.apache.activemq.requestQueue">
>            <attribute name="JNDIName">activemq/requestQueue</attribute>
>       <depends
> optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='activemq-ra.rar'</depends>
>       <attribute name="Type">javax.jms.Queue</attribute>
>       <attribute
> name="Properties">PhysicalName=org.apache.activemq.requestQueue</attribute>
>    </mbean>
>
>    <mbean code="org.jboss.resource.deployment.AdminObject"
> name="activemq.queue:name=org.apache.activemq.replyQueue">
>            <attribute name="JNDIName">activemq/echoResponseQueue</attribute>
>       <depends
> optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='activemq-ra.rar'</depends>
>       <attribute name="Type">javax.jms.Queue</attribute>
>       <attribute
> name="Properties">PhysicalName=org.apache.activemq.replyQueue</attribute>
>    </mbean>
>
> I have an MDB defined that listens for messages from the requestQueue and
> posts a response on the replyQueue.
>
> I am using the Spring unit tests provided (Producer and Consumer) and my
> Producer sends messages to the requestQueue, the MDB receives the request
> and posts a message back on to the replyQueue.
>
> I can see that there are messages in the replyQueue via JMX. However, my
> Consumer never receives messages from the replyQueue.
>
> If I run the test without the MDB, by placing messages in the replyQueue via
> the PRODUCER, my Consumer receives the messages successfully. In other words
> messages posted by the MDB are never received by the consumer.
>
> The following is what my MDB does to place messages back on the reply queue:
>
> InitialContext initCtx = new InitialContext();
>
>         QueueConnectionFactory qcf = (QueueConnectionFactory) initCtx
>                 .lookup("java:comp/env/jms/MyQueueConnectionFactory");
>
>         QueueConnection qcon = qcf.createQueueConnection();
>         QueueSession qsession = qcon.createQueueSession(true, 0);
>         Queue q = (Queue) initCtx.lookup("activemq/replyQueue");
>         QueueSender qsender = qsession.createSender(q);
>
>         TextMessage message = qsession.createTextMessage();
>
>         message.setText(response);
>         qsender.setTimeToLive(100000000);
>         qsender.send(message);
>
>         qsender.close();
>         qsession.close();
>         qcon.close();
>
>
> I am quite confused as to why this is happening as I see messages as being
> available in the replyQueue.
> Any tips would be appreciated.
>
> --
> View this message in context: 
> http://www.nabble.com/Messages-not-being-received-by-consumer-tf4779201s2354.html#a13672078
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 
James
-------
http://macstrac.blogspot.com/

Open Source SOA
http://open.iona.com

Reply via email to