users@glassfish.java.net

Re: remote JNDI lookup fails from web started client

From: <glassfish_at_javadesktop.org>
Date: Sat, 23 Oct 2010 19:43:36 PDT

Tim,

We are running a standard glassfish generated java web start client, using netbeans RCP. I can get the @EJB injection to work perfectly, but I have requirements to access a world wide network of different glassfish servers from the same GUI (e.g. to monitor logs from each site) and so I need to be able to dynamically connect (and authenticate - but that's a different story!) to a site, based upon a user site selection.

So, I am trying to use the initial context method - figuring that I could take the user specified site, and use that as part of the iiop address. I can't get it to work - and in addition I am confused between the use of the corbaname::iiop variant of the lookup() function and the properties setting of the InitialContext. I also can't get a clear story on the different properties that I can set on the InitalContext

Now, I tried a small program at home, and got the InitalContext to work on a local glassfish server, but not over the network - I think that I need to modify the network address of the ORB listener - I tried the actual ip address and created a new orb listener on a different port. (at work I tried various combinations of the default 0.0.0.0, the actual ip address and the hostname) .

Also, I wonder if the netbean RCP part at work is causing some issues. I know that the @EJB only works from the main - is it the same for the initalContext (In work, I am trying that from within the netbeans RCP code) ?

I am traveling for the next 2 week, so may not respond to further questions (depends upon wifi access!) - but this is really important to me, so I do appreciate the interest thus far

Regards,

Martin
[Message sent by forum member 'mgfarme']

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