1 Reply Latest reply on May 18, 2011 10:26 PM by rick_wagner

    Spring Component


      The idea is to provide a similar functionality as the actual Bean Component, Initially I'm planning to implement a custom namespace, that will allow me to declare a switchyard service in a spring application context, first version would look like this:



      <swyd:service id="myService" service-interface="org.jboss.switchyard.MyService"/>



      This will assume a default location of the configuration file switcyrad.xml, else you will also be able to set by:



      <swyd:service id="myService" service-interface="org.jboss.switchyard.MyService">

         <property name="conf-file" value="my-switchyard.xml"/>




      By creating the custom namespace and handlers I should be able to inject, the service in a spring bean (any pojo) by either using annotation:



      @Autowired MyService myService;



      or as a reference in the spring application context



      <bean id="mySpringPojo" class="org.jboss.spring.MethodInvokingFactoryBean">

          <property name="staticMethod" ref="myService">




      As the core concept is the same as the bean component let me know if I'm missing something, possibly at the service definition I should add more properties or something else..


      In further version I have been thinking about make possible to declare transformers at application context.

        • 1. Spring Component

          Hi Alejandro,


          I'm not sure I'm understanding what we're doing here.  Are you saying we can produce Switchyard components in an otherwise 'normal' Spring context (application)?  Spring 3 or ?


          Please elaborate a little further, maybe even include basic drawings if they help to make the context absolutely clear.  This is very interesting.