I've just noticed something interesting. The following code:

        System.setProperty("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
        System.setProperty("java.naming.provider.url", "localhost:1099");
        try
        {
                jndiContext = new InitialContext();
                System.out.println("Got context");
        }
        catch (Exception e)
        {
                e.printStackTrace();
        }

Works regardless of whether or not jBoss is running. Ie I get a "valid"
InitialContext back. Only when I try and use that InitialContext do I get an
exception (connection refused I think).

If I try to do the same with the equivalent WLS code and WLS isn't running
then I get a server is not running exception.

The two models seem to be significantly different (and I prefer the WLS
approach to be honest - much easier to handle).

Which approach is "correct" ? Or is this a hole in the spec' ?


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to