Skip to main content

How to set the naming service host at port in an Orbix client programatically?

  • May 17, 2013
  • 0 replies
  • 0 views

Summary How to set the naming service host at port in an Orbix client programatically?
Article Number 29711
Environment Product: Orbix Version: 3.3 OS: all
Question/Problem Description

I am trying to get a reference to a remote Orbix naming service from a Java client using the following code:

props.put("org.omg.CORBA.ORBInitialPort", "1575");
props.put("org.omg.CORBA.ORBInitialHost", hostname);

However, this code does not seem to redirect the request to the remote naming service, but rather a local naming service instance. What is the proper way of connecting to a remote naming service programatically?
 

Clarifying Information
Error Message
Defect/Enhancement Number
Cause
Resolution In order to connect programatically from a JAVA Orvix3.x client to a remote naming service, the following API should be used after initializing the ORB:

ORB orb = ORB.init(args, props);
_OrbixWeb.ORB(orb).setConfigItem("IT_NAMES_SERVER_HOST","160.254.94.161");
_OrbixWeb.ORB(orb).setConfigItem("IT_NS_PORT","1577");

This will modify the naming service configuration for this client. This will take precedence over any other setting in Orbix3 configuration files.
Workaround
Notes
Attachment
Created date: 12 March 2012
Last Modified: 13 February 2013
Last Published: 12 May 2012
First Published date: 12 March 2012

#KnowledgeDocs
#Orbix