Monday, October 19, 2009

RMI vi JMS 1.0

Hiram just released RMI via JMS 1.0! Check out his blog post here. It takes regular old java.rmi, and makes it much easier to use. I find regular rmi to be pretty irritating since it requires your remoted objects to implement the Remote interface and throw RemoteExceptions. RMI via JMS loosens up these restrictions making it easier to convert your existing application interfaces into remote ones.

And as Hiram points out it throws in a bit of ASM trickery through cglib, so you don't even have to export your classes with interface specifications to begin with (though it's probably still a good idea to do so).

Beyond that it allows asynchronous method invocations with the use of rmiviajms's @oneway annotation.