Author |
Message
|
hornbeam123 |
Posted: Thu Mar 17, 2011 5:51 am Post subject: wbimb 7 - ia9c getenv |
|
|
Centurion
Joined: 01 Nov 2003 Posts: 101
|
I have copied files into normal places restarted broker and cleaned all projects in toolkit but all flows with this node are getting can not locate errors on the in terminals.
C:\Program Files\IBM\WMBT700\plugins\com.ibm.supportpacs.GetEnv\
C:\Program Files\IBM\MQSI\7.0\jplugin\GetEnvNode.jar
What am I doing wrong?
Is it supported at wbimb 7?
If not any suggestions on how I can retrieve os envars? |
|
Back to top |
|
 |
lancelotlinc |
Posted: Thu Mar 17, 2011 6:30 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
hornbeam123 |
Posted: Thu Mar 17, 2011 7:54 am Post subject: wbimb 7 - ia9c getenv |
|
|
Centurion
Joined: 01 Nov 2003 Posts: 101
|
Sir I assume you mean Java compute node. Have you written such a node to do this?
We use this getenv node for most of our flows to determine whether an audit trail is required. I realise this capability is there in v7 but we would have to change every flow.
Anybody out there say why this is not available for wbimb 7? |
|
Back to top |
|
 |
lancelotlinc |
Posted: Thu Mar 17, 2011 8:21 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Here again is the precise reason why not to include custom nodes in flows. When comes time to support the functionality, you are left high and dry. No way to expeditiously migrate your flows up the version chain.
>> Anybody out there say why this is not available for wbimb 7?
http://www-01.ibm.com/support/docview.wss?uid=swg24011189
Quote: |
Software version: 6.0, 6.1 |
ftp://public.dhe.ibm.com/software/integration/support/supportpacs/individual/ia9c.pdf
Quote: |
This SupportPac supplies a WebSphere Business Integration Message Broker plug-in node that provides access to system environment variables, Java properties and message broker environment variables. |
Why would someone need a custom node to do what you can do natively in a Java Compute Node? This use of this custom node unnecessarily complicates an otherwise simple design. If you read the fine print, something about "fitness to a particular purpose" is written there. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Mar 17, 2011 8:46 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Perhaps they don't have Java skills unlike your good self?
A Support pack does save a lot of time in certain circumstances....
Remember that a lot of the now built-in nodes started life as a support pack _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Mar 17, 2011 8:53 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
What values are set in the command shell Environment that you need to load from a flow? Can you not load those as User Defined Properties instead?
In all cases of a SupportPac that does not work, you should follow the process mentioned in the SupportPac documentation for getting assistance.
For cat-2 SupportPacs this usually means contact the author. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Thu Mar 17, 2011 8:57 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Very good point davies.
There are valuable things that custom nodes can do. Making an inquiry to get a system environment variable seems like its not one of those things.
Code: |
import java.util.Map;
public class EnvMap {
public myGetEnv() {
Map<String, String> env = System.getenv();
for (String envName : env.keySet()) {
System.out.format("%s=%s%n", envName, env.get(envName));
}
}
}
|
If a custom node would replace some difficult Java, I would see the value. But its hardly worth the effort for a few lines... _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
hornbeam123 |
Posted: Thu Mar 17, 2011 10:01 am Post subject: wbimb 7 - ia9c getenv |
|
|
Centurion
Joined: 01 Nov 2003 Posts: 101
|
Well we do have some Java skills but when there was something off the shelf we took it which I did a few years back! Java node probably not available then as a built-in node, if I recall it was a support pack!! As davies says.
I will attempt to contact the author of the IA9C support pack.
Thanks Sir Lancelot for supplying the snippet.
Jeff inside our 'mqsi' shell script invoked from .mqm profile we set envars such as below:-
FLOW_XYZ_AUDIT=NO
export FLOW_XYZ_AUDIT
In a FILTER node we would code
RETURN Environment.ENV."FLOW_XYZ_AUDIT" <> ''
AND Environment.ENV."FLOW_XYZ_AUDIT" = 'YES' ;
If true the next node is likely to be a TRACE node where we write to a flat file relevant 'mqsi' information. If false no audit written. Been invaluable I can tell you.
The only drawback is that to change the value and reflect in a flow we have to bounce the broker. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Mar 17, 2011 10:06 am Post subject: Re: wbimb 7 - ia9c getenv |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
hornbeam123 wrote: |
The only drawback is that to change the value and reflect in a flow we have to bounce the broker. |
You can dynamically change User Defined Properties using the Admin API (CMP API) and not have to bounce anything...  |
|
Back to top |
|
 |
lancelotlinc |
Posted: Thu Mar 17, 2011 10:20 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Your stuck in 1955 with Michael J. Fox and the professor. (Man, I still have the hots for Lea Thompson... she's a doll.)
You should be using log4j to do logging, not trace nodes. Net performance increase about 1 percent comparatively between the two.
You should be using JMX to instrument your code to make on-the-fly adjustments to your functionality.
You should not be using environment variable to influence your functionality.
You should not be using Trace nodes in production. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Mar 17, 2011 10:49 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
The issue here is has nowt to do with Log4j vs trace nodes.
It is to do with setting params for a flow at runtime.
Many people who come to work on Broker have come from a Java background.
As most readers here are well aware, in the Java world they use properties files to do this. They come to broker and want to use this (imho highly dubious practice but there again I'm not a Java dev so what do I know eh?) method in their flows.
If you scan this forum you will see a number of points just like this one.
The point that mqjeff made about using the cmpapi and a user defined property is a good one and has its merits. I happen to disagree with using it in a production environment it but that is just my opinion.
I prefer to have a table in a db that every flow reads for its service variables. If you use a shared row (or its Java equivalent) and refresh the data held in the shared row periodically with a timernode you have a really good (IMHO) solution to the 'I want to use a properties file like I do in Java' problem. As everything is in a table you can apply updates to one or more flow property sets in one go.
That is one solution. There are others.
The simple bit of Java code posted by lancelotlinc might be all that the OP needed. There again it might not but that is what makes this forum so great. There are often lots of options for solutions presented. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
mgk |
Posted: Thu Mar 17, 2011 12:22 pm Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
It seems that several of us are stuck in the past
Quote: |
You should not be using Trace nodes in production. |
Although this was true for many releases, trace nodes can now (from V7) be left in production flows and "enabled" by the admin when needed. And when left in the flow as "off" I believe there is minimal overhead (almost no impact) on the flows performance.
Kind 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 |
|
 |
hornbeam123 |
Posted: Thu Mar 17, 2011 3:25 pm Post subject: wbimb 7 - ia9c getenv |
|
|
Centurion
Joined: 01 Nov 2003 Posts: 101
|
Well what an interesting debate my little problem has sparked off. I do tend to side with the view shared by my learned colleagues who support our use of what has been an effective support pack for us rather than jump into a re-engineering with java solutions.
I don't think we have been old fashioned just pragmatic, besides MQSI as it was in the dark ages, wasn't around in 1955!
As for tracing in production, whether TRACE node is more efficient in wbimb 7, we have turned most of the audit trails off by setting the envar to OFF as shown but the node and the filter test remains should problems arise (and they do) when we then set the envar to on.
In our test systems their use is invaluable.
Incidentally the support pack execution jar continues to work with wbimb 7 but it is the toolkit that does not recognise the node, therefore as it stands I would be unable to change any of the flows that use this getenv facility.
Now contacting the author could be problematic as the name is not listed in the support pack pdf. I have a vague recollection that a couple of years ago I did manage to trace him (excuse the pun) and he was quite helpful. Anybody out there from IBM appreciate some help in re-locating him.
Jeff would appreciate some pointers into where to find the information on User Defined Properties using the Admin API (CMP API) .
Unless the hole is plugged by making this support pack work for wbimb 7, I will have to come up with a new solution and change every flow that uses the getenv node. Ouch. If that was the case I would probably consider a dB lookup table keyed on broker name and envar name actually easier to maintain and more dynamic but alas bearing in mind all the test environments we have a nightmare to setup.
Meanwhile I'm stuck.
I thank you all for your input. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Mar 18, 2011 2:57 am Post subject: Re: wbimb 7 - ia9c getenv |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
hornbeam123 wrote: |
Now contacting the author could be problematic as the name is not listed in the support pack pdf. I have a vague recollection that a couple of years ago I did manage to trace him (excuse the pun) and he was quite helpful. Anybody out there from IBM appreciate some help in re-locating him. |
I'll point him in the direction of this thread. There is a name mentioned on the supportPac's page.
hornbeam123 wrote: |
Jeff would appreciate some pointers into where to find the information on User Defined Properties using the Admin API (CMP API) . |
Start here.
hornbeam123 wrote: |
Unless the hole is plugged by making this support pack work for wbimb 7, |
If it's just the Toolkit representation, then this may be relatively easy to fix for the author. It's probably just a change in the eclipse version that has caused the plugins to not be identified as supporting the current version of eclipse. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Mar 18, 2011 3:09 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Also please note that there *is* a Feedback section on the bottom of all of the individual SupportPac pages. Anything submitted there does get sent to the team that manages the SupportPac process, and they will forward SupportPac specific information to the responsible party.
But make sure you include your email address if you want a response! |
|
Back to top |
|
 |
|