Skip to main content


Showing posts from March, 2010

Elegance vs. simplicity

Few weeks ago I had pleasure to give a speech "Mule ESB vs. Apache ServiceMix" at Warsaw Java Users Group, together with Łukasz Dywicki. During this live coding session I have been implementing some simple integration logic using Mule ESB, while Łukasz did the same with ServiceMix. The presentation went pretty good, you can find source code here.

While preparing for the speech I have discovered some bug (see MULE-4708) in Mule ESB 2.2.1. My patch has been applied in less than 10 hours after submitting, which is quite impressive. Sadly, the ESB’s code I had to study to track down the bug was not so impressive, at least that was my first impression. Just take a look at this excerpt from org.mule.transport.jms.JmsMessageUtils, that takes literally any object and converts it into proper JMS message type:

public static Message toMessage(Object object, Session session) throws JMSException {
if (object instanceof Message) {
return (Message) object;
} else if (objec…