I need to have a RedHawk component have its ORB listen on a particular endpoint, specifically on a specified port. I am used to doing this by an endpoint parameter to ORB_init but since RedHawk calls ORB_init for me I do not know how to specify a particular giop:tcp::port endpoint. Is there a way to specify ORB_init parameters as a component property. Most programs that call ORB_init pass commandline parameters given to the executable on to ORB_init. Can I add --ORBendpoint to the entrypoint in the spd file?
Using a specific port for the ORB goes against the REDHAWK model of deployment-agnostic components. Furthermore, in the 2.1+ shared address space model, the ORB is shared between multiple components, rendering that level of control incompatible. A device or service, on the other hand, is explicitly deployed on a particular host machine, so using a specific ORB port is less fragile. As a general matter, REDHAWK attempts to abstract developers from the CORBA layer.
All of that notwithstanding, in principle it is possible to use specialized CORBA configurations. You cannot add arguments to the entry point in the SPD, but there are a couple of ways you could override the ORB port:
OMNIORB_CONFIG
, then exec's the real executable. Be aware that regenerating the device/service/component must be done carefully to avoid breakage (such as changing the name of the executable or overwriting your script).CorbaInit
. This is analogous to an execparam in SCA 2.2.2.ossie::corba::CorbaInit()
before the call to start_component()
/start_device()
/start_service()
. Subsequent calls to CorbaInit()
will be no-ops.