Playing around with Apache Camel

I have been playing around with Apache Camel for a couple of projects recently, and so far I’m very impressed. Camel is one of a number of frameworks that seem to have sprung up over the past few years in response to the book Enterprise Integration Patterns by Gregor Hohpe and Bobby Woolf. It attempts to provide mechanisms to support all the patterns described in the book. And it does so very well, from what I have experienced so far. So I thought I would mention a couple of things I have done with it.

A simple content-based router

The problem I was trying to solve was that a legacy application was designed to listen to a WebSphere MQ queue, which would contain requests for a variety of operations. A new application had been developed to handle a subset of these operations. I couldn’t have both applications listening to the same queue, so I needed to divert particular operation request messages to a separate new queue.

Continue reading

At last, a decent Flickr gallery plugin for WordPress

For some time now, I have been frustrated by the gallery plugins that I have been using. For one thing they don’t seem to have worked very well, but more than that I have found it frustrating duplicating photos across multiple sites. I have this blog here, where I like to show what I have been up to, but I also have a Flickr account and a Facebook account. I feel like I shouldn’t have to upload the same photos to all three. So what I have been looking for is a WordPress gallery plugin that could link to photo sets on Flickr. And at last it seems that a few options are available.

I have been playing with a few today, and I think I have found one that works just how I want it to. My personal winner is the Flickr Gallery plugin for WordPress. You can also check out the Flickr Gallery project web site for more detail.

Continue reading

WebLogic Scripting Tool – Scripts

I mentioned my use of the WebLogic Scripting Tool a little while back. I have noticed since then that a number of folks visiting this site are looking for example scripts. I have obviously written a number myself and I promise I’ll try to get around to posting them here. However until I get myself in gear, I thought I would point you at some useful examples that are already out there. I’ll expand this post as I find more…

Continue reading

Open source financial libraries for Java

The financial industry does seem to be loath to share the fruits of their efforts. There doesn’t seem to be a lot around. And certainly not much that is regularly updated. Maybe everyone is worried about sharing trade secrets, but the rules for calculations are well established and I’m guessing that everyone must be writing their own implementations or buying in over-priced modules.

Continue reading

Groovy as a financial domain language?

As a developer of financial systems, I’m constantly disappointed by how difficult it is to perform precise decimal arithmetic in Java. It’s fairly common knowledge that the use of double is not much use for financial calculations. As a quick example, take a look at the following piece of code.

public static void main(String arg[]) {
    BigDecimal bd = new BigDecimal("58.99").add(new BigDecimal("0.99"));
    System.out.println("BigDecimal result: " + bd);

    double d = 58.99 + 0.99;
    System.out.println("Double result: " + d);
}

You would have thought both results should be the same. However, you end up with:

BigDecimal result: 59.98
Double result: 59.980000000000004

Continue reading

WebLogic Scripting Tool

According to the BEA documentation, the WebLogic Scripting Tool is a command-line scripting interface that system administrators and operators use to monitor and manage WebLogic Server instances and domains. It allows you to write scripts in Jython that are able to connect to a running WebLogic domain and make modifications to the configuration with no need to restart anything. It can also be used for creating and modifying a domain in its offline mode. It comes as standard with WebLogic 9.2 and a version is available for 8.1. It is recommended and supported by BEA for automating WebLogic server administration. I am currently developing WLST scripts to improve the development and deployment process. Continue reading

Programming in Java book

My dad passed away on April 1st 2005. At the time he had been working on a book, aimed at introducing the Java programming language as part of a university course. The project had taken a long time and was never quite finished, but near the beginning of 2005, he has finished his last chapter. Having dug around on his iBook, I found the most recent Word document in which he had been preparing the book. Reading it through, it was obvious that it would need a good bit of work before it could be publishable. Continue reading