I created my own JmsItemReader and -Writer-like classes, before realizing that the framework would probably provide default implementations for these. However, I currently prefer my own implementations, as the framework classes don't perform any checking of required properties on the injected JmsTemplate.
In my implementation I don't inject JmsOperations but JmsTemplate, which allows me to check the inject template for required settings. For example, I currently have something like this in my reader:
Assert.isTrue(jmsTemplate.getReceiveTimeout() != JmsTemplate.RECEIVE_TIMEOUT_INDEFINITE_WAIT,
"JmsTemplate must have a receive timeout!");
Assert.isTrue(jmsTemplate.getDefaultDestination() != null || jmsTemplate.getDefaultDestinationName() != null,
"jmsTemplate must have a defaultDestination or defaultDestinationName!");
this.jmsTemplate = jmsTemplate;
Especially something like a receive timeout is very important to set for the reader (or the thread will simply block after processing all messages) but easy to forget. Users might even assume the framework takes care of this for them, esp. since the JavaDoc for the JmsItemReader makes no mention of this! Failing fast greatly improves the usability of these trivial helper classes.
This requires the use of JmsTemplate instead of JmsOperations. I don't believe this interface adds any real value (any mocking library will allow you to still test the ~Reader and ~Writer), but if you don't want to change this you could simply do an instanceof check before casting and performing the checks.