Added automatic transaction support to the message handler.