@@ -84,7 +84,7 @@ First, let's send a message using nothing but pure Python code::
8484 queue1 = "TEST.1"
8585
8686 # The connection factory we're going to use.
87- factory = WebSphereMQConnectionFactory(qm_name, channel, host, listener_port)
87+ factory = WebSphereMQConnectionFactory(qm_name, channel, host, listener_port, needs_mcd=False )
8888
8989 # Every JmsTemplate uses a connection factory for actually communicating with a JMS provider.
9090 jms_template = JmsTemplate(factory)
@@ -110,6 +110,7 @@ be saved in::
110110 channel: SVRCONN.1
111111 host: 192.168.1.121
112112 listener_port: "1434"
113+ needs_mcd: False
113114
114115 - object: MyTemplate
115116 class: springpython.jms.core.JmsTemplate
@@ -162,7 +163,7 @@ examples do, they are repeated here for the sake of completness::
162163 queue1 = "TEST.1"
163164
164165 # The connection factory we're going to use.
165- factory = WebSphereMQConnectionFactory(qm_name, channel, host, listener_port)
166+ factory = WebSphereMQConnectionFactory(qm_name, channel, host, listener_port, needs_mcd=False )
166167
167168 # Every JmsTemplate uses a connection factory for actually communicating with a JMS provider.
168169 jms_template = JmsTemplate(factory)
@@ -189,6 +190,7 @@ that was used in the sending example::
189190 channel: SVRCONN.1
190191 host: 192.168.1.121
191192 listener_port: "1434"
193+ needs_mcd: False
192194
193195 - object: MyTemplate
194196 class: springpython.jms.core.JmsTemplate
@@ -233,6 +235,7 @@ fact of providing the configuration allows for receiving the messages::
233235 channel: SVRCONN.1
234236 host: 192.168.1.121
235237 listener_port: "1434"
238+ needs_mcd: False
236239
237240 - object: message_handler
238241 class: app.MyMessageHandler
@@ -406,6 +409,14 @@ of default values used::
406409| | client-repo.sth, then ssl_key_repository must be set |
407410| | to "/var/mqm/security/client-repo". |
408411+------------------------------+-------------------------------------------------------+
412+ | **needs_mcd ** | default: True |
413+ | + +
414+ | | Whether to add the *mcd * JMS folder to outgoing |
415+ | | messages. This defaults to True for |
416+ | | backward-compatibility reasons but should be always |
417+ | | set to False if working with WebSphere MQ 7.0 |
418+ | | or newer. |
419+ +------------------------------+-------------------------------------------------------+
409420
410421Here's an example of programatically creating a
411422:ref: `WebSphereMQConnectionFactory <jms-webspheremqconnectionfactory >` object::
@@ -417,7 +428,7 @@ Here's an example of programatically creating a
417428 host = "192.168.1.121"
418429 listener_port = "1434"
419430
420- factory = WebSphereMQConnectionFactory(qm_name, channel, host, listener_port)
431+ factory = WebSphereMQConnectionFactory(qm_name, channel, host, listener_port, needs_mcd=False )
421432
422433 # ... use factory here.
423434
@@ -437,6 +448,7 @@ inside of an IoC container::
437448 channel: SVRCONN.1
438449 host: 192.168.1.121
439450 listener_port: "1434"
451+ needs_mcd: False
440452
441453All cached queues will not be closed by a factory until after its .destroy will
442454have been called which will happen automatically if you're using an IoC container.
@@ -491,7 +503,7 @@ Here's how a JmsTemplate may be instantiated using Python code::
491503 host = "192.168.1.121"
492504 listener_port = "1434"
493505
494- factory = WebSphereMQConnectionFactory(qm_name, channel, host, listener_port)
506+ factory = WebSphereMQConnectionFactory(qm_name, channel, host, listener_port, needs_mcd=False )
495507 jms_template = JmsTemplate(factory)
496508
497509 # Always destroy the factory when not using IoC
@@ -509,6 +521,7 @@ An example of using YamlConfig to configure a JmsTemplate::
509521 channel: SVRCONN.1
510522 host: 192.168.1.121
511523 listener_port: "1434"
524+ needs_mcd: False
512525
513526 - object: jms_template
514527 class: springpython.jms.core.JmsTemplate
@@ -613,7 +626,7 @@ for encoding into UTF-8::
613626 queue1 = "TEST.1"
614627
615628 # The connection factory we're going to use.
616- factory = WebSphereMQConnectionFactory(qm_name, channel, host, listener_port)
629+ factory = WebSphereMQConnectionFactory(qm_name, channel, host, listener_port, needs_mcd=False )
617630
618631 # Every JmsTemplate uses a connection factory for actually communicating with a JMS provider.
619632 jms_template = JmsTemplate(factory)
@@ -679,7 +692,7 @@ destination can be specified for an outgoing message::
679692 queue1 = "TEST.1"
680693
681694 # The connection factory we're going to use.
682- factory = WebSphereMQConnectionFactory(qm_name, channel, host, listener_port)
695+ factory = WebSphereMQConnectionFactory(qm_name, channel, host, listener_port, needs_mcd=False )
683696
684697 # Every JmsTemplate uses a connection factory for actually communicating with a JMS provider.
685698 jms_template = JmsTemplate(factory)
@@ -714,7 +727,7 @@ jms_timestamp and jms_message_id properties::
714727 queue1 = "TEST.1"
715728
716729 # The connection factory we're going to use.
717- factory = WebSphereMQConnectionFactory(qm_name, channel, host, listener_port)
730+ factory = WebSphereMQConnectionFactory(qm_name, channel, host, listener_port, needs_mcd=False )
718731
719732 # Every JmsTemplate uses a connection factory for actually communicating with a JMS provider.
720733 jms_template = JmsTemplate(factory)
@@ -765,7 +778,7 @@ can explicitly specify the destination's name when you receive messages::
765778 queue2 = "TEST.2"
766779
767780 # The connection factory we're going to use.
768- factory = WebSphereMQConnectionFactory(qm_name, channel, host, listener_port)
781+ factory = WebSphereMQConnectionFactory(qm_name, channel, host, listener_port, needs_mcd=False )
769782
770783 # Every JmsTemplate uses a connection factory for actually communicating with a JMS provider.
771784 jms_template = JmsTemplate(factory)
@@ -831,7 +844,7 @@ default with Spring Python::
831844 exchange_queue = "TEST.1"
832845
833846 # The connection factory we're going to use.
834- factory = WebSphereMQConnectionFactory(qm_name, channel, host, listener_port)
847+ factory = WebSphereMQConnectionFactory(qm_name, channel, host, listener_port, needs_mcd=False )
835848
836849 requesting_side = JmsTemplate(factory)
837850 requesting_side.default_destination = exchange_queue
@@ -958,7 +971,7 @@ requests and responses using only one converter object::
958971 return invoice
959972
960973 # The connection factory we're going to use.
961- factory = WebSphereMQConnectionFactory(qm_name, channel, host, listener_port)
974+ factory = WebSphereMQConnectionFactory(qm_name, channel, host, listener_port, needs_mcd=False )
962975
963976 # Our JmsTemplate.
964977 jms_template = JmsTemplate(factory)
@@ -1058,6 +1071,7 @@ has been set::
10581071 channel: SVRCONN.1
10591072 host: 192.168.1.121
10601073 listener_port: "1434"
1074+ needs_mcd: False
10611075
10621076 - object: message_handler
10631077 class: app.MyMessageHandler
0 commit comments