Author |
Message
|
AviD |
Posted: Fri Sep 28, 2007 5:31 am Post subject: WMB 6.0.0.3 - JavaCompute Nodes and Properties Files |
|
|
Acolyte
Joined: 06 Apr 2004 Posts: 62
|
How do you alter the classpath in WMB to include a directory for the properties files used in a message flow that uses a JavaCompute node?
Is there a best practice for utilizing properties files in WMB's JC nodes? |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Sep 28, 2007 5:53 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I'm not sure it's best practices TO use properties files with JCNs in Broker.
It's probably a better idea to use UserDefinedProperties.
That said, if you include them in the JAR file for the JCN, then you should be okay and not have to mess around with the classpath at all. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
AviD |
Posted: Fri Sep 28, 2007 6:50 am Post subject: |
|
|
Acolyte
Joined: 06 Apr 2004 Posts: 62
|
Jeff:
Thanks for the quick response.
Well, when it comes to logging in JCs, I am using the MbService logging methods to do so...which require a ResourceBundle (properties file), and key (amongst other things).
Not finding a ton of documentation or code samples on the usage of the MbService...so feeling it out as I go.
When you say mess around with the classpath...where is it? Are you saying at the OS level? Or is there a specific application classpath parameter that is part of the broker or even message flow that I can configure? |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Sep 28, 2007 7:32 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Ah! You're trying to create your own message catalog. Most discussion on this is likely buried in the docs on developing User Defined Extensions.
Again, that resource bundle should be available if it's in the jar for your JCN. Or you can put it in <workpath>/shared-classes and reboot broker. Then you'll only deploy it once.
You can, of course, configure lil directories using mqsichangebroker. But again, it's best not to mess around with CLASSPATHs. For flow specific things, stick them in a JAR in the BAR. For EG/broker common things, stick them in shared-classes. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
AviD |
Posted: Fri Sep 28, 2007 7:36 am Post subject: |
|
|
Acolyte
Joined: 06 Apr 2004 Posts: 62
|
Ahhh OK, this is what I needed...
Quote: |
Or you can put it in <workpath>/shared-classes and reboot broker. Then you'll only deploy it once.
|
I'll do it that way because the properties files won't change for the most part once they are put in place...and there is one that has environment specific values in it...so I don't want to keep editing that every time I promote a BAR.
I'll give the shared-classes and a broker reboot a try and see how it goes!
Thanks again. |
|
Back to top |
|
 |
AviD |
Posted: Mon Oct 01, 2007 11:10 am Post subject: |
|
|
Acolyte
Joined: 06 Apr 2004 Posts: 62
|
Odd results...put the properties files under the share-classes folder and it wound up hanging the entire flow after a restart.
I'm not sure where to look for errors, but there was nothing in the syslog, and even my trace files weren't being output from the flow.
Any ideas on why it would hang the flow when you add properties files to the shared-classes folder? Even if I redeploy an older flow (not using the JCN) that flow doesn't work.
I deleted the properties files, restarted the broker, and now the old flow works fine. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Oct 01, 2007 11:37 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Put it in a jar file and add THAT to shared-classes. It's probably somehow trying to be loaded as a class file even though it's not. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
AviD |
Posted: Mon Oct 01, 2007 12:49 pm Post subject: |
|
|
Acolyte
Joined: 06 Apr 2004 Posts: 62
|
Thanks again jeff..that did it. |
|
Back to top |
|
 |
sumitha |
Posted: Fri May 23, 2008 9:16 pm Post subject: |
|
|
Newbie
Joined: 22 May 2008 Posts: 5
|
HI ,
I'm using a JavaCompute Node in my message flow. But I'm getting the below error while testing it and the message is put to the failure Q.
Error message : BIP2231E: The message has been augmented with an exception list and has been propagated to the node's failure terminal for further processing.
See the following messages for details of the error.
RecoverableException BIP4376S: Unable to locate resource bundle 'requestmessages'.
The Java resource bundle could not be found by the Java API framework.
Make sure the Java resource bundle is in the CLASSPATH and restart the broker.
requestmessage is a class present in the javacode of the Javacompute node which extends ListResourceBundle
I could not understand what classpath needs to be set for the resource bundle to work. i tred creating a separate jar file for the 'requestmessages' and putting it in shared-calsses, but even this didnt work. Pllease help me out to resolve this. |
|
Back to top |
|
 |
Esa |
Posted: Wed May 28, 2008 11:05 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
AviD wrote: |
Jeff:
Thanks for the quick response.
Well, when it comes to logging in JCs, I am using the MbService logging methods to do so...which require a ResourceBundle (properties file), and key (amongst other things).
Not finding a ton of documentation or code samples on the usage of the MbService...so feeling it out as I go.
When you say mess around with the classpath...where is it? Are you saying at the OS level? Or is there a specific application classpath parameter that is part of the broker or even message flow that I can configure? |
Hey,
The properties files needed by MbService are used for localized messages. They should be put in <broker install directory>/messages. Or you could use the properties files already there. I am actually using "BIPv500" for properties and "2004" for message for all my log entries.
Esa |
|
Back to top |
|
 |
|