Chapter 6. Working with components
In this chapter
- Understanding the role of components in Mule
- Common components from Mule Core
- Invoking SOAP and REST services
- Executing your business logic
- Advanced component configuration
If you’ve been around for a while in the happy field of software development, you’ve surely been exposed to different flavors of component models. CORBA, EJB, JavaBean, and now SCA have all helped familiarize us with the notion of the component. We understand that components represent entities that can perform specific operations, with well-defined interfaces and an accent on encapsulation.
Unsurprisingly, Mule supports its own component model. More surprisingly, it’s often difficult to decide when to use or create a component in Mule. This difficulty stems from the extensive capacities of the routing, filtering, and transforming infrastructure that surrounds the components. The previous chapters explored these capacities: you’ve discovered that you can achieve many complex integration scenarios without the need for any particular component.
So why bother about components?
In this chapter, we’ll start by answering that question. Then we’ll look at existing and custom components that perform message-level operations, remote logic invocation, and custom business logic execution. We’ll also look closely at Clood’s usage of existing and custom components in their email generation, statistics, and file transfer services.