Code Dojo: Java Message Service

Our most recent dojo had a dual purpose: first, for newcomers to youDevise (such as yours truly), to get a feel for the types of test refactoring more established developers like to see; second, to introduce developers to the basics of the Java Message Service.

The Java Message Service is a (relatively) platform- and provider-independent messaging standard for asynchronous and reliable communication between Java programs, whether they are in the same VM, on the same machine, or widely dispersed. It supports both the queue (or point-to-point) and publish-subscribe message models.

Because we had a smaller number of developers participating, we ran this dojo more informally than previous ones, though still as a sort of Randori variant. We went through pre-prepared unit tests for classes using the JMS API and passed the keyboard around the table, refactoring as we reviewed the different uses of the API. We used MockRunner to create the unit tests.

After everyone had had the chance to suggest and implement a refactoring on the test cases, we went through a simple use case using an actual JMS provider (Apache ActiveMQ).