Recently been playing with OSS application servers for the first time in ages. So far, Glassfish, JBoss and Geronimo.
Geronimo is a mess.
To put it politely.
After looking at what’s missing from their web console, a brief experiment with trying to add a jar to the repository, and a few other false starts, the law of diminishing returns kicked in, and I decided to give up before wasting too much time.
Glassfish seems quite polished by comparison (which is a surprise considering I was never that enthused by iPlanet… but then, the last time I looked at that was about a million years ago).
JBoss hasn’t changed a lot since I last looked at it. Still has the hideous applet-driven console app — but then configuring JBoss has always been a case of direct editing of config files (which is part of its attraction really).
Odd difference between the two. When accessing an InitialContext from an external app, in Glassfish you can get access to a configured data source, but in JBoss it doesn’t seem to be accessible. I’m a bit hazy now about how JBoss’ JNDI works, so I can’t recall if this is expected behaviour or not.
In any case, for testing purposes, these Jython excerpts are useful:
1. To access a Glassfish context, set the classpath to:
glassfish/lib/appserv-rt.jar:glassfish/lib/javaee.jar:glassfish/lib/appserv-admin.jar:glassfish/lib/webservices-rt.jar:glassfish/lib/install/applications/jmsra/imqjmsra.jar
(plus whatever jars you need for the resources you’re accessing), then invoke the following in Jython:
from java.util import *
from javax.naming import *
p = Properties()
p.put("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory")
p.put("java.naming.factory.url.pkgs", "com.sun.enterprise.naming")
p.put("java.naming.factory.state", "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl")
ic = InitialContext(p)
2. To access a JBoss context, set the classpath to:
jboss/client/jnp-client.jar:jboss/server/all/lib/jnpserver.jar:jboss/client/logkit.jar:jboss/lib/jboss-common.jar
…then invoke the following in Jython:
from java.util import *
from javax.naming import *
p = Properties()
p.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory")
p.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces")
p.put("java.naming.provider.url", "jnp://localhost:1099")
ic = InitialContext(p)
Hope that’s useful for somebody.


