close
2007年12月16日 星期日

.
. IBM WebSphere MQ v6.0
. Chapter 6.2 - IBMWebSphere MQ Clients
.

=== WebSphere MQ Client ===
 ☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆
  Client-System      Server-System
 WMQ-Application      WMQ-Queue-Manager
 Client-Connection      Server-Connection
 Communications-stack→→→Communications-stack
         MQI-CHANNEL
 ☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆
1. Assured delivery.
2. Queue storage.
3. Data conversion.
4. Administration.
5. Recovery.
6. Syncpoint control.


=== MQI Clients Explained ===
1. The full range of MQI calls and options is available to a WebSphereMQ client
 application, including the following :
 - The use of MQGMO_CONVERT option on the MQGET call. This causes the
  application data of the message to be converted into the numberic and
  character representation in use on the client system. The server Queue
  Manager provides the usual level of support to do this.
 - A client application may be connected to more than one Queue Manager
  simultaneously. Each MQCONN call to different Queue Manager returns a
  different connection handle. This does not apply if the application is not
  running as a WebSphereMQ client.
2. The MQI stub which is linked with an application when running as a client is
  different from that used when the application is not running as client. An
  application will receive the reason code MQRC_Q_MGR_NOT_AVAILABLE
  on an MQCONN call if it is linked with the wrong MQI stub.

 ☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆
 1. MQCONN ---> (Queue Manager)
  2. QMOPEN ---> (Queue)
   3. MQPUT / MQGET / MQINQ / MQSET

  MQBEGIN
   MQPUT / MQGET
   IF successful -> MQCMIT
   ELSE MQBACK

  4. MQCLOSE ---> (Queue)
 5.MQDISC ---> (Queue Manager)

 ☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆


=== Syncpoint Control on a Base Client ===
1. A WebSphere MQ client application may participate in a Local unit of work
 involving MQSeries resources.
 - Uses the MQCMIT and MQBACK calls for this purpose.
2. A WebSphere MQ client application cannot participate in a Global unit of
 work involving WebSphereMQ resources.


=== Extended Transactional Client ===
1. An Extended Transactional Client can participate in a Global unit of work :
 - Transaction manager runs on client system.
 - Transaction manager provides syncpoint processing.

=== MQ Client Installation ===
(略)


=== Defining an MQI CHANNEL === (MQ Client CHANNEL)
1. Use the DEFINE CHANNEL command with parameters :
 - CHLTYPE  CLNTCONN or SVRCONN (SVRCONN為client專用)
 - TRPTYPE  DECNET, LU62, NETBIOS, SPX or TCP.
 - CONNAME(string)  For a client connection only.
 - QMNAME(string)  For a client connection only.
2. No operational involvement on an MQI CHANNEL :
 - An MQI CHANNEL starts when a client application issues MQCONN
  (or MQCONNX)
 - An MQI CHANNEL stops when a client application issues MQDISC
3. Do not forget to configure and refresh the inet daemon, or to start the
 WebSphereMQ Listener, on the server system.


=== Two ways of Configuring an MQI CHANNEL ===
1. Method_1 :
 - On the server system, define a server connection.
 - On the client system, set the environment variable.
 - MQSERVER=ChannelName/TransportType/ConnectionName

 (Windows : SET MQSERVER=VENUS.SVR/TCP/hostname(port) )
 (UNIX : export MQSERVER=VENUS.SVR/TCP/hostname(port) )

2. Method_2 :
 - On the server system, define a client connection and a server conection.
 -If not on a file server, copy the client CHANNEL definition talbe from the server
  system to the client system.
 - On the client system, set the environment variables :
  a. MQCHLLIB= 
   Path to the directory containing the client CHANNEL difinition table.
  b. MQCHLTAB=
   Name of the file containing the client CHANNEL definition table.

  (Windows : SET MQCHLIB=C:\MQM
        SET MQCHTAB=AMQCLCHL.TAB
  (UNIX : export MQCHLIB=/mqmtop/qmgrs/QUEUEMANAGERNAME/@ipcc
      export MQCHLTAB=AMQCLCHL.TAB )


=== Auto-Definition of CHANNELs ===
1. Applies only to the end of a CHANNEL with type :
 - Receiver
 - Server connection
2. Function invoked when an incoming request is received to start a CHANNEL
 but there is no CHANNEL definition.
3. CHANNEL definition is created automatically using the model :
 - SYSTEM.AUTO.RECEIVER
 - SYSTEM.AUTO.SVRCONN
4. Partner's values are used for :
 - CHANNEL name.
 - Sequence number wrap value.
5. To enable the automatic definition of CHANNELs, the attribute ChannelAutoDef
 of the Queue Manager object must be set to MQCHAD_ENABLED.
 The Corresponding parameter on the ALTER QMGR command is CHAD(ENABLED)
6. CHANNEL auto-definition events can be enabled by setting attribute ChannelAutoDefEvent
 of the Queue Manager object must be set to MQCEVR_ENABLED.
 The Corresponding parameter on the ALTER QMGR command is CHADEV(ENABLED)


=== Let Queue Manager accessed by MQ Explorer ===
(☆☆☆ by AaA ☆☆☆)
1. SYSTEM.ADMIN.SVRCONN (Windows default, UNIX/Linux need to add manualy)
2. # runmqsc QM1
  : DIS CHANNEL(SYSTEM.ADMIN.SVRCONN)
  : ALTER CHANNEL(SYSTEM.ADMIN.SVRCONN) CHLTYPE(SVRCONN) MCAUSER('mqm')
  (MCAUSER原本空白,表示檢查UserID/Group。 而指定mqm表示連上來ㄉ,都自動以mqm登入)

arrow
arrow
    全站熱搜

    amzshar 發表在 痞客邦 留言(0) 人氣()