Friday 17 December 2010

JBoss stops with "Listening for transport dt_socket at address: 8787" message - change your debug startup settings

Hopefully someone out there finds this helpful.
I was trying to start Jboss in debug mode, so I went into
{JBOSS]/bin/run.bat and uncommented this:
rem JPDA options. Uncomment and modify as appropriate to enable remote
debugging.
set JAVA_OPTS=%JAVA_OPTS% -Xdebug
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y

I then started up JBoss manually and on the screen it seemed to hang
at this message:
Listening for transport dt_socket at address: 8787

I had a look at the debug settings that IntelliJ recommends to use in
"Run -> Edit Configurations" and noticed that it was slightly
different:
-Xdebug -Xrunjdwp:transport=dt_socket,address=3599,suspend=n,server=y
notice the difference, aside from the port?? "suspend" has a value of
"n" instead of "y".
Turns out that "suspend=y" means it will not run until a debugger
attaches itself to the process. In most cases, you will probably want
to use "suspend=n" instead. I think "suspend=y" is mainly useful if
you're trying to track down things that occur on startup of the
webapp. If the part you're interested in will only happen after a user
action, it's best to use "suspend=n".

Useful reference:
http://download.oracle.com/javase/1.5.0/docs/guide/jpda/conninv.html

Thursday 16 December 2010

Maven: "mvn archetype:generate" gives you 358 archetypes to choose from - too much of a good thing??

Just typed

maven archetype:generate

and I get a long long long list that goes up to...


349: remote -> nexus-plugin-archetype (-)
350: remote -> spring-osgi-bundle-archetype (Spring OSGi Maven2 Archetype)
351: remote -> spring-ws-archetype (Spring Web Services Maven2 Archetype.)
352: remote -> trails-archetype (-)
353: remote -> trails-secure-archetype (-)
354: remote -> tynamo-archetype (-)
355: remote -> wicket-scala-archetype (Basic setup for a project that
combines Scala and Wicket,
depending on the Wicket-Scala project. Includes an example Specs
test.)
356: remote -> wikbook.archetype (-)
357: remote -> circumflex-archetype (-)
358: remote -> javg-minimal-archetype (-)
Choose a number: 97:


358 archetypes??? At least it means a lot of projects have adopted
maven. But how usable is this?

Shouldn't we have something like a menu instead?