rubywmq 2.0.2 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +10 -0
  3. data/Gemfile.lock +37 -0
  4. data/LICENSE.txt +1 -1
  5. data/README.md +29 -47
  6. data/Rakefile +12 -76
  7. data/examples/each_a.rb +2 -3
  8. data/examples/each_b.rb +4 -5
  9. data/examples/each_header.rb +5 -6
  10. data/examples/files_to_q.rb +7 -8
  11. data/examples/get_a.rb +3 -5
  12. data/examples/get_client.rb +9 -10
  13. data/examples/put1_a.rb +2 -3
  14. data/examples/put1_b.rb +4 -7
  15. data/examples/put1_c.rb +6 -6
  16. data/examples/put_a.rb +0 -2
  17. data/examples/put_b.rb +5 -7
  18. data/examples/put_dlh.rb +11 -12
  19. data/examples/put_dynamic_q.rb +7 -7
  20. data/examples/put_group_a.rb +3 -4
  21. data/examples/put_group_b.rb +7 -7
  22. data/examples/put_rfh.rb +13 -11
  23. data/examples/put_rfh2_a.rb +9 -10
  24. data/examples/put_rfh2_b.rb +9 -9
  25. data/examples/put_xmit_q.rb +63 -8
  26. data/examples/q_to_files.rb +6 -7
  27. data/examples/request.rb +20 -18
  28. data/examples/server.rb +19 -16
  29. data/ext/extconf.rb +2 -1
  30. data/ext/extconf_client.rb +3 -3
  31. data/ext/generate/generate_const.rb +30 -23
  32. data/ext/generate/generate_reason.rb +70 -72
  33. data/ext/generate/generate_structs.rb +20 -19
  34. data/ext/generate/wmq_structs.erb +67 -67
  35. data/ext/wmq.c +0 -16
  36. data/ext/wmq.h +0 -16
  37. data/ext/wmq_message.c +8 -24
  38. data/ext/wmq_mq_load.c +5 -17
  39. data/ext/wmq_queue.c +73 -90
  40. data/ext/wmq_queue_manager.c +115 -108
  41. data/lib/wmq/message.rb +36 -34
  42. data/lib/wmq/queue_manager.rb +22 -19
  43. data/lib/wmq/version.rb +1 -1
  44. data/rubywmq.gemspec +38 -0
  45. data/test/queue_manager_test.rb +334 -0
  46. data/test/test_helper.rb +14 -0
  47. metadata +16 -26
  48. data/tests/test.rb +0 -318
@@ -1,19 +1,3 @@
1
- /*
2
- * Copyright 2006 J. Reid Morrison
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
-
17
1
  #include "wmq.h"
18
2
 
19
3
  static ID ID_open;
@@ -50,6 +34,7 @@ static ID ID_ssl_cipher_spec;
50
34
  static ID ID_ssl_peer_name;
51
35
  static ID ID_keep_alive_interval;
52
36
  static ID ID_crypto_hardware;
37
+ static ID ID_use_system_connection_data;
53
38
 
54
39
  /* MQSCO ID's */
55
40
  static ID ID_key_repository;
@@ -74,26 +59,27 @@ void QueueManager_id_init(void)
74
59
  ID_message = rb_intern("message");
75
60
 
76
61
  /* MQCD ID's */
77
- ID_channel_name = rb_intern("channel_name");
78
- ID_transport_type = rb_intern("transport_type");
79
- ID_mode_name = rb_intern("mode_name");
80
- ID_tp_name = rb_intern("tp_name");
81
- ID_security_exit = rb_intern("security_exit");
82
- ID_send_exit = rb_intern("send_exit");
83
- ID_receive_exit = rb_intern("receive_exit");
84
- ID_max_msg_length = rb_intern("max_msg_length");
85
- ID_security_user_data = rb_intern("security_user_data");
86
- ID_send_user_data = rb_intern("send_user_data");
87
- ID_receive_user_data = rb_intern("receive_user_data");
88
- ID_user_identifier = rb_intern("user_identifier");
89
- ID_password = rb_intern("password");
90
- ID_connection_name = rb_intern("connection_name");
91
- ID_heartbeat_interval = rb_intern("heartbeat_interval");
92
- ID_long_remote_user_id = rb_intern("long_remote_user_id");
93
- ID_remote_security_id = rb_intern("remote_security_id");
94
- ID_ssl_cipher_spec = rb_intern("ssl_cipher_spec");
95
- ID_ssl_peer_name = rb_intern("ssl_peer_name");
96
- ID_keep_alive_interval = rb_intern("keep_alive_interval");
62
+ ID_channel_name = rb_intern("channel_name");
63
+ ID_transport_type = rb_intern("transport_type");
64
+ ID_mode_name = rb_intern("mode_name");
65
+ ID_tp_name = rb_intern("tp_name");
66
+ ID_security_exit = rb_intern("security_exit");
67
+ ID_send_exit = rb_intern("send_exit");
68
+ ID_receive_exit = rb_intern("receive_exit");
69
+ ID_max_msg_length = rb_intern("max_msg_length");
70
+ ID_security_user_data = rb_intern("security_user_data");
71
+ ID_send_user_data = rb_intern("send_user_data");
72
+ ID_receive_user_data = rb_intern("receive_user_data");
73
+ ID_user_identifier = rb_intern("user_identifier");
74
+ ID_password = rb_intern("password");
75
+ ID_connection_name = rb_intern("connection_name");
76
+ ID_heartbeat_interval = rb_intern("heartbeat_interval");
77
+ ID_long_remote_user_id = rb_intern("long_remote_user_id");
78
+ ID_remote_security_id = rb_intern("remote_security_id");
79
+ ID_ssl_cipher_spec = rb_intern("ssl_cipher_spec");
80
+ ID_ssl_peer_name = rb_intern("ssl_peer_name");
81
+ ID_keep_alive_interval = rb_intern("keep_alive_interval");
82
+ ID_use_system_connection_data = rb_intern("use_system_connection_data");
97
83
 
98
84
  /* MQSCO ID's */
99
85
  ID_key_repository = rb_intern("key_repository");
@@ -243,12 +229,27 @@ VALUE QueueManager_initialize(VALUE self, VALUE hash)
243
229
  * All Client connection parameters are ignored if connection_name is missing
244
230
  */
245
231
  #ifdef MQCNO_VERSION_2
246
- if(!NIL_P(rb_hash_aref(hash, ID2SYM(ID_connection_name))))
232
+ int use_system_connection_data = (rb_hash_aref(hash, ID2SYM(ID_use_system_connection_data)) == Qtrue) ? 1 : 0;
233
+
234
+ if(!NIL_P(rb_hash_aref(hash, ID2SYM(ID_connection_name))) || use_system_connection_data)
247
235
  {
248
236
  PMQCD pmqcd = &pqm->client_conn; /* Process MQCD */
249
237
  pqm->is_client_conn = 1; /* Set to Client connection */
250
238
 
251
- WMQ_HASH2MQCHARS(hash,connection_name, pmqcd->ConnectionName)
239
+ if(use_system_connection_data)
240
+ {
241
+ /*
242
+ * Use system defined connection data rather than explicitly providing a
243
+ * connection name. This is used with CCDT, the MQSERVER ENV var or the
244
+ * mqclient.ini file
245
+ */
246
+ pqm->connect_options.ClientConnPtr = NULL;
247
+ }
248
+ else
249
+ {
250
+ WMQ_HASH2MQCHARS(hash,connection_name, pmqcd->ConnectionName)
251
+ }
252
+
252
253
  WMQ_HASH2MQLONG (hash,transport_type, pmqcd->TransportType)
253
254
  WMQ_HASH2MQCHARS(hash,mode_name, pmqcd->ModeName)
254
255
  WMQ_HASH2MQCHARS(hash,tp_name, pmqcd->TpName)
@@ -384,7 +385,7 @@ VALUE QueueManager_initialize(VALUE self, VALUE hash)
384
385
  *
385
386
  * Throws:
386
387
  * * WMQ::WMQException if comp_code != MQCC_OK
387
- * * Except if :exception_on_error => false was supplied as a parameter
388
+ * * Except if exception_on_error: false was supplied as a parameter
388
389
  * to QueueManager.new
389
390
  */
390
391
  VALUE QueueManager_connect(VALUE self)
@@ -459,7 +460,7 @@ VALUE QueueManager_connect(VALUE self)
459
460
  *
460
461
  * Throws:
461
462
  * * WMQ::WMQException if comp_code != MQCC_OK
462
- * * Except if :exception_on_error => false was supplied as a parameter
463
+ * * Except if exception_on_error: false was supplied as a parameter
463
464
  * to QueueManager.new
464
465
  */
465
466
  VALUE QueueManager_disconnect(VALUE self)
@@ -509,7 +510,7 @@ VALUE QueueManager_disconnect(VALUE self)
509
510
  *
510
511
  * Note:
511
512
  * * commit will have no effect if all put and get operations were performed
512
- * without specifying :sync => true
513
+ * without specifying sync: true
513
514
  *
514
515
  * Returns:
515
516
  * * true : On Success
@@ -520,7 +521,7 @@ VALUE QueueManager_disconnect(VALUE self)
520
521
  *
521
522
  * Throws:
522
523
  * * WMQ::WMQException if comp_code != MQCC_OK
523
- * * Except if :exception_on_error => false was supplied as a parameter
524
+ * * Except if exception_on_error: false was supplied as a parameter
524
525
  * to QueueManager.new
525
526
  */
526
527
  VALUE QueueManager_commit(VALUE self)
@@ -561,7 +562,7 @@ VALUE QueueManager_commit(VALUE self)
561
562
  *
562
563
  * Note:
563
564
  * * backout will have no effect if all put and get operations were performed
564
- * without specifying :sync => true
565
+ * without specifying sync: true
565
566
  *
566
567
  * Returns:
567
568
  * * true : On Success
@@ -572,7 +573,7 @@ VALUE QueueManager_commit(VALUE self)
572
573
  *
573
574
  * Throws:
574
575
  * * WMQ::WMQException if comp_code != MQCC_OK
575
- * * Except if :exception_on_error => false was supplied as a parameter
576
+ * * Except if exception_on_error: false was supplied as a parameter
576
577
  * to QueueManager.new
577
578
  */
578
579
  VALUE QueueManager_backout(VALUE self)
@@ -611,7 +612,7 @@ VALUE QueueManager_backout(VALUE self)
611
612
  * resource such as a Database
612
613
  *
613
614
  * Starts a new unit of work under which put and get can be called with
614
- * with the parameter :sync => true
615
+ * with the parameter sync: true
615
616
  *
616
617
  * Returns:
617
618
  * * true : On Success
@@ -622,7 +623,7 @@ VALUE QueueManager_backout(VALUE self)
622
623
  *
623
624
  * Throws:
624
625
  * * WMQ::WMQException if comp_code != MQCC_OK
625
- * * Except if :exception_on_error => false was supplied as a parameter
626
+ * * Except if exception_on_error: false was supplied as a parameter
626
627
  * to QueueManager.new
627
628
  */
628
629
  VALUE QueueManager_begin(VALUE self)
@@ -665,17 +666,17 @@ VALUE QueueManager_begin(VALUE self)
665
666
  *
666
667
  * Summary of parameters and their WebSphere MQ equivalents
667
668
  * queue.get( # WebSphere MQ Equivalents:
668
- * :q_name => 'Queue Name', # MQOD.ObjectName
669
- * :q_name => { queue_manager=>'QMGR_name', # MQOD.ObjectQMgrName
670
- * q_name =>'q_name'}
671
- * :message => my_message, # n/a : Instance of Message
672
- * :data => "Hello World", # n/a : Data to send
673
- * :sync => false, # MQGMO_SYNCPOINT
674
- * :new_id => true, # MQPMO_NEW_MSG_ID & MQPMO_NEW_CORREL_ID
675
- * :new_msg_id => true, # MQPMO_NEW_MSG_ID
676
- * :new_correl_id => true, # MQPMO_NEW_CORREL_ID
677
- * :fail_if_quiescing => true, # MQOO_FAIL_IF_QUIESCING
678
- * :options => WMQ::MQPMO_FAIL_IF_QUIESCING # MQPMO_*
669
+ * q_name: 'Queue Name', # MQOD.ObjectName
670
+ * q_name: { queue_manager=>'QMGR_name', # MQOD.ObjectQMgrName
671
+ * q_name =>'q_name'}
672
+ * message: my_message, # n/a : Instance of Message
673
+ * data: "Hello World", # n/a : Data to send
674
+ * sync: false, # MQGMO_SYNCPOINT
675
+ * new_id: true, # MQPMO_NEW_MSG_ID & MQPMO_NEW_CORREL_ID
676
+ * new_msg_id: true, # MQPMO_NEW_MSG_ID
677
+ * new_correl_id: true, # MQPMO_NEW_CORREL_ID
678
+ * fail_if_quiescing: true, # MQOO_FAIL_IF_QUIESCING
679
+ * options: WMQ::MQPMO_FAIL_IF_QUIESCING # MQPMO_*
679
680
  * )
680
681
  *
681
682
  * Mandatory Parameters
@@ -751,7 +752,7 @@ VALUE QueueManager_begin(VALUE self)
751
752
  *
752
753
  * * :options => Fixnum (Advanced MQ Use only)
753
754
  * * Numeric field containing any of the MQ Put message options or'd together
754
- * * E.g. :options => WMQ::MQPMO_PASS_IDENTITY_CONTEXT | WMQ::MQPMO_ALTERNATE_USER_AUTHORITY
755
+ * * E.g. options: WMQ::MQPMO_PASS_IDENTITY_CONTEXT | WMQ::MQPMO_ALTERNATE_USER_AUTHORITY
755
756
  * * Note: If :options is supplied, it is applied first, then the above parameters are
756
757
  * applied afterwards.
757
758
  * * One or more of the following values:
@@ -778,7 +779,7 @@ VALUE QueueManager_begin(VALUE self)
778
779
  *
779
780
  * Throws:
780
781
  * * WMQ::WMQException if comp_code == MQCC_FAILED
781
- * * Except if :exception_on_error => false was supplied as a parameter
782
+ * * Except if exception_on_error: false was supplied as a parameter
782
783
  * to QueueManager.new
783
784
  */
784
785
  VALUE QueueManager_put(VALUE self, VALUE hash)
@@ -1001,9 +1002,9 @@ static VALUE QueueManager_open_queue_each(VALUE parameters)
1001
1002
  * Example:
1002
1003
  * require 'wmq/wmq_client'
1003
1004
  *
1004
- * WMQ::QueueManager.connect(:q_mgr_name=>'REID', :connection_name=>'localhost(1414)') do |qmgr|
1005
- * qmgr.open_queue(:q_name=>'TEST.QUEUE', :mode=>:output) do |queue|
1006
- * queue.put(:data => 'Hello World')
1005
+ * WMQ::QueueManager.connect(q_mgr_name: 'REID', connection_name: 'localhost(1414)') do |qmgr|
1006
+ * qmgr.open_queue(q_name: 'TEST.QUEUE', mode: :output) do |queue|
1007
+ * queue.put(data: 'Hello World')
1007
1008
  * end
1008
1009
  * end
1009
1010
  */
@@ -1069,43 +1070,43 @@ static VALUE QueueManager_singleton_connect_ensure(VALUE self)
1069
1070
  * * Since the number of parameters can vary dramatically, all parameters are passed by name in a hash
1070
1071
  * * Summary of parameters and their WebSphere MQ equivalents:
1071
1072
  * WMQ::QueueManager.connect( # WebSphere MQ Equivalents:
1072
- * :q_mgr_name => 'queue_manager name',
1073
- * :exception_on_error => true, # n/a
1074
- * :connect_options => WMQ::MQCNO_FASTBATH_BINDING # MQCNO.Options
1073
+ * q_mgr_name: 'queue_manager name',
1074
+ * exception_on_error: true, # n/a
1075
+ * connect_options: WMQ::MQCNO_FASTBATH_BINDING # MQCNO.Options
1075
1076
  *
1076
- * :trace_level => 0, # n/a
1077
+ * trace_level: 0, # n/a
1077
1078
  *
1078
1079
  * # Common client connection parameters
1079
- * :channel_name => 'svrconn channel name', # MQCD.ChannelName
1080
- * :connection_name => 'localhost(1414)', # MQCD.ConnectionName
1081
- * :transport_type => WMQ::MQXPT_TCP, # MQCD.TransportType
1080
+ * channel_name: 'svrconn channel name', # MQCD.ChannelName
1081
+ * connection_name: 'localhost(1414)', # MQCD.ConnectionName
1082
+ * transport_type: WMQ::MQXPT_TCP, # MQCD.TransportType
1082
1083
  *
1083
1084
  * # Advanced client connections parameters
1084
- * :max_msg_length => 65535, # MQCD.MaxMsgLength
1085
- * :security_exit => 'Name of security exit', # MQCD.SecurityExit
1086
- * :send_exit => 'Name of send exit', # MQCD.SendExit
1087
- * :receive_exit => 'Name of receive exit', # MQCD.ReceiveExit
1088
- * :security_user_data => 'Security exit User data', # MQCD.SecurityUserData
1089
- * :send_user_data => 'Send exit user data', # MQCD.SendUserData
1090
- * :receive_user_data => 'Receive exit user data', # MQCD.ReceiveUserData
1091
- * :heartbeat_interval => 1, # MQCD.HeartbeatInterval
1092
- * :remote_security_id => 'Remote Security id', # MQCD.RemoteSecurityId
1093
- * :ssl_cipher_spec => 'SSL Cipher Spec', # MQCD.SSLCipherSpec
1094
- * :keep_alive_interval=> -1, # MQCD.KeepAliveInterval
1095
- * :mode_name => 'LU6.2 Mode Name', # MQCD.ModeName
1096
- * :tp_name => 'LU6.2 Transaction pgm name', # MQCD.TpName
1097
- * :user_identifier => 'LU 6.2 Userid', # MQCD.UserIdentifier
1098
- * :password => 'LU6.2 Password', # MQCD.Password
1099
- * :long_remote_user_id=> 'Long remote user identifier', # MQCD.LongRemoteUserId (Ptr, Length)
1100
- * :ssl_peer_name => 'SSL Peer name', # MQCD.SSLPeerName (Ptr, Length)
1085
+ * max_msg_length: 65535, # MQCD.MaxMsgLength
1086
+ * security_exit: 'Name of security exit', # MQCD.SecurityExit
1087
+ * send_exit: 'Name of send exit', # MQCD.SendExit
1088
+ * receive_exit: 'Name of receive exit', # MQCD.ReceiveExit
1089
+ * security_user_data: 'Security exit User data', # MQCD.SecurityUserData
1090
+ * send_user_data: 'Send exit user data', # MQCD.SendUserData
1091
+ * receive_user_data: 'Receive exit user data', # MQCD.ReceiveUserData
1092
+ * heartbeat_interval: 1, # MQCD.HeartbeatInterval
1093
+ * remote_security_id: 'Remote Security id', # MQCD.RemoteSecurityId
1094
+ * ssl_cipher_spec: 'SSL Cipher Spec', # MQCD.SSLCipherSpec
1095
+ * keep_alive_interval: -1, # MQCD.KeepAliveInterval
1096
+ * mode_name: 'LU6.2 Mode Name', # MQCD.ModeName
1097
+ * tp_name: 'LU6.2 Transaction pgm name', # MQCD.TpName
1098
+ * user_identifier: 'LU 6.2 Userid', # MQCD.UserIdentifier
1099
+ * password: 'LU6.2 Password', # MQCD.Password
1100
+ * long_remote_user_id: 'Long remote user identifier', # MQCD.LongRemoteUserId (Ptr, Length)
1101
+ * ssl_peer_name: 'SSL Peer name', # MQCD.SSLPeerName (Ptr, Length)
1101
1102
  *
1102
1103
  * # SSL Options
1103
- * :key_repository => '/var/mqm/qmgrs/.../key', # MQSCO.KeyRepository
1104
- * :crypto_hardware => 'GSK_ACCELERATOR_NCIPHER_NF_ON', # MQSCO.CryptoHardware
1104
+ * key_repository: '/var/mqm/qmgrs/.../key', # MQSCO.KeyRepository
1105
+ * crypto_hardware: 'GSK_ACCELERATOR_NCIPHER_NF_ON', # MQSCO.CryptoHardware
1105
1106
  * )
1106
1107
  *
1107
1108
  * Optional Parameters
1108
- * * :q_mgr_name => String
1109
+ * * q_mgr_name: String
1109
1110
  * * Name of the existing WebSphere MQ Queue Manager to connect to
1110
1111
  *
1111
1112
  * * Default:
@@ -1171,6 +1172,12 @@ static VALUE QueueManager_singleton_connect_ensure(VALUE self)
1171
1172
  * * Default Value:
1172
1173
  * WMQ::MQXPT_TCP
1173
1174
  *
1175
+ * * :use_system_connection_data => Boolean
1176
+ * * Used when you want to initialise a client connection, but you want
1177
+ * * to obtain the connection_name and channel_name from one of the system
1178
+ * * configuration methods. These being: mqclient.ini file, MQSERVER ENV
1179
+ * * variable or CCDT.
1180
+ *
1174
1181
  * For the Advanced Client Connection parameters, please see the WebSphere MQ documentation
1175
1182
  *
1176
1183
  * Note:
@@ -1188,13 +1195,13 @@ static VALUE QueueManager_singleton_connect_ensure(VALUE self)
1188
1195
  * require 'wmq/wmq_client'
1189
1196
  *
1190
1197
  * WMQ::QueueManager.connect(
1191
- * :channel_name => 'SYSTEM.DEF.SVRCONN',
1192
- * :transport_type => WMQ::MQXPT_TCP,
1193
- * :connection_name => 'localhost(1414)' ) do |qmgr|
1194
- * qmgr.open_queue(:q_name=>'TEST.QUEUE', :mode=>:input) do |queue|
1198
+ * channel_name: 'SYSTEM.DEF.SVRCONN',
1199
+ * transport_type: WMQ::MQXPT_TCP,
1200
+ * connection_name: 'localhost(1414)' ) do |qmgr|
1201
+ * qmgr.open_queue(q_name: 'TEST.QUEUE', mode: :input) do |queue|
1195
1202
  *
1196
1203
  * message = WMQ::Message.new
1197
- * if queue.get(:message => message)
1204
+ * if queue.get(message: message)
1198
1205
  * puts "Data Received: #{message.data}"
1199
1206
  * else
1200
1207
  * puts 'No message available'
@@ -1325,41 +1332,41 @@ static int QueueManager_execute_each (VALUE key, VALUE value, PQUEUE_MANAGER pqm
1325
1332
  * Example
1326
1333
  * WMQ::QueueManager.connect do |qmgr|
1327
1334
  * result = qmgr.execute(
1328
- * :command => :inquire_q,
1329
- * :q_name => 'MY.LOCAL.QUEUE',
1330
- * :q_type => WMQ::MQQT_LOCAL,
1331
- * :current_q_depth => nil
1335
+ * command: :inquire_q,
1336
+ * q_name: 'MY.LOCAL.QUEUE',
1337
+ * q_type: WMQ::MQQT_LOCAL,
1338
+ * current_q_depth: nil
1332
1339
  * )
1333
1340
  * # OR, we can replace the method name execute with the MQAI command:
1334
1341
  * result = qmgr.inquire_q(
1335
- * :q_name => 'MY.LOCAL.QUEUE',
1336
- * :q_type => WMQ::MQQT_LOCAL,
1337
- * :current_q_depth => nil
1342
+ * q_name: 'MY.LOCAL.QUEUE',
1343
+ * q_type: WMQ::MQQT_LOCAL,
1344
+ * current_q_depth: nil
1338
1345
  * )
1339
1346
  *
1340
1347
  * Complete Example:
1341
1348
  * require 'wmq/wmq'
1342
1349
  * require 'wmq/wmq_const_admin'
1343
- * WMQ::QueueManager.connect(:q_mgr_name=>'REID', :connection_name=>'localhost(1414)') do |qmgr|
1344
- * qmgr.reset_q_stats(:q_name=>'*').each {|item| p item }
1350
+ * WMQ::QueueManager.connect(q_mgr_name: 'REID', connection_name: 'localhost(1414)') do |qmgr|
1351
+ * qmgr.reset_q_stats(q_name: '*').each {|item| p item }
1345
1352
  * end
1346
1353
  *
1347
1354
  * Some one line examples
1348
- * qmgr.inquire_q(:q_name=>'TEST*').each {|item| p item }
1355
+ * qmgr.inquire_q(q_name: 'TEST*').each {|item| p item }
1349
1356
  *
1350
- * qmgr.inquire_q(:q_name=>'TEST*', :q_type=>WMQ::MQQT_LOCAL, :current_q_depth=>nil).each {|item| p item }
1357
+ * qmgr.inquire_q(q_name: 'TEST*', q_type: WMQ::MQQT_LOCAL, current_q_depth: nil).each {|item| p item }
1351
1358
  *
1352
- * qmgr.inquire_process(:process_name=>'*').each {|item| p item }
1359
+ * qmgr.inquire_process(process_name:'*').each {|item| p item }
1353
1360
  *
1354
1361
  * qmgr.ping_q_mgr.each {|item| p item }
1355
1362
  *
1356
1363
  * qmgr.refresh_security.each {|item| p item }
1357
1364
  *
1358
- * qmgr.inquire_q_status(:q_name=>'TEST*', :q_status_type=>:q_status, :q_status_attrs=>:process_id).each {|item| p item }
1365
+ * qmgr.inquire_q_status(q_name: 'TEST*', q_status_type: :q_status, q_status_attrs: :process_id).each {|item| p item }
1359
1366
  *
1360
1367
  * qmgr.start_channel_listener.each {|item| p item }
1361
1368
  *
1362
- * qmgr.inquire_channel_status(:channel_name=>'*').each {|item| p item }
1369
+ * qmgr.inquire_channel_status(channel_name: '*').each {|item| p item }
1363
1370
  */
1364
1371
  VALUE QueueManager_execute(VALUE self, VALUE hash)
1365
1372
  {
data/lib/wmq/message.rb CHANGED
@@ -17,45 +17,47 @@ module WMQ
17
17
  # * The format of any header should not be supplied in the descriptor or any header
18
18
  #
19
19
  # Message has the following attributes:
20
+ #
20
21
  # * descriptor = {
21
- # # WebSphere MQ Equivalent
22
- # :format => WMQ::MQFMT_STRING, # MQMD.Format - Format of data only
23
- # WMQ::MQFMT_NONE # Do not supply header formats here
24
- # :original_length => Number # MQMD.OriginalLength
25
- # :priority => 0 .. 9 # MQMD.Priority
26
- # :put_time => String # MQMD.PutTime
27
- # :msg_id => String ...
28
- # :expiry => Number
29
- # :persistence => Number
30
- # :reply_to_q => String
31
- # :correl_id => String
32
- # :feedback => Number
33
- # :offset => Number
34
- # :report => Number
35
- # :msg_flags => Number
36
- # :reply_to_q_mgr => String
37
- # :appl_identity_data => String
38
- # :put_appl_name => String
39
- # :user_identifier => String
40
- # :msg_seq_number => Number
41
- # :appl_origin_data => String
42
- # :accounting_token => String
43
- # :backout_count => Number
44
- # :coded_char_set_id => Number
45
- # :put_appl_type => Number
46
- # :msg_type => Number
47
- # :group_id => String
48
- # :put_date => String
49
- # :encoding => Number
50
- # }
51
- # * data => String
52
- # * headers => Array of Hashes
22
+ # # WebSphere MQ Equivalent
23
+ # format: WMQ::MQFMT_STRING, # MQMD.Format - Format of data only
24
+ # WMQ::MQFMT_NONE # Do not supply header formats here
25
+ # original_length: Number, # MQMD.OriginalLength
26
+ # priority: 0 .. 9, # MQMD.Priority
27
+ # put_time: String, # MQMD.PutTime
28
+ # msg_id: String, # ...
29
+ # expiry: Number,
30
+ # persistence: Number,
31
+ # reply_to_q: String,
32
+ # correl_id: String,
33
+ # feedback: Number,
34
+ # offset: Number,
35
+ # report: Number,
36
+ # msg_flags: Number,
37
+ # reply_to_q_mgr: String,
38
+ # appl_identity_data: String,
39
+ # put_appl_name: String,
40
+ # user_identifier: String,
41
+ # msg_seq_number: Number,
42
+ # appl_origin_data: String,
43
+ # accounting_token: String,
44
+ # backout_count: Number,
45
+ # coded_char_set_id: Number,
46
+ # put_appl_type: Number,
47
+ # msg_type: Number,
48
+ # group_id: String,
49
+ # put_date: String,
50
+ # encoding: Number
51
+ # }
52
+ #
53
+ # * data: String
54
+ # * headers: Array<Hash>
53
55
  # * Note: Do not supply the format of any header. Ruby WMQ does this for you.
54
56
  #
55
57
  # The following headers are supported:
56
58
  # * Rules And Formatting Header (RFH)
57
- # :header_type => :rf_header
58
- # :....
59
+ # header_type: :rf_header
60
+ # ....
59
61
  # * Rules and Formatting V2 Header (RFH2)
60
62
  # ....
61
63
  # * Dead Letter Header