I’ve been very quiet on this blog so far, due to other commitments. I hope to make more of a contribution from now on. Let’s make a start with a small Broker tip.
A little-known addition that went into fix pack 3 for WebSphere Message Broker (6.0.0.3) is that you can now select a Java 1.5 runtime in which to execute your JavaCompute and Java plugin nodes. You’ll find this mentioned in the Infocenter, under the topic on New function added in V6 fix packs. You don’t have to use the 1.5 JRE – by default, a 1.4.2 JRE is still supplied, but you can switch to the 1.5 JRE if you need to do so.
The way this works is very straightforward. In version 6 of WMB, the environment for the broker components is initialised by script called mqsiprofile - as in previous releases - but this is now extensible. You can add additional scripts to the <workpath>\common\profiles directory – by default, this is C:\Documents and Settings\All Users\Application Data\IBM\MQSI\common\profiles on Windows (watch out, this might be hidden in Windows Explorer), and /var/mqsi/common/profiles on Linux and UNIX systems. These additional scripts will be executed automatically when the mqsiprofile script is run.
The instructions for enabling support for Java 1.5 differ very slightly depending on the platform:
- On Windows, copy mqsijava15.cmd from the broker <install_dir>\bin directory to the <workpath>\common\profiles directory.
- On Linux and UNIX, copy mqsijava15.sh from the <install_dir>\bin to <workpath>\common\profiles.
Once you’ve copied the script across, you can restart your broker components (having already re-run the mqsiprofile script, if appropriate), and the change should be picked up.
If you do choose to move to the 1.5 JRE, then it would be a good idea to re-test any Java components that you have already developed, to ensure that there are no compatibility issues.
December 29, 2006 at 12:18 pm
[...] Java 5 in WebSphere Message Broker (tags: ibm wmb websphere java howto by:andy_piper) [...]
January 14, 2009 at 1:37 am
Your solution does nicely describe how to make the broker runtime use the JRE 1.5 runtime. However how do you make the broker toolkit use the JDK 1.5 compiler? I have a 6.0.0.3 broker, and I need to write a JavaCompute node that uses an API with Java Generics syntax, which in turn requires Java 1.5. Do I need to somehow upgrade the Toolkit 6.0 to JDK 1.5, or is there a way to export a jar file from the 6.1 toolkit that already has the JDK 1.5?
January 30, 2009 at 11:26 pm
To answer my own previous post, regarding how to make the WebSphere Message Broker Toolkit use the JDK 1.5 compiler: Simply upgrade to at least version 6.1 of the Toolkit. Then you can use the Windows/Preferences command, expand the ‘Java’ branch of the preferences tree on the left of the preferences dialog, and click on ‘Compiler’; you will see a drop-down box that lets you choose the ‘5.0′ (meaning 1.5.0) compiler. The caveat is that Toolkit 6.1 is not officially supported for deploys to the 6.0 broker run-time.