Skip navigation

Mule Spring Proxies

Mule Spring Proxies is a springified alternative to MuleClient. This approach makes it possible configure and inject a Mule client using Spring. The module might be a part of the SMuT Stack  (the combination of Spring, Mule and Tomcat that many people use as a lightweight app server).  Main goal of the module is to simplify interaction between services outside Mule and Mule services(UMO:s) using Spring configuration.

 Planned approach

  • Implement the skeleton
  • Implement support for synchronous calls using the vm transport
  • Add other transports and transformers
  • Implement support for asynchronous calls 

 Example of intended usage

 Spring configuration of the ProxyFactoryBean:

<bean id="proxyToMuleService" class="org.mule.springproxies.SynchClientFactoryBean">
  <!-- Service interface implemented by Mule Service -->
  <property name="serviceInterface"; value="no.bouvet.samples.AService" />

  <!-- Endpoint configured in Mule configuration -->
  <property name="endpointAdress" value="vm://testIn" />
</bean>

 Spring 2.0 schema configuration of the ProxyFactoryBean:

<clprx:synch
  id="proxyToMuleService"
  serviceInterface="no.bouvet.samples.AService"
  endpointAdress="xfire:http://localhost:8081/services/AServiceUMO"
  resultTransformer="no.bouvet.samples.AServiceTransformer"/>

Client bean getting the proxy injected:

<bean id="theUsingBean" class="no.bouvet.samples.SomeBeanLivingInSpringContainer">
  <property name="aService" ref="proxyToMuleService" />
</bean>

Source

Since there isn't any code so far there's a simple POC attached. The POC includes a test case showing how to use the Spring proxies as Mule clients.

Download 

Adaptavist Theme Builder Powered by Atlassian Confluence