You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by VijayRam <vi...@yahoo.com> on 2007/11/13 06:36:01 UTC

Help Needed on using Servicemix-JMS

Hi All,

Can someone point me to some code samples to use the servicemix-jms
component which uses only xbean.xml configuration?

This is what i want to do: 
1. Create a JMS client and publish a message to a queue
2. This message on the queue needs to picked up by my component in
servicemix and it should be sent to the NMR.
3. The message from the NMR should be received by another component in
servicemix.
4. The output needs to be sent back to the JMS client

All the requisite configuration needs to be done by using xbean.xml only.

Please help!!
Regards,
Vijay
-- 
View this message in context: http://www.nabble.com/Help-Needed-on-using-Servicemix-JMS-tf4795877s12049.html#a13720114
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Help Needed on using Servicemix-JMS

Posted by VijayRam <vi...@yahoo.com>.
Hi ,

Thanks for your response Jeff, i used the samples and was able to build an
example which took a queue message from the client, passed it through
JMSComponent and to my POJO on servicemix-bean component and it worked :-)

Now i am trying this scenario and am having problems with it.
JMSClient --> ListenerBean(POJO1)---->NMR --> ListenerBean2(POJO2) --->
JMSClient

My configurations are as follows:
------------------------------------------------------------------------
jms xbean.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans  xmlns:jms="http://servicemix.apache.org/jms/1.0"
xmlns:test="urn:test">
  <jms:endpoint service="test:service"
                endpoint="endpointBean1"
                role="consumer"
                targetService="test:service"
                connectionFactory="#jmsFactory"
                destinationStyle="queue"
                jmsProviderDestinationName="demo.org.servicemix.source"
                defaultMep="http://www.w3.org/2004/08/wsdl/in-out"/>
 
  <jms:endpoint service="test:receive"
                endpoint="endpoint"
                role="provider"
                targetService="test:receive"
                connectionFactory="#jmsFactory"
                destinationStyle="queue"
                jmsProviderDestinationName="demo.org.servicemix.output"
                defaultMep="http://www.w3.org/2004/08/wsdl/in-out"/>

   	<!--  Connection Factory -->
  <bean id="jmsFactory"
class="org.apache.activemq.pool.PooledConnectionFactory">
    <property name="connectionFactory">
      <bean class="org.apache.activemq.ActiveMQConnectionFactory">
        <property name="brokerURL" value="tcp://localhost:61616" />
      </bean>
    </property>
  </bean>
 </beans>---------------------------------------------------------
servicemix beans - xbean.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:bean="http://servicemix.apache.org/bean/1.0"
xmlns:test="urn:test">
	<!-- Add bean stuff here -->
	<bean:endpoint service="test:service" endpoint="endpointBean1"
bean="#listenerBean"/>
	<bean id="listenerBean" class="ListenerBean"/>
 
	<bean:endpoint service="test:receive" endpoint="endpointBean2"
bean="#listenerBean2"/>
	<bean id="listenerBean2" class="ListenerBean2"/>
</beans>

The POJO1 ListenerBean has the onMessageExchange(MessageExchange exchange)
method, the return queue name is specified in the jms xbean.xml. 

The problem is that the program flow does not go into POJO2 at all and it is
not able to use the output queue which has been defined on the xbean.xml
file. Can someone please help me with this or point me some sample which is
close to this problem?

Regards,
Vijay



Jeff Yu-2 wrote:
> 
> Hi vijay
> 
> You can refer to the servicemix sample: basic & bridge sample, located in
> $servicemix/example.
> 
> http://servicemix.apache.org/basic.html
> 
> Hope This Helps.
> 
> Jeff
> 
> On Nov 13, 2007 1:36 PM, VijayRam <vi...@yahoo.com> wrote:
> 
>>
>> Hi All,
>>
>> Can someone point me to some code samples to use the servicemix-jms
>> component which uses only xbean.xml configuration?
>>
>> This is what i want to do:
>> 1. Create a JMS client and publish a message to a queue
>> 2. This message on the queue needs to picked up by my component in
>> servicemix and it should be sent to the NMR.
>> 3. The message from the NMR should be received by another component in
>> servicemix.
>> 4. The output needs to be sent back to the JMS client
>>
>> All the requisite configuration needs to be done by using xbean.xml only.
>>
>> Please help!!
>> Regards,
>> Vijay
>> --
>> View this message in context:
>> http://www.nabble.com/Help-Needed-on-using-Servicemix-JMS-tf4795877s12049.html#a13720114
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Help-Needed-on-using-Servicemix-JMS-tf4795877s12049.html#a13828008
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Help Needed on using Servicemix-JMS

Posted by "Jeff.Yu" <je...@gmail.com>.
Hi vijay

You can refer to the servicemix sample: basic & bridge sample, located in
$servicemix/example.

http://servicemix.apache.org/basic.html

Hope This Helps.

Jeff

On Nov 13, 2007 1:36 PM, VijayRam <vi...@yahoo.com> wrote:

>
> Hi All,
>
> Can someone point me to some code samples to use the servicemix-jms
> component which uses only xbean.xml configuration?
>
> This is what i want to do:
> 1. Create a JMS client and publish a message to a queue
> 2. This message on the queue needs to picked up by my component in
> servicemix and it should be sent to the NMR.
> 3. The message from the NMR should be received by another component in
> servicemix.
> 4. The output needs to be sent back to the JMS client
>
> All the requisite configuration needs to be done by using xbean.xml only.
>
> Please help!!
> Regards,
> Vijay
> --
> View this message in context:
> http://www.nabble.com/Help-Needed-on-using-Servicemix-JMS-tf4795877s12049.html#a13720114
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>