Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues

Bug 378

Summary: possible local-short-circuit-connection when using string_to_object() for remote-corbaloc-URLs
Product: JacORB Reporter: Michael Brinkmann <Michael.Brinkmann>
Component: ORBAssignee: Gerald Brose <gerald.brose>
Status: RESOLVED FIXED    
Severity: normal CC: john.seltzer, mencl, richard.hash
Priority: P2    
Version: 1.4.1   
Hardware: PC   
OS: Windows 2000   

Description Michael Brinkmann 2003-09-05 16:41:15 CEST
Given are two identical programs running on different hosts which offer a 
servant (bound to a persistent POA with "IdAssignmentPolicyValue.USER_ID" 
and "LifespanPolicyValue.PERSISTENT") and which connect to the peer servant on 
the foreign host. 

The sequence for binding the servant is like this:
      persistentPoa.activate_object_with_id(ServantName.getBytes(), servant);
      (before, "jacorb.implname" has been set to "OB" and the POAs name 
      is set to "POA")

The sequence for getting the remote object-reference is
          String objName = "corbaloc:iiop:"+hostName+":"+hostIpPort+
                            "/OB/POA/"+ServantName;
          org.omg.CORBA.Object obj = orb.string_to_object(objName);          
          remotePeer = MyServantHelper.narrow(obj);

The error is, that the "remotePeer"-object is in fact the local servant!
The ORB does not even try to connect to the remote host, even when servant-
functions get called.

A workaround is to rename e.g. "OB" to "OB_<host-name>" so that the object's
name is even more different as it was.

The error applies to JacORB 2.0 beta1, too and can be reproduced on SUN Solaris 
8, too.
Comment 1 Alphonse Bendt 2006-05-09 16:36:26 CEST
*** Bug 425 has been marked as a duplicate of this bug. ***
Comment 2 Alphonse Bendt 2006-05-09 16:36:44 CEST
*** Bug 473 has been marked as a duplicate of this bug. ***
Comment 3 Alphonse Bendt 2006-05-09 16:40:35 CEST
applied patch from prismtech

modified files:
src/org/jacorb/poa/POA.java 
test/regression/src/org/jacorb/test/poa/ImplNameTest.java
test/regression/src/org/jacorb/test/poa/AllTest.java 
doc/ProgrammingGuide/Configuration/configuration.tex
etc/jacorb_properties.template 
Comment 4 Alphonse Bendt 2006-05-09 16:42:34 CEST
*** Bug 503 has been marked as a duplicate of this bug. ***