Author |
Message
|
MQSIGuy |
Posted: Fri Nov 27, 2009 2:15 am Post subject: Accessing Source Controlled Version of Broker Components |
|
|
Novice
Joined: 26 Oct 2009 Posts: 20
|
Hello,
I am trying to find out if it is possible to access the version of a flow and esql at runtime. The purpose may be to store this as part of an audit log for example.
So, in each of our ESQL files we use the $MQSI £_FlowName_Version = MQSI$ command which is updated by the developer each time a change is made. This version will match the source control version when checked back in and is what is displayed when viewing a flow through on an exec group using the toolkit. We do the same for message flows but use a passthru node to declare the value above and version.
The question is can these values be accessed at runtime and stored to a DB for example?
I've googled, searched MQseries and found a few people with the same question which never seems to be answered.
This post come slightly close but not what we're actually trying to do -p=245848&highlight=&sid=52b364799736155787529cc137b1119a'
Any help would be appreciated or a simple yes/no, so I can stop wasting my time if that's what i'm doing  |
|
Back to top |
|
 |
Gaya3 |
Posted: Fri Nov 27, 2009 2:38 am Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
i dont think it is possible, to retrive details from CVS.
thats the reason IBM has launced a product called WSRR.
Use this with your MB _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
mqmatt |
Posted: Fri Nov 27, 2009 4:07 am Post subject: |
|
|
 Grand Master
Joined: 04 Aug 2004 Posts: 1213 Location: Hursley, UK
|
You have access to all these key/value pairs through the CMP; using this you can access them whenever you want, and do whatever you want with them, e.g. put the values in a database. |
|
Back to top |
|
 |
Gaya3 |
Posted: Fri Nov 27, 2009 5:19 am Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
mqmatt wrote: |
You have access to all these key/value pairs through the CMP; using this you can access them whenever you want, and do whatever you want with them, e.g. put the values in a database. |
but can we able to access winCVS or some versioning system through CMP. _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
MQSIGuy |
Posted: Fri Nov 27, 2009 6:00 am Post subject: |
|
|
Novice
Joined: 26 Oct 2009 Posts: 20
|
Thanks for the replies.
mqmatt, could you elaborate on this a little more? Are these values accesible at runtime though? So I have a flow which populates a sql insert statement. Can I access the version numbers within the same flow to add to the db?
mqmatt wrote: |
You have access to all these key/value pairs through the CMP; using this you can access them whenever you want, and do whatever you want with them, e.g. put the values in a database. |
thanks |
|
Back to top |
|
 |
mqmatt |
Posted: Fri Nov 27, 2009 6:59 am Post subject: |
|
|
 Grand Master
Joined: 04 Aug 2004 Posts: 1213 Location: Hursley, UK
|
Gaya3, for versioning systems that support macro expansion (e.g. CVS), you can embed keywords in your source, and these will get expanded when you check the source out. This will make the values accessible from the runtime. For example, $MQSI cvs_version=$id$ MQSI$.
MQSIGuy, You can use the CMP from within a JavaCompute node. Your JCN just needs to import the com.ibm.broker.config.proxy classes and access the runtime in the usual way.
Having said this, in V6.1 and earlier it is slightly clunky, as you'll be using the CMP to access the Config Manager from within the broker, but it does work and it will give you the keywords you're after. (In V7 you're going direct to the broker and there are new methods to make the integration between JavaCompute nodes and the CMP a lot better.) |
|
Back to top |
|
 |
MQSIGuy |
Posted: Fri Nov 27, 2009 7:27 am Post subject: |
|
|
Novice
Joined: 26 Oct 2009 Posts: 20
|
mqmatt wrote: |
Gaya3, for versioning systems that support macro expansion (e.g. CVS), you can embed keywords in your source, and these will get expanded when you check the source out. This will make the values accessible from the runtime. For example, $MQSI cvs_version=$id$ MQSI$.
MQSIGuy, You can use the CMP from within a JavaCompute node. Your JCN just needs to import the com.ibm.broker.config.proxy classes and access the runtime in the usual way.
Having said this, in V6.1 and earlier it is slightly clunky, as you'll be using the CMP to access the Config Manager from within the broker, but it does work and it will give you the keywords you're after. (In V7 you're going direct to the broker and there are new methods to make the integration between JavaCompute nodes and the CMP a lot better.) |
Thanks for the reply! I'm not quite sure if its worth bringing a JCN into the frame for this functionality but its good to understand a lot more about the situation.
Thanks again,
 |
|
Back to top |
|
 |
mgk |
Posted: Fri Nov 27, 2009 8:34 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Hi,
I've not tried this, but have you tried to follow the guidence in this topic in the info center: ac35430 "Adding keywords to ESQL files" where it suggests assigning it to a variable as in:
SET myVersion = '$MQSI_VERSION=$id$MQSI$' ;
once the information is in an ESQL variable you can use ESQL to put it in a DB etc...
Regards, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
|