JMS Function Selectors & Method Bindings

JMS Function Selectors and Method bindings are properties that you define inside of an SCA JMS component that answer the question “Which {component,interface} pair should a message arriving on a queue be delivered to?”. I had intended to go and write up in lay-mans terms what it all meant, but luckily (for me) I stumbled across the SOA Tips ‘N’ Tricks blog and a post by Andrew Ferrier on the same topic.

In it, he talks about the ‘com.ibm.websphere.sca.jms.selector.impl.JMSFunctionSelectorImpl‘ function selector and how it sets the method binding based on the content of a custom JMS header ‘TargetFunctionSelector’ attribute.

I just wanted to add that WID/WPS also comes bundled with the standard JMS function selector: ‘com.ibm.websphere.jms.data.bindings.JMSFunctionSelector‘.

This selector will return a method binding based on the JMSType header property of the message. When I have a queue with a single consumer, I prefer this one. The method name is that is returned is specified in the infocenter.

Happy JMSing!

Author: dan

Comments

  1. Dan, thanks for the ping. Probably just worth adding that if the two function selectors you mentioned don’t suit and you’re going to write your own, the commonj.connector.runtime.FunctionSelector interface is the recommended one to override – there isn’t a specific super-interface/class for JMS function selectors.

Leave a Reply

Your email address will not be published. Required fields are marked *