Author |
Message
|
fjb_saper |
Posted: Wed Jul 18, 2018 6:03 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
dudetom wrote: |
@fjb_saper I tried setting the CCDTURL
_cf.SetStringProperty(XMSC.WMQ_CCDTURL, @"file://C:\" + ccdt);
But it has no effect, in the event viewer I always see it's searching for a file: 'C:\ProgramData\IBM\MQ\AMQCLCHL.TAB'. Even my filename is something else. I can conclude that the property I've set has no effect...
Is it because I'm using an older version of IBM MQ? I'm using 8.0.0.5. |
It is probably because you have the channel lib and channel tab environment variables set. Please unset them so that only the CCDT URL gets passed as property to your XMS connection factory.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
dudetom |
Posted: Wed Jul 18, 2018 9:19 pm Post subject: |
|
|
Apprentice
Joined: 29 Sep 2017 Posts: 45
|
I set them as a process environment variable. So they are deleted each time I shut down the app. I didn't use global variables. I'm pretty sure |
|
Back to top |
|
 |
hughson |
Posted: Wed Jul 18, 2018 11:56 pm Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
|
Back to top |
|
 |
dudetom |
Posted: Tue Jul 24, 2018 10:21 pm Post subject: |
|
|
Apprentice
Joined: 29 Sep 2017 Posts: 45
|
But I wrote here several times that environment variables only work if I configure only one CCDT file. I need to configure more than one CCDT file in one process (application). Environment variables aren't getting updated when changing the value.
I found a workaround with the property XMSC.WMQ_CCDTURL. When this is set, it looks for a default file in the default location (which is 'C:\ProgramData\IBM\MQ\AMQCLCHL.TAB'). What I do is, I substitute that default file with my custom file each time I'm making connection. After successful connection I rename it back to the original name. This way the right CCDT file is always being picked up. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jul 25, 2018 1:59 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
dudetom wrote: |
But I wrote here several times that environment variables only work if I configure only one CCDT file. I need to configure more than one CCDT file in one process (application). Environment variables aren't getting updated when changing the value.
I found a workaround with the property XMSC.WMQ_CCDTURL. When this is set, it looks for a default file in the default location (which is 'C:\ProgramData\IBM\MQ\AMQCLCHL.TAB'). What I do is, I substitute that default file with my custom file each time I'm making connection. After successful connection I rename it back to the original name. This way the right CCDT file is always being picked up. |
Great if this works for you! Thanks for sharing your solution!  _________________ MQ & Broker admin |
|
Back to top |
|
 |
gbaddeley |
Posted: Wed Jul 25, 2018 4:56 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
dudetom wrote: |
I found a workaround with the property XMSC.WMQ_CCDTURL. When this is set, it looks for a default file in the default location (which is 'C:\ProgramData\IBM\MQ\AMQCLCHL.TAB'). What I do is, I substitute that default file with my custom file each time I'm making connection. After successful connection I rename it back to the original name. This way the right CCDT file is always being picked up. |
What happens if there are multiple processes doing this?
What happens if the rename fails before or after the connection?
I doesn't seem to be a robust workaround.
Can the MQ connection parameters be specified in the ConnectionFactory / CreateQueue? (sorry, I am not very familiar with this MQI) _________________ Glenn |
|
Back to top |
|
 |
dudetom |
Posted: Wed Jul 25, 2018 10:00 pm Post subject: |
|
|
Apprentice
Joined: 29 Sep 2017 Posts: 45
|
MQ parameters can be set but compression is not supported, therefore I need to use CCDT.
I make connections synchronously during app init so there is no concurrent usage of these CCDT files.
What I didn't test is what happens if the connection tries reconnecting (I've set the property auto_reconnect to true)
I'm renaming using a try/finally block, so the restoring the name should always work. |
|
Back to top |
|
 |
gbaddeley |
Posted: Sun Jul 29, 2018 4:42 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
dudetom wrote: |
MQ parameters can be set but compression is not supported, therefore I need to use CCDT. |
When using CCDT, have you confirmed that the actual MQ channel packets are being compresed?
Quote: |
I make connections synchronously during app init so there is no concurrent usage of these CCDT files.
What I didn't test is what happens if the connection tries reconnecting (I've set the property auto_reconnect to true)
I'm renaming using a try/finally block, so the restoring the name should always work. |
Brave words! _________________ Glenn |
|
Back to top |
|
 |
|