[omniORB] omniINSPOA and bidir connections (omniORB4)
Duncan Grisby
duncan@grisby.org
Fri Sep 6 19:02:02 2002
On Friday 6 September, "Rob Eger" wrote:
> I've gotten a simple hello app working with omniINSPOA in order to use
> corbaloc from the client, but now I want to make it work
> bidirectionally. I started with the bidir example code from omniORB4
> and tried to alter it to use omniINSPOA as shown in the code below.
[...]
> It throws a BAD_PARAM (InvalidSystemId) exception on the last line. If
As Kendall has said, the BAD_PARAM is because your child POA does not
have the USER_ID policy. If you add that policy to it, you won't get
the exception. You won't get the results you want, either, since the
child of the INS POA won't inherit its magic properties. There can
only be one POA that is magic with its object keys.
By far the simplest thing to do is to define an interface something
like
interface MainAppInterface;
interface MyBootstrap {
MainAppInterface getMainApp();
};
You create an instance of the MyBootstrap object in the INS POA. Its
operation returns a reference to an object in a normal POA with the
bidirectional policy.
If you _really_ have to have the object you reference with corbaloc
call you back bidirectionally, you'll have to do the location
forwarding thing that Kendall suggests.
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan@grisby.org --
-- http://www.grisby.org --