[omniORB] OmniORB and JAVAorb, trying to use corbaloc
Brenneis, Steve
steve.brenneis@attws.com
Tue, 7 May 2002 15:16:31 -0400
I have only been able to get the corbaname URI to work with omniORB and the
JDK 1.4 ORB and I haven't seen any problems with an IOP version mismatch. As
far as I have tracked, the problem seems to be in the JDK ORB. As an
interesting side note, the JDK 1.3 ORB was documented as supporting the
corbaname/corbaloc URI's, but as Duncan pointed out, it didn't really work.
Steve Brenneis
WebAXE Middleware Lead Developer
AT&T Wireless Services
http://vega.wireless.attws.com on the intranet
http://www.attws.com on the internet
> -----Original Message-----
> From: Antoine Thierry [mailto:athierry@alphacent.com]
> Sent: Monday, May 06, 2002 10:11 AM
> To: List OmniORB
> Subject: [omniORB] OmniORB and JAVAorb, trying to use corbaloc
>
>
> i develop a clientserver app
> Server : C++ OmniORB 3.04 , Linux
> Client : Java JAVAORB (JDK 1.4), Linux
>
> We want to make a sort of IOR distributor, as saw in the list
> a few time ago.
>
> so, i init the ORB with as command line argument
> -ORBpoa_iiop_name_port <myhost>:<myport>
>
> i create my main POA with
> CORBA::Object_var obj = orb->resolve_initial_references("omniINSPOA");
> PortableServer::POA_var rootPOA = PortableServer::POA::_narrow(obj);
>
> when i make a test with my small omniORB/c++ client, giving to it
> - the same parameter on the command line :
> ( -ORBpoa_iiop_name_port <myhost>:<myport> )
>
> then, i'll do this
>
> string ior_netpath = "corbaloc:iiop:" + <myhost> + ":" + <myport> +
> "/MyrdvSessionManager";
> CORBA::Object_var net_object =
> orb->string_to_object(ior_netpath.c_str());
>
> and then .. everything functions well
>
>
> But, when i want to do the same with the JAVA client
> i'll get an error of omniORB, which is the following
>
> omniORB: scavenger : scanning connections
> omniORB: tcpSocketMTfactory Rendezvouser: unblock from accept()
> omniORB: tcpSocketMTfactory Rendezvouser: accept new strand.
> omniORB: tcpSocketMTfactory Worker: start.
> connect from <clientip>
> omniORB: tcpSocketMTfactory Rendezvouser: block on accept()
> omniORB: throw omniConnectionBroken (minor 0) from giopServer.cc:400
> omniORB: tcpSocketMTfactory Worker: #### Connection closed.
> omniORB: tcpSocketMTfactory Worker: exit.
> omniORB: tcpSocketStrand::~Strand() close socket no. 8
>
> i've made a small java test program which is the following :
>
> /package Myrdv;
> import java.io.*;
> import java.util.*;
> import org.omg.CORBA.*;
> import org.omg.CosNaming.*;
> import Myrdv.*;
>
> class corbaTest
> {
> public static void main (String[] arguments) throws
> AuthFailed,PermDenied,Myrdv.Error,Exception
> {
> Properties p=System.getProperties();
> p.put("org.omg.CORBA.ORBInitialHost","<my_server_ip>");
> p.put("org.omg.CORBA.ORBInitialPort","<my_server_port>");
> org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(arguments,p);
>
> String nameService =
> "corbaloc:iiop:<my_server_ip>:<my_server_port>/MyrdvSessionManager";
>
> (MyrdvSessionManager is the corba key of the object i want to get)
>
> System.out.println("Connection : " + orb);
> SessionManager manager =
> SessionManagerHelper.narrow(orb.string_to_object(nameService));
> }
> }
>
> when i execute this program, it make bugs when the narrow()
> is called ..
>
> Any Idea ?
>
> Thanks in advance
>
> Antoine Thierry
>