[omniORB] Problem with the corbaloc URI

Serguei Kolos Serguei.Kolos at cern.ch
Mon Aug 30 16:53:33 BST 2004


Hello

I have fixed this problem myself. The patch is attached. Note please 
that this is the patch for the
4.0.3 version.

Cheers,
Sergei

*** src/lib/omniORB/orbcore/omniIOR.cc  Mon Aug 30 15:47:19 2004
--- src/lib/omniORB/orbcore/omniIOR.cc.original Mon Aug 30 15:51:06 2004
***************
*** 201,211 ****
 
    {
      CORBA::ULong last = pd_iopProfiles->length();
!
!     pd_iopProfiles->length( ( naddrs > 1 ) ? last + 2 : last + 1 );
      IIOP::encodeProfile(iiop,pd_iopProfiles[last]);
-     if ( naddrs > 1 )
-       
IIOP::encodeMultiComponentProfile(iiop.components,pd_iopProfiles[last+1]);
      pd_addr_selected_profile_index = last;
    }
  }
--- 201,208 ----
 
    {
      CORBA::ULong last = pd_iopProfiles->length();
!     pd_iopProfiles->length(last+1);
      IIOP::encodeProfile(iiop,pd_iopProfiles[last]);
      pd_addr_selected_profile_index = last;
    }
  }


Serguei Kolos wrote:

> Hello
>
> It seems that the corbaloc URI does not work properly with multiple 
> object locations.
> I have a server application, which may produce either IOR or corbaloc 
> reference, then I
> run the client with one of those references. With the IOR, which 
> contains two profiles the
> client attempts to connect to the second location if connection to the 
> first one fails. With the
> corbaloc URI this never happens. The client in both cases calls the 
> string_to_object function
> and then tries to invoke an operation on the remote object.
> I attached the output with the traceLevel 25 for both cases (note that 
> the server is not running
> intentionally).
> I'm using the omniORB 4.0.3 on Linux (RedHat 7.3 with the 2.4.20 
> kernel) with gcc 3.2.
> Am I doing something wrong?
>
> > test_client 
> corbaloc:iiop:137.138.4.255:12345,iiop:137.138.4.254:12345/%ffipc/partition%00initial 
>
> SKIP...
> omniORB: Initialising incoming endpoints.
> omniORB: Bind to address 0.0.0.0.
> omniORB: Starting serving incoming endpoints.
> omniORB: AsyncInvoker: thread id = 1 has started. Total threads = 1
> omniORB: giopRendezvouser task execute for giop:tcp:137.138.4.254:46864
> omniORB: Creating ref to remote: root/ipc/partition<initial>
> target id      : IDL:omg.org/CORBA/Object:1.0
> most derived id:
> omniORB: AsyncInvoker: thread id = 2 has started. Total threads = 2
> omniORB: Scavenger task execute.
> omniORB: Client attempt to connect to giop:tcp:137.138.4.254:12345
> omniORB: throw giopStream::CommFailure from 
> giopStream.cc:1073(0,NO,TRANSIENT_ConnectFailed)
> omniORB: throw TRANSIENT from omniObjRef.cc:762 
> (NO,TRANSIENT_ConnectFailed)
> omniORB: omniRemoteIdentity deleted.
> omniORB: ObjRef() -- deleted.
> omniORB: Preparing to shutdown ORB.
> omniORB: Destroying POA(RootPOA).
> SKIP...
>
> > test_client 
> IOR:010000001600000049444c3a6970632f706172746974696f6e3a312e3000000001000000000000008c000000010102000e0000003133372e3133382e342e32353500393016000000ff6970632f706172746974696f6e00696e697469616c00000300000000000000080000000100000000545441010000001c000000010000000100010001000000010001050901010001000000090101000300000018000000010000000e0000003133372e3133382e342e323534003930 
>
> SKIP...
> omniORB: Initialising incoming endpoints.
> omniORB: Bind to address 0.0.0.0.
> omniORB: Starting serving incoming endpoints.
> omniORB: AsyncInvoker: thread id = 1 has started. Total threads = 1
> omniORB: giopRendezvouser task execute for giop:tcp:137.138.4.254:46868
> omniORB: Creating ref to remote: root/ipc/partition<initial>
> target id      : IDL:omg.org/CORBA/Object:1.0
> most derived id: IDL:ipc/partition:1.0
> omniORB: AsyncInvoker: thread id = 2 has started. Total threads = 2
> omniORB: Scavenger task execute.
> omniORB:  send codeset service context: (ISO-8859-1,UTF-16)
> omniORB: Client attempt to connect to giop:tcp:137.138.4.255:12345
> omniORB: throw giopStream::CommFailure from 
> giopStream.cc:1073(1,NO,TRANSIENT_ConnectFailed)
> omniORB:  send codeset service context: (ISO-8859-1,UTF-16)
> omniORB: Client attempt to connect to giop:tcp:137.138.4.254:12345
> omniORB: throw giopStream::CommFailure from 
> giopStream.cc:1073(0,NO,TRANSIENT_ConnectFailed)
> omniORB: throw TRANSIENT from omniObjRef.cc:762 
> (NO,TRANSIENT_ConnectFailed)
> omniORB: Preparing to shutdown ORB.
> omniORB: Destroying POA(RootPOA).
> SKIP...
>
>
>
>
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list





More information about the omniORB-list mailing list