WebSphere MQ Programming Using Base Classes For Java

2y ago
8 Views
2 Downloads
1.54 MB
344 Pages
Last View : 17d ago
Last Download : 2m ago
Upload by : Grant Gall
Transcription

V1.2.2coverWebSphere MQProgrammingUsing Base Classes for Java(Course Code MQ09)Student NotebookERC 2.0IBM Learning ServicesWorldwide Certified Material

Student NotebookTrademarksIBM is a registered trademark of International Business Machines Corporation.The following are trademarks of International Business Machines Corporation in the UnitedStates, or other countries, or Fz/OSCICSIMSOS/390SupportPacLinux is a registered trademark of Linus Torvalds in the United States and other countries.Microsoft, Windows, Windows NT Microsoft, Windows, Windows NT, and the Windowslogo are trademarks of Microsoft Corporation in the United States, other countries, or both.Java, Java Development Kit, JDBC, JDK and all Java-based trademarks are trademarks ofSun Microsystems, Inc. in the United States, other countries, or both.UNIX is a registered trademark of The Open Group in the United States and othercountries.Other company, product, and service names may be trademarks or service marks ofothers.June 2002 EditionThe information contained in this document has not been submitted to any formal IBM test and is distributed on an “as is” basis withoutany warranty either express or implied. The use of this information or the implementation of any of these techniques is a customerresponsibility and depends While each item may have been reviewed by IBM for accuracy in a specific situation, there is no guaranteethat the sa Customers attempting to adapt these techniques to their own environments do so at their own risk. The original reposi Copyright International Business Machines Corporation 2000, 2002. All rights reserved.This document may not be reproduced in whole or in part without the prior written permission of IBM.Note to U.S. Government Users — Documentation related to restricted rights — Use, duplication or disclosure i

V1.0Student NotebookContentsTrademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ixCourse Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vAgenda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viiUnit 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-21.1 Introduction to Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3What is Java? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4JVM - Java Virtual Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5JDK - Java Development Kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6Java Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8What is a Java Class? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10Class Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12Method Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-13Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-151.2 Introduction to MQSeries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-17MQSeries - Commercial Messaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-18The Three Styles of Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-19Queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-21Queue Managers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-22Publish/Subscribe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-23MQI - Messaging and Queuing Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-25Building an MQSeries Java Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-27MQSeries for Java Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-28Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-29SupportPacs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-301.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-33Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-34Unit 2. Queue Manager Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22.1 How to Connect to a Queue Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3What is a Queue Manager? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4Connection Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5Connection Type: Client Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6Connection Type: Bindings Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7What’s the Advantage?' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8Java Basics: Application vs. Applet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9Defining Which Connection to Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10Other Useful MQEnvironment Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11Connecting to a Queue Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13Completion and Reason Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14 Copyright IBM Corp. 2000, 2002Course materials may not be reproduced in whole or in partwithout the prior written permission of IBM.Contentsiii

Student NotebookTesting the Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-15Disconnecting from a Queue Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-16Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-172.2 Checkpoint and Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-19Unit Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-20Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-21Unit 3. Working with Queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-23.1 Working with Queues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3Accessing Queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-4Open Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-6Reason Codes when Opening a Queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-7Closing a Queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-8Alias Queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-10Model Queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-11Dynamic Queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-12Dynamic Queue Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-133.2 Checkpoint and Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15Unit Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-16Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-17Unit 4. Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-24.1 Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3MQException Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-4MQException.log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-5MQException.completionCode and MQException.reasonCode . . . . . . . . . . . . . . . .4-6MQException.exceptionSource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-7Try / Catch Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-84.2 Checkpoint and Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9Unit Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-10Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-11Unit 5. Messaging and Queuing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-25.1 The Message Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3Message Header Application Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-4Constructing a Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-5The MQMessage Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-6User Data Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-7write and writeString . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-8writeChar, writeChars and writeUTF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-10Numeric Data Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-11Other Data Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-13Changing the Buffer Location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-155.2 Putting a Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-17ivWebSphere MQ Programming Copyright IBM Corp. 2000, 2002Course materials may not be reproduced in whole or in partwithout the prior written permission of IBM.

V1.0Student NotebookMessage Descriptor Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-18Priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-19Persistence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-20messageId . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-21Put Message Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-22PMO: options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-23Putting Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-24PMO: resolvedQueueName / resolvedQueueManagerName . . . . . . . . . . . . . . . . 5-25Put Message Buffer Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-275.3 Getting a Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-29Getting Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-30Processing the Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-31Creating the Message Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-32Get Message Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-34GMO: options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-35Issue the Get Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-37Retrieving Message Length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-39Retrieving User Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-40Catering for the Exception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-425.4 Checkpoint and Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-45Unit Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-46Unit Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-47Unit Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-48Unit Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-49Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-50Unit 6. Messages Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-26.1 Requests and Replies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3Message Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-4How to use Message Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-7replyToQueueManagerName/replyToQueueName . . . . . . . . . . . . . . . . . . . . . . . . 6-8Reply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-9Retrieving the Reply Queue and Reply Queue Manager Names . . . . . . . . . . . . . 6-106.2 Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-11Report Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-12Exception Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-13Expiry Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-15COA and COD Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-17Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-19COPY MSG ID TO CORREL ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-206.3 Checkpoint and Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-21Unit Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-22Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-23 Copyright IBM Corp. 2000, 2002Course materials may not be reproduced in whole or in partwithout the prior written permission of IBM.Contentsv

Student NotebookUnit 7. Retrieval of Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-27.1 Message Id and Correlation ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3messageId and correlationId . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-4messageId and correlationId . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-6messageId and correlationId . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-7Using messageId and correlationId . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-9Using messageId and correlationId . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-117.2 Waiting for Replies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-13Wait . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-14GMO: wait option and waitInterval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-16Wait with waitInterval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-17Wait Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-187.3 Message Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-19Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-20The Message Group Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-21Message Groups and the groupId Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-22Putting a Message to a Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-23Getting a Message from a Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-25Match Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-27Spanning Units of Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-287.4 Message Segments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-31Segmentation by the Queue Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-32Message Segmentation Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-34Segmentation by the Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-35Selective Reassembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-377.5 Checkpoint and Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-39Unit Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-40Unit Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-41Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-42Unit 8. More on Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-1Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-28.1 Triggering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3Trigger Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-4Triggering Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-6Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-7Initiation Queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-8Trigger Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-9Implementation of Triggering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-108.2 Inquire and Set Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-11Inquire and Set Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-12Why Inquire and Set? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-13Inquire Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-14Set Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-158.3 Data Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-17Data Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-18viWebSphere MQ Programming Copyright IBM Corp. 2000, 2002Course materials may not be reproduced in whole or in partwithout the prior written permission of IBM.

V1.0Student NotebookSelecting the Data Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-19Data Conversion by Write or Read Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-21Requesting Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-228.4 Distribution Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-25What are Distribution Lists? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-26Creating a Distribution List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-28Opening a Distribution List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-29Putting a Message onto a Distribution List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-30Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-31Problem Determination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-338.5 Checkpoint and Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-35Unit Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-36Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-37Unit 9. Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-1Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-29.1 Local Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3User Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-49.2 Context Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-7The Context Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-8Context Properties of a Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-9Manipulating the Context Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-11Pass Context Example Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-139.3 Alternate User ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-15Alternate User ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-169.4 Checkpoint and Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-19Unit Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-20Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-21Unit 10. Units of Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-1Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-210.1 Local Units of Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3Unit of Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-4Implementing the Local UOW Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-6Commit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-8Backout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-910.2 Global Units of Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-11Implementing the Global UOW Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-12Global UOW Example Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-13Considerations for Global UOW Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-1410.3 Checkpoint and Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-15Unit Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-16Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-17Unit 11. Exits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-1Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-211.1 Exits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-3 Copyright IBM Corp. 2000, 2002Course materials may not be reproduced in whole or in partwithout the prior written permission of IBM.Contentsvii

Student NotebookChannel Exits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-4Client Channel Exits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-5MQSendExit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-6MQReceiveExit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-7MQSecurityExit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-8MQChannelExit and MQChannelDefinition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-9Example Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-1011.2 Checkpoint and Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-13Unit Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-14Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-15Unit 12. Multithreading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-1Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12-212.1 Multithreading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-3Multithreaded Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12-4Thread Synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12-5Multithreading Example . . . . . . . . . . . . . .

WebSphere MQ Programming Using Base Classes for Java (CourseCodeMQ09) StudentNotebook ERC2.0 Wo

Related Documents:

In the three volumes of the IBM WebSphere Portal V4.1 Handbook, we cover WebSphere Portal Enable and Extend. The IBM WebSphere Portal V4.1 Handbook will help you to understand the WebSphere Portal architecture, how to install and configure WebSphere Portal, how to administer portal pages using WebSphere Portal; it will also discuss the

Unit Objectives 2 This unit was designed to enable you to: Start a development project that implements WebSphere Commerce V7. Describe the Runtime architecture of WebSphere Commerce. Describe the development model for WebSphere Commerce. Explain the application of Struts in WebSphere Commerce. Describe the presentation layer for WebSphere Commerce by using both

WebSphere Application Server WebSphere MQ Use the most appropriate protocol C .net Java C JMS COBOL Java Jacl JMS Jython Web-Sockets C# HTTP WebSphere Application Server is a fully compliant Java Enterprise Edition (JEE) application server. The Java Message Service (JMS) is the JEE application messaging protocol. WebSphere MQ provides a fully

WebSphere 8. Welcome to the F5 Deployment Guide for IBM WebSphere. This document provides guidance for deploying the BIG-IP Local Traffic Manager (LTM) with IBM WebSphere 8. The BIG-IP system can optimize IBM WebSphere at many layers: in front of the IBM HTTP . Servers, between HTTP Servers and WebSphere Application Servers, or to eliminate .

Download and install WebSphere MQ 2. Configure WebSphere MQ 3. Install OEG Gateway . Oracle Enterprise Gateway 6 / 30 4. Configure Gateway to send messages to WebSphere MQ 5. Configure Gateway to listen for messages from WebSphere MQ queue 6. Test Setup 2. Setting up the WebSphere MQ environment

Figure 2 WebSphere Manages the Middle Tier in a Three-Tier Model One of the WebSphere products, WebSphere Portal, manages a variety of enterprise applications and supports application development and delivery. In the Lean Retail WebSphere Solution, content development and document management functions of WebSphere Portal were tested.

IBM WebSphere Portal Version 5 Family Enable WebSphere Application Server IBM HTTP server WebSphere Portal Server Out-of-the-Box Portlets Collaboration Services API Portal Toolkit WebSphere Translation Server WebSphere Studio Site Developer Content Management Personalization Portal Document Manager

Successful MDM deployments using IBM WebSphere Customer Center and IBM WebSphere Data Integration Suite. Page 1 Introduction This document has been created to show the complementary nature of IBM WebSphere Customer Center (formerly known as DWL Customer), a Master Data Management Information Accelerator, and the IBM WebSphere