<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.E-mailStijl17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="NL-BE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">TAO VERSION: 2.3.3<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">ACE VERSION: 6.3.3<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">HOST MACHINE and OPERATING SYSTEM:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> Windows 7, Winsock2<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">COMPILER NAME AND VERSION (AND PATCHLEVEL):<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> Visual Studio 2015 Express Edition 19.00.23918 for x86<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform-<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">specific file, simply state which one]:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> ace/config-win32.h<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">(used by MPC when you generate your own makefiles):<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> -<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">AREA/CLASS/EXAMPLE AFFECTED:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> -<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">DOES THE PROBLEM AFFECT:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> COMPILATION? No<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> LINKING? No<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> EXECUTION? Yes<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> The problem affects all our server applications.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">SYNOPSIS:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> After an upgrade of ACE/TAO from 2.2.2 to 2.3.3, the behaviour
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> of the portspan parameter of -ORBListenEndpoints seems to have<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> changed.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">DESCRIPTION:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> The following options are used to start our servers:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> -ORBListenEndpoints iiop://192.168.205.48:2001/portspan=31<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> -ORBInitRef NameService=corbaloc:iiop:GET12022:1570/NameService<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> With the first option, we use portspan=31 so our servers listen on<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> the first free port, starting at 2001 till 2031.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> This has always worked, but ever since the upgrade, it didn't.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> What we saw when using TAO 2.3.3 was the following. After startup,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> all our servers where listening on port 2001, but only the first server<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> to start was able to establish a connection with the naming service.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> With TAO 2.2.2 the behaviour was different. The first server started<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> would use port 2001, the second 2002, and so on. What we expected our<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> servers to continue doing after the upgrade to 2.3.3.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> We managed to get the needed behaviour by changing the first option to<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> -ORBListenEndpoints iiop://192.168.205.48:2001/portspan=31&reuse_addr=0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> Is this the way to go now? Why did this behaviour change? Was it a bug that<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> has been fixed? Or is it a bug now?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">REPEAT BY:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> Please adjust the ip address in the following program. When executing<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> this application twice, you should see the 2 applications listen<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> on the same port (2001).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> #include "tao/TAO_Internal.h"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> #include "tao/PortableServer/PortableServer.h"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> int main()<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> CORBA::ORB_var orb = CORBA::ORB::_nil();<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> PortableServer::POA_var poa = PortableServer::POA::_nil();<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> PortableServer::POAManager_var poa_manager<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> = PortableServer::POAManager::_nil();<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> if(! CORBA::is_nil(orb)) return 1;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> char* oargv[] = {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> "dummy",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> "-ORBListenEndpoints",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> const_cast<char*>(<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> "iiop://192.168.205.48:2001/portspan=31"),<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> 0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> };<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> int oargc = (sizeof(oargv)/sizeof(char*)) - 1;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> orb = CORBA::ORB_init(oargc,oargv,"TAO_orb");<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> CORBA::Object_var poa_object<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> = orb->resolve_initial_references("RootPOA");<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> poa = PortableServer::POA::_narrow(poa_object);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> poa_manager = poa->the_POAManager();<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> poa_manager->activate();<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> while(1);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> return 0;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">SAMPLE FIX/WORKAROUND:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> Changing the first option to<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> </span>-ORBListenEndpoints iiop://192.168.205.48:2001/portspan=31&reuse_addr=0<o:p></o:p></p>
<p class="MsoNormal"> did the trick.<o:p></o:p></p>
</div>
</body>
</html>