try
{
log.info(this + ": msg: " + tm.getText());
BookCollection collection = resource.getBookCollection();
log.info(this + ": collection.size() before: " + collection.getBooks().size());
Counter counter = resource.getCounter();
collection.addBook(new Book(counter.getNext(), tm.getText()));
log.info(this + ": collection.size() after: " + collection.getBooks().size());
CountDownLatch latch = resource.getCountDownLatch();
latch.countDown(); // Tell BookResource book has been stored.
}
catch (JMSException e)