users@glassfish.java.net

Accessing JNDI from a client.

From: Nick Stuart <nicholas.stuart_at_gmail.com>
Date: Thu, 25 Oct 2007 11:01:56 -0400

Hi all, I am sure this is a fairly straight forward problem, but I can't
really find any documentation that just lays it out. I have a JNDI jdbc pool
setup and it works great for the apps inside glassfish. What I need to do is
get an app that is running outside of glassfish (but on the same machine) to
be able to access this as well. I've gotten as far as getting the following
error:
Oct 25, 2007 2:51:51 PM
com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType:
IIOP_CLEAR_TEXT; hostname: 127.0.1.1; port: 900"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(
ORBUtilSystemException.java:2172)
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(
ORBUtilSystemException.java:2193)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(
SocketOrChannelConnectionImpl.java:205)
...

I think a part of might be because of the 127.0.1.1 instead of localhost or
127.0.0.1 or my actual ip, but I'm not sure what setting to change for JNDI
to use a specific address. I've got my initial context factory set to "
com.sun.jndi.cosnaming.CNCtxFactory" from the documentation I have been able
to find, and my lookup name is something like java:comp/env/jdbc/PoolName

Thanks for the help.
-Nick