«

»

Aug 25

Using jnp as a JBoss heartbeat

jnp is a JBoss protocol which exposes jndi.  It is, by default, bound to port 1099.  I’d been using that port as a heartbeat, but “cheating” — I would open a socket and then close it immediately.  However, this caused problems.  jnp is chatty.  And it got upset at my not letting it say ‘hi’ before I dropped the connection.   So, here’s a code snippet (jruby, the Java should be an exercise for the student) which allows you to actually do an intelligent check.

Enhanced by Zemanta

Leave a Reply

%d bloggers like this: