Link to home
Start Free TrialLog in
Avatar of jdiaz
jdiaz

asked on

Sun One Application Server 7

Could anybody help me to know what namming service is installed by default with IAS 7.
If I try to connect from a client that runs in a diferent machine that IAS 7 runs, I don't know what properties I have to set to init the InitialContext class.
I haven´t this problem when the client is a servlet that runs into the IAS 7, because you can init the InitialContext class without any parameters.

Thanks in advance.
Avatar of vzilka
vzilka

Use these lines to connect to the S1AS:

Properties env = new Properties();

env.put("java.naming.factory.initial", "com.sun.jndi.cosnaming.CNCtxFactory");

env.put("java.naming.provider.url", url);

initial = new InitialContext(env);
Avatar of jdiaz

ASKER

As you told me, I used those lines to connect. I put as URL the following "iiop://10.111.96.174", that is the machine where IAS7 is installed, but the following exception has been thrown:
javax.naming.ComunicationException:Cannot connect to ORB (Root Exception is org.omg.CORBA.COMM_FAILURE: vmcid: Sun minor code:201 completed: No).

I don´t know if I have to do something to get up the Cosnaming service and I don´t also know in which port is this service listening.


Try this link at SUN's site : http://docs.sun.com/source/817-0462-10/dcacc.html#997658

This tells you how to build an application client, using the sun-application-client.xml files.

Another option is to configure your server for IIOP. You can see how this is done here:
http://docs.sun.com/source/816-7156-10/agj2eres.html#51383
Avatar of jdiaz

ASKER

I have learned that if you want to connect from a client running in a different machine, you must use a Cosnaming Service (or others JNDI providers) in order to download the ejb home class.
But if you only want to connect to an EJB running in the same server that servlet runs, then, the J2EE server provides you of an implementation of JNDI API, that let you to get the ejb home class.

Please, could you confirm that I have properly understood this subject?
yes
ASKER CERTIFIED SOLUTION
Avatar of vzilka
vzilka

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jdiaz

ASKER

Thanks for your help.