You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by hm75 <ha...@hotmail.com> on 2007/10/22 02:25:39 UTC

A simple Serivcemix/JMS use case

I have a simple servicemix/JMS usecase. I have a flow as follows:

JMSClient-->JMS Consumer SU-> Process 1(pojo)-> JMS Reply Queue (Static)->
Process 2(Done)(pojo)

What is the best way to implement this? What I thought I could do was create
a JMS Provider and JMS Consumer for the same queue ie. the JMS static JMS
reply queue in the above workflow. But I get an error deploying a provider
and consumer for the same queue in a service assembly.

Can I use the wsdlResource property of a jms provider component to forward
to a Pojo?

Thanks
Harsh
-- 
View this message in context: http://www.nabble.com/A-simple-Serivcemix-JMS-use-case-tf4668108s12049.html#a13335044
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: A simple Serivcemix/JMS use case

Posted by hm75 <ha...@hotmail.com>.
Thanks, but I am using 3.1.2. I have experienced this with jms and pojo
service units. These service units deploy correctly if I have <=2 of a
particular kind in the service assembly. 

I will try the <componentName> format.



Gert Vanthienen wrote:
> 
> L.S.,
> 
> What version of ServiceMix are you using?  This looks like an issue that 
> has been resolved with version 3.1...
> Do all of your SU pom.xml files actually have a dependency which is a 
> JBI component (e.g. servicemix-jms, servicemix-bean)? 
> If so, can you try adding <componentName>...</componentName> to the 
> <properties/> section of your pom.xml file with the name of the target 
> JBI component?
> 
> Gert
> 
> hm75 wrote:
>> I think, I understand what is happening. I get this problem when there
>> are >2
>> service units of a particular type jms/pojo etc in a service assembly. I
>> get
>> the error when packaging the service assembly. I think the error itself
>> is
>> misleading:
>>
>> org.apache.maven.lifecycle.LifecycleExecutionException: The service unit
>> myBean
>> does not have a dependency which is packaged as a jbi-component or a
>> project pro
>> perty 'componentName'
>>
>> Are there any workarounds for this?
>>
>> <beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
>>        xmlns:test="http://test"
>>        xmlns:amq="http://activemq.org/config/1.0">
>>
>>     <jms:endpoint service="test:MyProviderService"
>>                   endpoint="myProvider"
>>                   role="provider" 
>>                   destinationStyle="queue"
>>                   jmsProviderDestinationName="queue/B"
>>                   connectionFactory="#connectionFactory"
>>                   />
>>
>>
>>     <amq:connectionFactory id="connectionFactory"
>> brokerURL="tcp://localhost:61618" />
>>
>>     <!-- JMS ConnectionFactory from JNDI -
>>     <bean id="connectionFactory"
>> class="org.springframework.jndi.JndiObjectFactoryBean">
>>       <property name="jndiName" value="ConnectionFactory" />
>>     </bean>
>>     -->
>>
>> </beans>
>>
>> <beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
>>        xmlns:test="http://test"
>>        xmlns:amq="http://activemq.org/config/1.0">
>>
>>     <jms:endpoint service="test:MyReplyService"
>>                   endpoint="myConsumer"
>>                   targetService="test:myReplyBeanService"
>>                   targetEndpoint="endpoint"
>>                   role="consumer" 
>>                   destinationStyle="queue"
>>                   jmsProviderDestinationName="queue/B"
>>                   defaultMep="http://www.w3.org/2004/08/wsdl/in-only"
>>                   defaultOperation="test:Echo"
>>                   connectionFactory="#connectionFactory" />
>>
>>
>>     <amq:connectionFactory id="connectionFactory"
>> brokerURL="tcp://localhost:61618" />
>>
>>     <!-- JMS ConnectionFactory from JNDI -
>>     <bean id="connectionFactory"
>> class="org.springframework.jndi.JndiObjectFactoryBean">
>>       <property name="jndiName" value="ConnectionFactory" />
>>     </bean>
>>     -->
>>
>> </beans>
>>
>>
>> Gert Vanthienen wrote:
>>   
>>> Harsh,
>>>
>>> Can you post your JMS xbean.xml file?  I don't see a reason why you can 
>>> not have a provider and consumer on the same queue.  Would it be 
>>> possible to also post the error stack trace itself?
>>>
>>> Gert
>>>
>>> hm75 wrote:
>>>     
>>>> I have a simple servicemix/JMS usecase. I have a flow as follows:
>>>>
>>>> JMSClient-->JMS Consumer SU-> Process 1(pojo)-> JMS Reply Queue
>>>> (Static)->
>>>> Process 2(Done)(pojo)
>>>>
>>>> What is the best way to implement this? What I thought I could do was
>>>> create
>>>> a JMS Provider and JMS Consumer for the same queue ie. the JMS static
>>>> JMS
>>>> reply queue in the above workflow. But I get an error deploying a
>>>> provider
>>>> and consumer for the same queue in a service assembly.
>>>>
>>>> Can I use the wsdlResource property of a jms provider component to
>>>> forward
>>>> to a Pojo?
>>>>
>>>> Thanks
>>>> Harsh
>>>>   
>>>>       
>>>
>>>     
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/A-simple-Serivcemix-JMS-use-case-tf4668108s12049.html#a13354680
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: A simple Serivcemix/JMS use case

Posted by Gert Vanthienen <ge...@skynet.be>.
L.S.,

What version of ServiceMix are you using?  This looks like an issue that 
has been resolved with version 3.1...
Do all of your SU pom.xml files actually have a dependency which is a 
JBI component (e.g. servicemix-jms, servicemix-bean)? 
If so, can you try adding <componentName>...</componentName> to the 
<properties/> section of your pom.xml file with the name of the target 
JBI component?

Gert

hm75 wrote:
> I think, I understand what is happening. I get this problem when there are >2
> service units of a particular type jms/pojo etc in a service assembly. I get
> the error when packaging the service assembly. I think the error itself is
> misleading:
>
> org.apache.maven.lifecycle.LifecycleExecutionException: The service unit
> myBean
> does not have a dependency which is packaged as a jbi-component or a
> project pro
> perty 'componentName'
>
> Are there any workarounds for this?
>
> <beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
>        xmlns:test="http://test"
>        xmlns:amq="http://activemq.org/config/1.0">
>
>     <jms:endpoint service="test:MyProviderService"
>                   endpoint="myProvider"
>                   role="provider" 
>                   destinationStyle="queue"
>                   jmsProviderDestinationName="queue/B"
>                   connectionFactory="#connectionFactory"
>                   />
>
>
>     <amq:connectionFactory id="connectionFactory"
> brokerURL="tcp://localhost:61618" />
>
>     <!-- JMS ConnectionFactory from JNDI -
>     <bean id="connectionFactory"
> class="org.springframework.jndi.JndiObjectFactoryBean">
>       <property name="jndiName" value="ConnectionFactory" />
>     </bean>
>     -->
>
> </beans>
>
> <beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
>        xmlns:test="http://test"
>        xmlns:amq="http://activemq.org/config/1.0">
>
>     <jms:endpoint service="test:MyReplyService"
>                   endpoint="myConsumer"
>                   targetService="test:myReplyBeanService"
>                   targetEndpoint="endpoint"
>                   role="consumer" 
>                   destinationStyle="queue"
>                   jmsProviderDestinationName="queue/B"
>                   defaultMep="http://www.w3.org/2004/08/wsdl/in-only"
>                   defaultOperation="test:Echo"
>                   connectionFactory="#connectionFactory" />
>
>
>     <amq:connectionFactory id="connectionFactory"
> brokerURL="tcp://localhost:61618" />
>
>     <!-- JMS ConnectionFactory from JNDI -
>     <bean id="connectionFactory"
> class="org.springframework.jndi.JndiObjectFactoryBean">
>       <property name="jndiName" value="ConnectionFactory" />
>     </bean>
>     -->
>
> </beans>
>
>
> Gert Vanthienen wrote:
>   
>> Harsh,
>>
>> Can you post your JMS xbean.xml file?  I don't see a reason why you can 
>> not have a provider and consumer on the same queue.  Would it be 
>> possible to also post the error stack trace itself?
>>
>> Gert
>>
>> hm75 wrote:
>>     
>>> I have a simple servicemix/JMS usecase. I have a flow as follows:
>>>
>>> JMSClient-->JMS Consumer SU-> Process 1(pojo)-> JMS Reply Queue
>>> (Static)->
>>> Process 2(Done)(pojo)
>>>
>>> What is the best way to implement this? What I thought I could do was
>>> create
>>> a JMS Provider and JMS Consumer for the same queue ie. the JMS static JMS
>>> reply queue in the above workflow. But I get an error deploying a
>>> provider
>>> and consumer for the same queue in a service assembly.
>>>
>>> Can I use the wsdlResource property of a jms provider component to
>>> forward
>>> to a Pojo?
>>>
>>> Thanks
>>> Harsh
>>>   
>>>       
>>
>>     
>
>   


Re: A simple Serivcemix/JMS use case

Posted by hm75 <ha...@hotmail.com>.
I think, I understand what is happening. I get this problem when there are >2
service units of a particular type jms/pojo etc in a service assembly. I get
the error when packaging the service assembly. I think the error itself is
misleading:

org.apache.maven.lifecycle.LifecycleExecutionException: The service unit
myBean
does not have a dependency which is packaged as a jbi-component or a
project pro
perty 'componentName'

Are there any workarounds for this?

<beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
       xmlns:test="http://test"
       xmlns:amq="http://activemq.org/config/1.0">

    <jms:endpoint service="test:MyProviderService"
                  endpoint="myProvider"
                  role="provider" 
                  destinationStyle="queue"
                  jmsProviderDestinationName="queue/B"
                  connectionFactory="#connectionFactory"
                  />


    <amq:connectionFactory id="connectionFactory"
brokerURL="tcp://localhost:61618" />

    <!-- JMS ConnectionFactory from JNDI -
    <bean id="connectionFactory"
class="org.springframework.jndi.JndiObjectFactoryBean">
      <property name="jndiName" value="ConnectionFactory" />
    </bean>
    -->

</beans>

<beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
       xmlns:test="http://test"
       xmlns:amq="http://activemq.org/config/1.0">

    <jms:endpoint service="test:MyReplyService"
                  endpoint="myConsumer"
                  targetService="test:myReplyBeanService"
                  targetEndpoint="endpoint"
                  role="consumer" 
                  destinationStyle="queue"
                  jmsProviderDestinationName="queue/B"
                  defaultMep="http://www.w3.org/2004/08/wsdl/in-only"
                  defaultOperation="test:Echo"
                  connectionFactory="#connectionFactory" />


    <amq:connectionFactory id="connectionFactory"
brokerURL="tcp://localhost:61618" />

    <!-- JMS ConnectionFactory from JNDI -
    <bean id="connectionFactory"
class="org.springframework.jndi.JndiObjectFactoryBean">
      <property name="jndiName" value="ConnectionFactory" />
    </bean>
    -->

</beans>


Gert Vanthienen wrote:
> 
> Harsh,
> 
> Can you post your JMS xbean.xml file?  I don't see a reason why you can 
> not have a provider and consumer on the same queue.  Would it be 
> possible to also post the error stack trace itself?
> 
> Gert
> 
> hm75 wrote:
>> I have a simple servicemix/JMS usecase. I have a flow as follows:
>>
>> JMSClient-->JMS Consumer SU-> Process 1(pojo)-> JMS Reply Queue
>> (Static)->
>> Process 2(Done)(pojo)
>>
>> What is the best way to implement this? What I thought I could do was
>> create
>> a JMS Provider and JMS Consumer for the same queue ie. the JMS static JMS
>> reply queue in the above workflow. But I get an error deploying a
>> provider
>> and consumer for the same queue in a service assembly.
>>
>> Can I use the wsdlResource property of a jms provider component to
>> forward
>> to a Pojo?
>>
>> Thanks
>> Harsh
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/A-simple-Serivcemix-JMS-use-case-tf4668108s12049.html#a13350004
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: A simple Serivcemix/JMS use case

Posted by Gert Vanthienen <ge...@skynet.be>.
Harsh,

Can you post your JMS xbean.xml file?  I don't see a reason why you can 
not have a provider and consumer on the same queue.  Would it be 
possible to also post the error stack trace itself?

Gert

hm75 wrote:
> I have a simple servicemix/JMS usecase. I have a flow as follows:
>
> JMSClient-->JMS Consumer SU-> Process 1(pojo)-> JMS Reply Queue (Static)->
> Process 2(Done)(pojo)
>
> What is the best way to implement this? What I thought I could do was create
> a JMS Provider and JMS Consumer for the same queue ie. the JMS static JMS
> reply queue in the above workflow. But I get an error deploying a provider
> and consumer for the same queue in a service assembly.
>
> Can I use the wsdlResource property of a jms provider component to forward
> to a Pojo?
>
> Thanks
> Harsh
>