[jacorb-bugs] [Bug 943] New: Misbehaviour in ORB.getRootPOA() when socket could not be created

bugzilla-daemon at jacorb.org bugzilla-daemon at jacorb.org
Fri Feb 15 14:52:02 CET 2013


http://www.jacorb.org/cgi-bin/bugzilla/show_bug.cgi?id=943

           Summary: Misbehaviour in ORB.getRootPOA() when socket could not
                    be created
           Product: JacORB
           Version: 3.1
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ORB
        AssignedTo: jacorb-bugs at lists.spline.inf.fu-berlin.de
        ReportedBy: christian.bindseil at capgemini.com


We have to work with fixed TCP-ports, configured with the OASSLPort property.
The start of the first instance of our software works correctly. If you try to
start another instance on the same machine, the socket can't be created -
that's ok because the first instance already owns this port. You get an
exception. But if you try again to get the RootPOA, then you get a RootPOA
(which isn't working) instead of an exception as with the first attempt.
Afterwards the System does not see the difference between a working POA and a
POA without proper Socket, so every request on the specified port reaches the
first instance of our software, while the second instance doesn't know that it
can't be called. 

The reason can be found in ORB.getRootPOA(). The whole content of the method
will be executed only when rootpoa-classmember is null. Then the member is
assigned and in a try-catch-block the creation of the socket is tried. If it
fails, the exception is catched and another exception is thrown - but the
member contains already the POA which isn't configured yet. 
If you catch the thrown exception and call the method getRootPOA() again, then
the if-statement evaluates to false and the unconfigured POA is returned. The
calling code works with it assuming it is reachable on the socket, but it
isn't.

In my opinion the method shouldn't deliver non-working POAs. It should throw an
exception every time I try to get an POA on an port, which isn't free. Every
time, not only the first time.

Perhaps there is a correllation to bug 886 which is about a problem reaching
the second client on the same machine.


-- 
Configure bugmail: http://www.jacorb.org/cgi-bin/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the jacorb-bugs mailing list