This is the last in the series of recipes illustrating how to send an order type message. In this recipe we will use a simple Java class called
Order to represent the order and an
ObjectMessage object to encapsulate the
Order object. Since an order is best represented as a class, the
ObjectMessage is the preferred technique for sending an order.
The essential structure of a servlet used to generate a message was introduced in the introduction. Here we will address the unique elements of creating and using an
ObjectMessage which include: