Hello
i sorted out the problem
i changed xbean.xml from this one:
<jms:endpoint service="test:MyConsumerService"
endpoint="jms"
targetService="tut:pipeline"
role="consumer"
destinationStyle="queue"
jmsProviderDestinationName="queue/A"
connectionFactory="#connectionFactory"/>
to this one
<jms:endpoint service="test:MyConsumerService"
endpoint="jms"
targetService="tut:pipeline"
role="consumer"
destinationStyle="queue"
jmsProviderDestinationName="queue/A"
connectionFactory="#connectionFactory"
defaultMep="http://www.w3.org/2004/08/wsdl/in-only"/>
and everything worked as a charm :)
sorry for bothering.... i feel i should fight with code for 3 days before
posting :)
regards
marco
mmistroni wrote:
>
> hi all,
> i am using servicemix standalone.
> I have deployed componets that allow me to do this:
>
> filePoller--->MiddleComponentSE-->FinalDestinationSE.
> this has been achieved using eip:pipeline
>
> I am now trying to achieve this
> JMS BC --> MiddleComponentSE-->FinalDestinationSE, againg using
> eip:pipeline
>
> this is my JMS-bu xbean.xml
> [code]
> <beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
> xmlns:test="http://test"
> xmlns:amq="http://activemq.org/config/1.0"
> xmlns:tut="urn:servicemix:tutorial"
> xmlns:eip="http://servicemix.apache.org/eip/1.0">
>
> <!-- START SNIPPET: consumer -->
> <jms:endpoint service="test:MyConsumerService"
> endpoint="jms"
> targetService="tut:wiretap"
> role="consumer"
> destinationStyle="queue"
> jmsProviderDestinationName="queue/A"
> connectionFactory="#connectionFactory" />
> <!-- END SNIPPET: provider -->
>
> <amq:connectionFactory id="connectionFactory"
> brokerURL="tcp://localhost:61616" />
>
> <!-- JMS ConnectionFactory from JNDI -
> <bean id="connectionFactory"
> class="org.springframework.jndi.JndiObjectFactoryBean">
> <property name="jndiName" value="ConnectionFactory" />
> </bean>
> -->
>
> </beans>
> [/code]
>
> for testing purposes, i have written a JMS client which posts messages to
> the JMS queue, so that i can test the whole flow
> here' smy JMS client code
> [code]
> try {
> ActiveMQConnectionFactory factory = new
> ActiveMQConnectionFactory("tcp://localhost:61616");
> ActiveMQQueue pubTopic = new ActiveMQQueue("queue/A");
> Connection connection = factory.createConnection();
> Session session = connection.createSession(false,
> Session.AUTO_ACKNOWLEDGE);
> MessageProducer producer =
> session.createProducer(pubTopic);
>
> producer.send(pubTopic,session.createTextMessage("<test>This is a
> simple test</test>"));
> System.err.println("--- Message successfully
> sent-----");
> } catch(Exception e) {
> System.err.println("Exception in sending message.");
> e.printStackTrace();
> }
> [/code]
>
> whenever i run my client, i got this exception from svcmix
> [code]
> INFO - LogTask - Logging system reconfigured using
> file:
> file:/C:/apache-servicemix-3.3-SNAPSHOT/conf/log4j.xml
> ERROR - JmsComponent - Error processing exchange InOut[
> id: ID:192.168.0.2-1182878fc24-13:0
> status: Error
> role: consumer
> service: {urn:servicemix:tutorial}wiretap
> endpoint: endpoint
> in: <?xml version="1.0" encoding="UTF-8"?><test>This is a simple
> test</test>
> error: java.lang.UnsupportedOperationException: Use an InOnly or
> RobustInOnly
> MEP
> ]
> java.lang.UnsupportedOperationException: A destination must be specified.
> at
> org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProdu
> cer.java:448)
> at
> org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProdu
> cer.java:356)
> at
> org.apache.servicemix.jms.multiplexing.MultiplexingConsumerProcessor.
> process(MultiplexingConsumerProcessor.java:120)
> at
> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
> feCycle.java:538)
> at
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
> BaseLifeCycle.java:512)
> at
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
> Cycle.java:46)
> at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
> d(DeliveryChannelImpl.java:610)
> at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
> w.java:170)
> at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
> ava:167)
> at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
> a:134)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
> utor.java:650)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
> .java:675)
> [/code]
>
> what am i missing?
> my understanding is that my BC is just a 'listener' to a queue, so if i
> post a message to that queue the BC should pick it up and pass it thru to
> the pipeline.....
>
> anyone could help?
>
> thanks and regards
> marco
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
--
View this message in context:
http://www.nabble.com/ActiveMQ-issue---can-this-be-achieved-tp15531004s12049p15663531.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.