neilotoole.io

Web presence of Neil O'Toole.

Tag: Java

RMI Interruptus! Or how to interrupt RMI method calls

Once upon a time, I was working on the assignment for the SCJD certification. The project was a classic client-server application, with an RMI server, and a Swing-based GUI, which you could use to book hotel rooms or some such. One of the project requirements was to provide record locking, such that only one instance of the client could edit the hotel room entry at once. Fairly standard stuff. So, when the user clicks Edit Room in the client GUI, the client makes an RMI call to acquireLock, and when that method returns, the client can then call update, and so on. But if another client already has the lock, then the acquireLock method will block until the lock becomes available. In that case, the app shows a pleasant dialog like this:

RMI demo app

Obviously you, as the user, would like to be able to click Cancel. And obviously you, as the developer, would like the RMI thread that’s stuck in the remote acquireLock method to return promptly. But you, as the developer, would be sorely disappointed, because the RMI thread will continue to block. Indefinitely! And from this outrage, thus was born the Interruptible RMI library.

JCP Expert Group for JSR-261: WS-Addressing

My years toiling away on web services seem to be paying off: I’ve been invited to be a member of the JCP Expert Group for JSR-261 (Web Services Addressing).

A primer:

  • JCP is the Java Community Process: it’s the mechanism for developing standard technical specifications for Java technology. Basically, whatever is decided upon in a JSR goes into the next version of Java.
  • JSR is a Java Specification Request: the formal documents that describe proposed specifications and technologies for adding to the Java platform.
  • Expert Group: the members of a specific JSR that figure out the proposed spec.
  • JAX-WSA: is the Java API for XML Web Services Addressing (JAX-WSA). It defines (or will define) APIs and a framework for supporting transport-neutral addressing of web services. You can read more about WS-Addressing here.

This should be an interesting experience: I’m one of four individual contributors in the expert group, the rest of the members are representatives of their firms (Sun, Oracle, IBM, etc.). I’m informed that the expert groups can be a bit tetchy at times, we shall see how it pans out.

Committer at Apache Software Foundation

For the best part of the last year I’ve been an active contributor to some of the Apache Commons projects (specifically Collections and Lang). I’m now an official committer at the ASF, with write access to the VCS and what not. And a shiny @apache.org email address.

NetTool 4.7.2

NetTool was one of my early open-source projects. I first created it (in Java & Swing) in the late nineties (98/99) to debug HTTP and TCP traffic. It has since been long neglected, but in some ways it’s a spiritual ancestor of later projects like Postman. I’ve no qualms about saying it: at the time, NetTool was pushing the boundaries of great Swing design.

NetTool HTTP Client

nettool http client

NetTool TCP Tunnel

nettool-tcp-tunnel

At last count, it had over 100K downloads from SourceForge.