On Feb 17, 2008 10:44 AM, mmistroni <[EMAIL PROTECTED]> 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?

You say you're using a pipeline, but the service to which you're
sending is named wiretap. Please post the configuration for the next
component which, based on its name would appear to be a wiretap.

Also, more importantly, based on the following exception:

java.lang.UnsupportedOperationException: A destination must be specified.
       at
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProdu
cer.java:448)

The destination you're using in the call to the send() method is null.
Instead of creating a queue using new ActiveMQQueue(), you should
create a queue by calling session.createQueue().

Bruce
-- 
perl -e 'print unpack("u30","D0G)[EMAIL 
PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/

Reply via email to