Tuesday, May 1, 2007

Spring Events example with Mule ESB

clipped from mule.codehaus.org
Click this logo to return to the home page

The folloing example configures a OrderManager bean that receives Orders via different endpoints, processes them, then sends the result to a processed.queue. The example assumes you have read the Mule Events in Spring introduction.

We want our OrderManager to receive orders over -

  • Jms on an orders.queue
  • Email on orders@myrestaurant.com
  • Soap, acting as a web service
  • To enable a spring bean to receive Mule Events it needs to implement a MuleEventListener or MuleSubscriptionEventListener. Lets start with the code for our OrderManager and then describe what its doing.

    Configuring Mule and Spring

    To hook Mule into the Spring event mechanism you need to declare the MuleEventMulticaster bean in the application Context. This will now be used to send and receive events in Spring.

    Handling Transformations

    Jms

    Pop3

    Soap

    Receiving Events

    Publishing Events

    0 comments: