tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pawel Niewiadomski" <...@foo-baz.com>
Subject Re: Using CORBA objects
Date Sun, 13 Nov 2005 15:48:18 GMT
I resolved my problem.

> protected Context getNamingContext() throws NamingException {
> 	org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init();
> 	if( orb != null ) {
> 		Hashtable env = new Hashtable();

Here I should have put also:

env.put("org.omg.CORBA.ORBInitRef",
"NameService=corbaloc::localhost:2809/NameService");

> 		env.put("java.naming.corba.orb", orb);
> 		env.put(Context.INITIAL_CONTEXT_FACTORY,
> "com.sun.jndi.cosnaming.CNCtxFactory");
> 		env.put(Context.PROVIDER_URL, "iiop://localhost:2809");
> 		Context ic = new InitialContext(env);
> 		return ic;
> 	} else
> 		return null;
> }

Now it works :-)

Best regards,
Pawel

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message