Archive for July, 2010

JBoss remote debugging

Just wanted to setup JBoss for remote debugging using Eclipse. Turns out that remote debugging is quite simple, but I’ll have forgotten the specifics tomorrow, so I’d better jot down a quick note.

In JBoss bin/run.sh there’s a few references to JAVA_OPS. Find the one that looks like this:

# Setup JBoss specific properties
JAVA_OPTS="-Dprogram.name=$PROGNAME $JAVA_OPTS"

- and add the line below:

JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"

This addition to JAVA_OPTS lets JBoss start in debug mode with no suspend during startup.

To enable Eclipse to do remote debug after JBoss startup, click run > debug configurations and select Remote Java Application. Fill in host and port – in the example the host is localhost and the port is 8787.

Now JBoss is ready to deploy your web-application with breakpoints.

Globalization

Andy Grove, senior advisor of Intel, asks an excellent question:

You could say, as many do, that shipping jobs overseas is no big deal because the high-value work — and much of the profits — remain in the U.S. That may well be so. But what kind of a society are we going to have if it consists of highly paid people doing high-value-added work — and masses of unemployed?

It seems like an understatement to say that the answers to this question – and what we all chose to do about it – is what the next decade will be all about…