My friend and colleague Ben Thompson has been writing again – his latest developerWorks article Handling large files with WebSphere Transformation Extender has just been published. It describes a useful technique where a WTX map can be used to split a large file into multiple MQ messages each containing a single transaction, using the group header fields to keep the transactions together. Worth a read if you are interesting in processing these kinds of files.
I just posted the first in a small series of entries about what you can do with the WebSphere MQ command program (runmqsc) over on the Hursley on WebSphere MQ blog.
Back to a topic related to my day job (!).
During the past few years I’ve come across a number of instances where customers have wanted to script the build and deployment of WebSphere Message Broker solutions. I’ve actually spoken about this a few times at conferences (an example presentation is available on my Writings page). The most common approach that customers have adopted has been to use Ant to tie in with the rest of their application build processes.
In an earlier developerWorks article, I included an example plugin node that could invoke an Ant task. There should be a build.xml file included with the sample code for this article that could help you to get started. I’ve also helped customers to write their own automated build and deployment processes.
Now, a new developerWorks article from Zhongming Chen, Ida Leung and Dave Spriet covers the use of Ant to drive the mqsicreatebar command for scripting the creation of broker archives. It’s a great article and well worth a look.
This isn’t the end of the story. Often, the overall process will also include checking out of source control, apply version tags, and deploying the BAR file. However, this article introduces the topic and should be a good starting point. You could also use the Configuration Manager Proxy API to control other broker tasks, as Matt Lucas describes in another developerWorks article.
Incidentally, if you want to know more about Ant, I personally really like the book Java Development with Ant by Erik Hatcher and Steve Loughran.
Technorati tags: developerworks, WebSphere Message Broker, Ant, Java, broker, IBM
I haven’t blogged about my day job for a while, but an interesting technical issue came up today.
A customer was trying to add a new queue manager to MQ Explorer. However, they could not enter the hostname into the relevant field in the GUI.
It turned out that the hostname had_an_underscore character in it. The entry field in MQ Explorer prevents the user from entering this character.
This restriction makes sense. As per several RFCs (RFC952, RFC1035, RFC1178) and the Wikipedia entry on hostnames, underscores_are_not_valid characters in hostnames.
… hostname labels can only be made up of the ASCII letters ‘a’ through ‘z’ (case-insensitive), the digits ‘0’ through ‘9’, and the hyphen. Labels can not start nor end with a hyphen. Special characters other than the hyphen (and the dot between labels) are not allowed, although they are sometimes used anyway. Underscore characters are commonly used by Windows systems but according to RFC 952 they are not allowed…
So, now you know.
A solution could be to reference the IP address of the queue manager in question, or possibly to alias the hostname in the hosts file so that it does not contain underscores. Note that I have not tested the latter solution, but it should work.
I missed part of Peter Crocker’s session on Advanced Java Topics in WMB v6 yesterday, but when I did manage to get in there, I learned a few useful snippets. Essentially this was an update of his talk from last year, and riffed off of his developerWorks article on the use of Java in Message Broker.
A few of the notes I made:
- although the product ships a sample JavaCompute node that calls a Google API, Google themselves have now withdrawn the API, so the sample doesn’t work 😦
- it is important to be careful with the use of XPath… for example, try to avoid using the // selector as it is usually not the most performant way to select a message element. There should be some articles around on XPath, I need to look up some useful references.
- The latest fixpack enables Java code in a JavaCompute node to propagate to a label in the flow.
Useful stuff to be aware of!