users@glassfish.java.net

Re: Interop with Glassfish and other application servers

From: <glassfish_at_javadesktop.org>
Date: Fri, 30 Nov 2007 04:30:41 PST

I finally figured it out!

When creating the InitialContext Glassfish does not give Jack about the provider url given in the environment. Instead you just need to specify the corbaname url in the lookup and you have to use a specific ContextFactory so it looks like this:

Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.appserv.naming.S1ASCtxFactory");
InitialContext ctx = new InitialContext(env);
ctx.lookup("corbaname:iiop:1.2_at_localhost:7001#ejbname_on_wls");

Is that intentional? As far as i know the url should be specified within the provider url and only the bean name to be put in the lookup. But that does not work here. I must admit i am a bit confused about this.

Cheers, Chris
[Message sent by forum member 'candlejack' (candlejack)]

http://forums.java.net/jive/thread.jspa?messageID=247990