Trust us for web services,

Trust us for web services, says BT

From January, BT will offer a managed Java 2 Enterprise Edition (J2EE) or .Net
web services deployment environment, starting at £20,000 per month, for
companies to test proof-of-concept projects.

Of course, I imagine the price to host an actual live project won’t be quite so
generous. They have to cover their costs after all…

Lets see, Kattare for $54 a month, or BT for
$30,000. Tough decision.

Hi there… I’m back.

Hi there… I’m back. Thinking about what’s next.

Has anybody downloaded the Sun ONE Application Server v7.0? From what I’ve read online, it’s supposed to be completely new. It’s not iPlanet or NetDynamics or a combination of the above.

-Russ [Russell Beattie Notebook]

I did some informal benchmarking of servlet containers a couple of months ago, and Sun ONE did very badly. It was 50% slower than Tomcat and Resin, crashed under load, and was a pain to work with. It also mangled application URLs, so http://myserver/myapp/servlet1 on Resin/Tomcat would become something like http://myserver/NSApp/myapp/servlet1 on Sun ONE. It may have improved since then – cos I don’t think the one I was using was all new (NSApp? Netscape Application server perchance?).

QDox 1.0 Released – http://qdox.sourceforge.net

QDox 1.0 Released – http://qdox.sourceforge.net

This is the first opensource release of anything I’ve made in months – I’ve been a busy boy 🙂

QDox is a small footprint, high-speed Java and JavaDoc parsing library. It was born out of my own frustration with how slow code-generation tools were that rely on the Sun JavaDoc processor. This is much faster replacement. On my home machine it takes 16 seconds to scan 3000 files (courtesy of Apache CVS), where Sun JavaDoc takes just over 2 minutes. The library has no runtime dependencies and a simple and intuitive API.

MockMaker now uses QDox to generate mock objects from source code as part of the build process.

[Joe’s Jelly]

Excellent. Any plans to integrate QDox with XDoclet?

On the subject of XDoclet, has anyone tried using it to implement design by contract? There’s an article here describing an implementation of DBC using dynamic proxies and the doclet API. I wonder if XDoclet might provide an even slicker solution.

Class.forName() is evil…. We’ve all

Class.forName() is evil….

We’ve all done it before I guess. Called Class.forName( “com.foo.MyClass” ) to load some class at runtime based on some configurable class name. At first it seems very groovy.

However this does not work very well in application servers, containers or various environments like Maven, Ant, JUnit etc. The days of everything being in the system class loader are over, now we need to live in a multiple-classloader world.

Solution? Try use the current thread’s context class loader or the class loader used to load your code. So try replace this…

Class theClass = Class.forName( className );

with this more verbose version (which could easily be wrapped in a helper method)

Class theClass = null;
try {
    theClass = Thread.currentThread().getContextClassLoader().loadClass( className );
}
catch (ClassNotFoundException e) {
    theClass = getClass().getClassLoader().loadClass( className );
}

Henri, this could be a possible addition to commons lang?

While we’re talking about living in multi-classloader worlds, bob’s new project ClassWorlds looks very groovy.

[James Strachan’s Radio Weblog]

This certainly goes a long way towards solving classloader issues – I always seem to get bitten by XML parsers in this regard. What it doesn’t always solve is the situation of colliding packages. I’ve hit a situation where the app. server is using a version of Xerces thats older than the version my app. wants to use. This gets messy, and the exact behaviour depends on your app. server’s classloading policy (it doesn’t help that the servlet spec. appears to be in conflict with the java language spec. on the issue of classloader delegation order).

Transparent RMI. There’s an interesting

Transparent RMI. There’s an interesting article over on JavaWorld: “Empower RMI with TRMI“. Transparent RMI makes it simpler to create RMI services. No more extending Remote and having every method throw RemoteException & it also centralizes error handling on the client side. It appears to be using dynamic proxies to simplify things… I need to investigate this further. [Otiose Cognitions]

While you’re at it, have a look at altRMI.