Author |
Message
|
mapa |
Posted: Mon Aug 08, 2011 3:17 am Post subject: mqsiapplybaroverride and Version (MQSI_VERSION) |
|
|
 Master
Joined: 09 Aug 2001 Posts: 257 Location: Malmö, Sweden
|
I just can't seem to figure out how to use mqsiapplybaroverride to set the version for my message flow.
Or is it so that it is only properties that are listed as ConfigurableProperty that you can override with mqsiapplybaroverride?
The version is in the <longDesc/><version value="$MQSI_VERSION=1.0 MQSI$"/> in the flow.cmf
Can't find any example of setting version for some reason either trying MQSeries.net and IBM Information Center.
In my test I've set the default version in the WMBT to 1.0.
(Eclipse -> Preferences -> Broker Development -> Message Flow Editor -> Default version tag: 1.0)
using mqsireadbar:
Code: |
E:\temp\barfiles>mqsireadbar -b test.bar
BIP1051I: Reading Bar file using toolkit mqsireadbar...
test.bar:
MyVersionTestFlow.cmf (2011-08-05 15:59):
VERSION = 1.0
Deployment descriptor:
MyVersionTestFlow#additionalInstances
..
MyVersionTestFlow#MQInput.componentLevel
BIP8071I: Successful command completion.
|
using mqsiapplybaroverride:
Code: |
E:\temp\barfiles>mqsiapplybaroverride -b test.bar -m "MyVersionTestFlow#VERSION=
1.1" -o test_o.bar -v trace.txt
|
Checking result with mqsireadbar:
Code: |
E:\temp\barfiles>mqsireadbar -b test_o.bar
BIP1051I: Reading Bar file using toolkit mqsireadbar...
test_o.bar:
MyVersionTestFlow.cmf (2011-08-05 16:24):
VERSION = 1.0
Deployment descriptor:
MyVersionTestFlow#additionalInstances
..
MyVersionTestFlow#MQInput.componentLevel
MyVersionTestFlow#VERSION = 1.1
BIP8071I: Successful command completion.
|
When deployed the flow has the property Version 1.0 visible in the WMBT.
I am using WMB 6.1.0.8 on Windows.
What am I doing wrong? |
|
Back to top |
|
 |
marko.pitkanen |
Posted: Mon Aug 08, 2011 3:43 am Post subject: |
|
|
 Chevalier
Joined: 23 Jul 2008 Posts: 440 Location: Jamsa, Finland
|
|
Back to top |
|
 |
mapa |
Posted: Mon Aug 08, 2011 3:50 am Post subject: Info center |
|
|
 Master
Joined: 09 Aug 2001 Posts: 257 Location: Malmö, Sweden
|
I've read that section and the list you provided lists the configurable properties of the flow nodes.
I am trying to set the flow version and wonder if that is possible.
How to override parameters like queue name etc I know how to do and that works fine. |
|
Back to top |
|
 |
marko.pitkanen |
Posted: Mon Aug 08, 2011 3:55 am Post subject: |
|
|
 Chevalier
Joined: 23 Jul 2008 Posts: 440 Location: Jamsa, Finland
|
Hi,
From this clause we can perhaps conclude that only properties from the broker.xml can be changed.
Quote: |
...specifying the location of your broker archive deployment descriptor (typically broker.xml) and the file that contains the properties to be changed. See mqsiapplybaroverride for..
|
--
Marko |
|
Back to top |
|
 |
mapa |
Posted: Mon Aug 08, 2011 4:02 am Post subject: |
|
|
 Master
Joined: 09 Aug 2001 Posts: 257 Location: Malmö, Sweden
|
Yes, I think we can, that is consistent with all the possible alternatives I've tried.
I guess it will be sed to the rescue once again then...
Thanks. |
|
Back to top |
|
 |
marko.pitkanen |
Posted: Mon Aug 08, 2011 4:14 am Post subject: |
|
|
 Chevalier
Joined: 23 Jul 2008 Posts: 440 Location: Jamsa, Finland
|
BTW What is you goal?
If you are using version control for your flow resources (cvs, svn) you can use MQSI -keywords with keyword substitution function (for example for svn add $MQSI_VERSION=$id$MQSI$ and enable keyword "id" for our resource and Default keyword substitution for your toolkit ) of the Toolkit and get correct version information to the resources's runtime information.
--
Marko |
|
Back to top |
|
 |
mapa |
Posted: Mon Aug 08, 2011 4:54 am Post subject: |
|
|
 Master
Joined: 09 Aug 2001 Posts: 257 Location: Malmö, Sweden
|
That is my goal, to get Subversion info into the artifacts automatically.
Seem as if I have missed something vital.
I will follow up on your suggestion.
Thank you very much for your feedback. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Aug 08, 2011 5:03 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mapa wrote: |
Seem as if I have missed something vital. |
mapa wrote: |
I will follow up on your suggestion. |
I can vouch for it.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mapa |
Posted: Mon Aug 08, 2011 6:49 am Post subject: |
|
|
 Master
Joined: 09 Aug 2001 Posts: 257 Location: Malmö, Sweden
|
Hmm, a little embarrassing that I have missed this all these years
My first attempt was to do this:
Code: |
C:\Documents and Settings\myusername\Application Data\Subversion\config
[miscellany]
enable-auto-props = yes
[auto-props]
*.esql = svn:keywords=Date Revision Author Id
*.java = svn:keywords=Date Revision Author Id
*.msgflow = svn:keywords=Date Revision Author Id
*.mset = svn:keywords=Date Revision Author Id
*.properties = svn:keywords=Date Revision Author Id
|
And then this in the Long description of the flow:
Code: |
$MQSI_$Id:$:$MQSI
$MQSI_$Revision:$:$MQSI
$MQSI_$Date:$:$MQSI
$MQSI_$Author:$:$MQSI
|
After commit, it was updated in WMBT with:
Code: |
$MQSI_$Id: MyVersionTestFlow.msgflow 150065 2011-08-08 14:40:51Z magnus.palmer $:$MQSI
$MQSI_$Revision: 150065 $:$MQSI
$MQSI_$Date: 2011-08-08 16:40:51 +0200 (må, 08 aug 2011) $:$MQSI
$MQSI_$Author: magnus.palmer $:$MQSI
|
Only problem now is that it appears as one long keyword instead of several keywords when looking at properties in the WMBT Broker Administration.
Well one important step in the right direction at least. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Aug 08, 2011 6:58 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mapa wrote: |
Only problem now is that it appears as one long keyword instead of several keywords when looking at properties in the WMBT Broker Administration. |
Well that's what the "Id" value resolves to out of SubVersion - effectively a lot of keywords concatinated together for your convienience.
But you can split & format this as you see fit; it's the principle that matters & that seems to be working out for you.
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mapa |
Posted: Mon Aug 08, 2011 7:14 am Post subject: |
|
|
 Master
Joined: 09 Aug 2001 Posts: 257 Location: Malmö, Sweden
|
Yes, using Id for version will be sufficient.
Thanks. |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Mon Aug 08, 2011 7:20 am Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
FWIW, I prefer HeadURL (provided you ensure that only tagged components get released to environments after dev which I dont think is a daft requirement).
I use:
Code: |
-- $MQSI Version = $HeadURL$ MQSI$ |
This allows you to use a meaningful version number for your components rather than the harder to interpret SVN internal versioning number.
Just my two pennies. |
|
Back to top |
|
 |
mapa |
Posted: Mon Aug 08, 2011 10:35 pm Post subject: |
|
|
 Master
Joined: 09 Aug 2001 Posts: 257 Location: Malmö, Sweden
|
Thanks for all the help.
This is what I will implement as a requirement when deploying to production:
Code: |
$MQSI_VERSION = $Id:$: MQSI$
$MQSI SVN-URL = $URL:$: MQSI$
|
|
|
Back to top |
|
 |
marko.pitkanen |
Posted: Mon Aug 08, 2011 11:10 pm Post subject: |
|
|
 Chevalier
Joined: 23 Jul 2008 Posts: 440 Location: Jamsa, Finland
|
Hi,
Beware of that if you add these keywords to all your resources which will be compiled into bar you perhaps need unique keywords ( like $MQSI uniquekeyword = $Id:$: MQSI$ ) for all of them to get them visible at runtime.
--
Marko |
|
Back to top |
|
 |
deepak_paul |
Posted: Sun Nov 20, 2011 4:31 pm Post subject: |
|
|
Centurion
Joined: 04 Oct 2008 Posts: 147 Location: US
|
mapa wrote: |
Thanks for all the help.
This is what I will implement as a requirement when deploying to production:
Code: |
$MQSI_VERSION = $Id:$: MQSI$
$MQSI SVN-URL = $URL:$: MQSI$
|
|
When you write in long description as above, you will see something like this after deployment,
Code: |
Property/Values
Keywords
VERSION / $Id: user:$: MQSI$
SVN-URl / $URL: <some_svn_url> :$: MQSI$
|
Is there a way we can see only values in the values section instead of SubVersion property and values?
That would be nice. _________________ Regards
Paul |
|
Back to top |
|
 |
|