You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Peter Klotz <pe...@blue-elephant-systems.com> on 2006/03/31 19:53:36 UTC

servicemix-components/jms versus servicemix-jms

Hi,

I'm having a look at servicemix-3.0 and got aware that what was in
servicemix-2.0.2 is now in the service-components directory. Components from
service-components are obviously used in all the examples.
Now how are things in service-components and servicemix-jms or servicemix-http
related, like old and new?

The solution to my problems seem to be, according to Guillaume, to use
components from the servicemix-jms, but can anybody please explain for the
beginners the difference to the servicemix-components components or have a
really working detailed example of how to use servicemix-components in a
Spring-style XML config file as the examples use it?

I thought I have understood what XBean is but in the XBean XML configuration
files there is no notion of one component being linked to another. In the "old"
examples e.g.
...
      <sm:activationSpec componentName="jmsSender" service="my:jmsSender">
        <sm:component>
          <bean class="org.apache.servicemix.components.jms.JmsSenderComponent">
            <property name="template">
              <bean class="org.springframework.jms.core.JmsTemplate">
                <property name="connectionFactory">
                  <ref local="jmsFactory"/>
                </property>
                <property name="defaultDestinationName" value="midas.request"/>
                <property name="pubSubDomain" value="true"/>
              </bean>
            </property>
          </bean>
        </sm:component>
      </sm:activationSpec>
...

can I instead just use components from components-jms inside the <sm:component>
or what? If so which ones? Or use XBean like

   <jms:endpoint service="test:MyProviderService"
                  endpoint="myProvider"
                  role="provider"
                  destinationStyle="queue"
                  jmsProviderDestinationName="midas.request"
                  jndiConnectionFactoryName="ConnectionFactory"
                  wsdlResource="classpath:provider.wsdl" />

in that location?

Does anyone have a bigger real example of how the "new" components are used?


Peter

Re: servicemix-components/jms versus servicemix-jms

Posted by Guillaume Nodet <gn...@gmail.com>.
I have update the documentation.
Please take a look and come back with any unanswered questions.

http://servicemix.goopen.org/site/servicemix-jms.html

On 8/9/06, Ryan Fernandes <ry...@gmail.com> wrote:
>
>
> Hi Guillaume,
>
> Just a few of (probably dumb) questions :
>
> 1. What does --jmsProviderDestinationName="queue/A" (in xbean.xml)--
> signify? Does it create a logical queue, as I cant see anything like
> queue/A
> or 'A' in jconsole.
>
> 2. How does one access this queue via jndi? I just get a
> NameNotFoundException when I do a lookup for this queue.
>
> 3. I get a connection factory when I jndi lookup ("ConnectionFactory").
> Can
> you please tell me where this name is configured ?
>
>
> Thanks in advance,
> Ryan
> --
> View this message in context:
> http://www.nabble.com/servicemix-components-jms-versus-servicemix-jms-tf1376066.html#a5720542
> Sent from the ServiceMix - User forum at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: servicemix-components/jms versus servicemix-jms

Posted by Ryan Fernandes <ry...@gmail.com>.
Hi Guillaume,

Just a few of (probably dumb) questions :

1. What does --jmsProviderDestinationName="queue/A" (in xbean.xml)--
signify? Does it create a logical queue, as I cant see anything like queue/A
or 'A' in jconsole.

2. How does one access this queue via jndi? I just get a
NameNotFoundException when I do a lookup for this queue.

3. I get a connection factory when I jndi lookup ("ConnectionFactory"). Can
you please tell me where this name is configured ? 


Thanks in advance,
Ryan
-- 
View this message in context: http://www.nabble.com/servicemix-components-jms-versus-servicemix-jms-tf1376066.html#a5720542
Sent from the ServiceMix - User forum at Nabble.com.


Re: servicemix-components/jms versus servicemix-jms

Posted by Guillaume Nodet <gn...@gmail.com>.
You should either define the ConnectionFactory inside the
jndi.xmlconfiguration file,
or use a direct reference to it inside your xbean.xml.

  <jms:endpoint ... connectionFactory="#connectionFactory"/>
  <bean id="connectionFactory" class="
org.apache.activemq.ActiveMQConnectionFactory">
    <property name="brokerURL" value="vm://localhost" />
  </bean>

On 8/8/06, Ryan Fernandes <ry...@gmail.com> wrote:
>
>
> HI Peter,
>
> Am currently stuck on the same thing.
> I've
> 1. created the xbean.xml zipped into a service unit archive and made the
> entry in META-INF/jbi.xml of the Service archive.
> 2. deployed the servicemix-jmsxxx.zip component in the 'install' folder
> 3. deployed my service archive.
>
> I get a nice stack trace which says that ConnectionFactory cannot be
> looked
> up.
>
> Changing the configuration of the mbean (of the jms component) didnt help.
> Any help would be appreciated.
>
> My xbean.xml currently looks like this:
> <beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
>        xmlns:ryan="urn:ryan">
> <jms:endpoint service="ryan:jmsservice"
>                           endpoint="myjmsendpoint"
>                           targetService="ryan:myservice"
>                       targetEndpoint="myendpoint"
>               role="consumer"
>               destinationStyle="queue"
>               jmsProviderDestinationName="queue/A"
>               jndiConnectionFactoryName="ConnectionFactory"
>               defaultMep="http://www.w3.org/2004/08/wsdl/in-out" />
>
> </beans>
>
> Thanks,
> Ryan
> --
> View this message in context:
> http://www.nabble.com/servicemix-components-jms-versus-servicemix-jms-tf1376066.html#a5705305
> Sent from the ServiceMix - User forum at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: servicemix-components/jms versus servicemix-jms

Posted by Ryan Fernandes <ry...@gmail.com>.
HI Peter,

Am currently stuck on the same thing.
I've 
1. created the xbean.xml zipped into a service unit archive and made the
entry in META-INF/jbi.xml of the Service archive.
2. deployed the servicemix-jmsxxx.zip component in the 'install' folder
3. deployed my service archive.

I get a nice stack trace which says that ConnectionFactory cannot be looked
up.

Changing the configuration of the mbean (of the jms component) didnt help.
Any help would be appreciated.

My xbean.xml currently looks like this:
<beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
       xmlns:ryan="urn:ryan">
<jms:endpoint service="ryan:jmsservice"
			  endpoint="myjmsendpoint"
			  targetService="ryan:myservice"
		      targetEndpoint="myendpoint"
              role="consumer" 
              destinationStyle="queue"
              jmsProviderDestinationName="queue/A"
              jndiConnectionFactoryName="ConnectionFactory"
              defaultMep="http://www.w3.org/2004/08/wsdl/in-out" />
			  
</beans>

Thanks,
Ryan
-- 
View this message in context: http://www.nabble.com/servicemix-components-jms-versus-servicemix-jms-tf1376066.html#a5705305
Sent from the ServiceMix - User forum at Nabble.com.


Re: servicemix-components/jms versus servicemix-jms

Posted by Guillaume Nodet <gn...@gmail.com>.
Take a look at http://servicemix.org/servicemix-jms and
http://servicemix.org/servicemix-http.
The jms component doc is not finished yet and the example for
configuring the jms component inside a servicemix.xml file is not
written, but you should be able to try it using the http component
doc.  They use the same configuration mechanism, so something like the
following should work

<sm:activationSpec>
 <sm:component>
   <jms:component>
     <jms:endpoints>
       <jms:endpoint service="test:MyConsumerService"
             endpoint="jms"
             targetService="test:MyConsumerService"
             targetEndpoint="myConsumer"
             role="consumer"              destinationStyle="queue"
             jmsProviderDestinationName="queue/A"
             jndiConnectionFactoryName="ConnectionFactory"
             defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
             defaultOperation="test:Echo" />
     </jms:endpoints>
   </jms:component>
 </sm:component>
</sm:activationSpec>

Hope this helps,
Guillaume Nodet


On 3/31/06, Peter Klotz <pe...@blue-elephant-systems.com> wrote:
> Hi,
>
> I found part of the answer myself in a older posting, the difference between a
> servicemix-component and the full JBI-compliant components like
> servicemix-jms/-http etc.
>
> The question remains, how do I run, configure this and how is routing done in
> this case?
>
> Thanks, Peter
>
>
> Peter Klotz wrote:
> > Hi,
> >
> > I'm having a look at servicemix-3.0 and got aware that what was in
> > servicemix-2.0.2 is now in the service-components directory. Components from
> > service-components are obviously used in all the examples.
> > Now how are things in service-components and servicemix-jms or servicemix-http
> > related, like old and new?
> >
> > The solution to my problems seem to be, according to Guillaume, to use
> > components from the servicemix-jms, but can anybody please explain for the
> > beginners the difference to the servicemix-components components or have a
> > really working detailed example of how to use servicemix-components in a
> > Spring-style XML config file as the examples use it?
> >
> > I thought I have understood what XBean is but in the XBean XML configuration
> > files there is no notion of one component being linked to another. In the "old"
> > examples e.g.
> > ...
> >       <sm:activationSpec componentName="jmsSender" service="my:jmsSender">
> >         <sm:component>
> >           <bean class="org.apache.servicemix.components.jms.JmsSenderComponent">
> >             <property name="template">
> >               <bean class="org.springframework.jms.core.JmsTemplate">
> >                 <property name="connectionFactory">
> >                   <ref local="jmsFactory"/>
> >                 </property>
> >                 <property name="defaultDestinationName" value="midas.request"/>
> >                 <property name="pubSubDomain" value="true"/>
> >               </bean>
> >             </property>
> >           </bean>
> >         </sm:component>
> >       </sm:activationSpec>
> > ...
> >
> > can I instead just use components from components-jms inside the <sm:component>
> > or what? If so which ones? Or use XBean like
> >
> >    <jms:endpoint service="test:MyProviderService"
> >                   endpoint="myProvider"
> >                   role="provider"
> >                   destinationStyle="queue"
> >                   jmsProviderDestinationName="midas.request"
> >                   jndiConnectionFactoryName="ConnectionFactory"
> >                   wsdlResource="classpath:provider.wsdl" />
> >
> > in that location?
> >
> > Does anyone have a bigger real example of how the "new" components are used?
>
>
>
>

Re: servicemix-components/jms versus servicemix-jms

Posted by Peter Klotz <pe...@blue-elephant-systems.com>.
Hi,

I found part of the answer myself in a older posting, the difference between a
servicemix-component and the full JBI-compliant components like
servicemix-jms/-http etc.

The question remains, how do I run, configure this and how is routing done in
this case?

Thanks, Peter


Peter Klotz wrote:
> Hi,
> 
> I'm having a look at servicemix-3.0 and got aware that what was in
> servicemix-2.0.2 is now in the service-components directory. Components from
> service-components are obviously used in all the examples.
> Now how are things in service-components and servicemix-jms or servicemix-http
> related, like old and new?
> 
> The solution to my problems seem to be, according to Guillaume, to use
> components from the servicemix-jms, but can anybody please explain for the
> beginners the difference to the servicemix-components components or have a
> really working detailed example of how to use servicemix-components in a
> Spring-style XML config file as the examples use it?
> 
> I thought I have understood what XBean is but in the XBean XML configuration
> files there is no notion of one component being linked to another. In the "old"
> examples e.g.
> ...
>       <sm:activationSpec componentName="jmsSender" service="my:jmsSender">
>         <sm:component>
>           <bean class="org.apache.servicemix.components.jms.JmsSenderComponent">
>             <property name="template">
>               <bean class="org.springframework.jms.core.JmsTemplate">
>                 <property name="connectionFactory">
>                   <ref local="jmsFactory"/>
>                 </property>
>                 <property name="defaultDestinationName" value="midas.request"/>
>                 <property name="pubSubDomain" value="true"/>
>               </bean>
>             </property>
>           </bean>
>         </sm:component>
>       </sm:activationSpec>
> ...
> 
> can I instead just use components from components-jms inside the <sm:component>
> or what? If so which ones? Or use XBean like
> 
>    <jms:endpoint service="test:MyProviderService"
>                   endpoint="myProvider"
>                   role="provider"
>                   destinationStyle="queue"
>                   jmsProviderDestinationName="midas.request"
>                   jndiConnectionFactoryName="ConnectionFactory"
>                   wsdlResource="classpath:provider.wsdl" />
> 
> in that location?
> 
> Does anyone have a bigger real example of how the "new" components are used?