You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Thushara Seneviratne <th...@gmail.com> on 2010/01/21 17:19:28 UTC

How to migrate from lightweight components

Hi ,

I wrote a sample application using lightweight components together with
servicemix.xml file , "destinationService" attribute is used to define the
route. Now i want to deploy same application as a SA with few SUs using
xbean.xml file , I wonder how can i define route because it is not possible
to define "destinationService" attribute ?

1. ) How to define "destinationService" within a one SU with Xbean.xml ?

e.g-   <sm:activationSpec componentName="httpGetData"
service="lb:httpGetData" *destinationService="lb:trace"*>
          <sm:component>
            <bean xmlns="http://xbean.org/schemas/spring/1.0"
class="org.apache.servicemix.components.http.HttpInvoker">
               <property name="url" value="
http://localhost:8080/EsbServlet/hello/"/>
            </bean>
          </sm:component>
        </sm:activationSpec>

            <sm:activationSpec componentName="httpReceiver"
service="lb:httpReceiver" endpoint="httpReceiver" *
destinationService="lb:httpGetData"*>
                <sm:component>
                    <bean
class="org.apache.servicemix.components.http.HttpConnector">
                        <property name="host" value="127.0.0.1"/>
                        <property name="port" value="8912"/>
                    </bean>
                </sm:component>
            </sm:activationSpec>


2.) How to define "destinationService"  among two components belong to two
SUs

e.g-

<sm:activationSpec componentName="timer" service="lb:timer" *
destinationService="lb:httpGetData"*>
            <sm:component>
                <bean
class="org.apache.servicemix.components.quartz.QuartzComponent">
                   ---------------------------------------
                </bean>
            </sm:component>
        </sm:activationSpec>

        <sm:activationSpec componentName="httpGetData"
service="lb:httpGetData" *destinationService="lb:trace"*>
          <sm:component>
            <bean xmlns="http://xbean.org/schemas/spring/1.0"
class="org.apache.servicemix.components.http.HttpInvoker">
               <property name="url" value="
http://localhost:8080/EsbServlet/hello/"/>
            </bean>
          </sm:component>
        </sm:activationSpec>



It would  be grate if someone can show how can i write above two examples
using standard  JBI components ( Servicemix -http ,servicemix-quartz)  with
XBean file ?


Thanks ,

Thushara