Let us follow the same order for
components and see how they are configured in ServiceMix so that you can easily
correlate to the flow we explained earlier.
JMS client: There are two versions of the JMS clients. They are:
ch14\WebServiceVersioning\JMSClient20061231.java
ch14\WebServiceVersioning\JMSClient20070101.java
Both these client programs are similar except the fact that JMSClient20061231.
java refers to SoapRequest20061231.xml whereas JMSClient20070101.
java refers to SoapRequest20070101.xml. The code for
JMSClient20061231 is shown as follows:
public class JMSClient20061231
{
private static final String REQUEST_FILE =
"/SoapRequest20061231.xml";
public static void main(String[] args) throws Exception
{
ActiveMQConnectionFactory factory =
new ActiveMQConnectionFactory("tcp://localhost:61616");
ActiveMQQueue pubTopic = new ActiveMQQueue("queue/A");
ActiveMQQueue subTopic = new ActiveMQQueue("queue/B");
Connection connection = factory.createConnection();
Session session = connection.createSession(false,
Session.AUTO_ACKNOWLEDGE);
MessageProducer producer = session.
Pages:
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381