[omniORB] omniNames: IOR object key issue

Satya B bsatya72 at yahoo.com
Sat Sep 25 03:33:41 BST 2004


Hi,
 
Thanks a lot for your reply. We need a different key in order to make JDK1.3 client understand omni generated IOR. The JDK1.3.x client reads an ior file to connect to the server.
 
Question: if ORB_init() reads the user-specified key from the .cfg or the cmd line override, why not omniNames?
 

The above question was infact prompted by a user quoting your suggestion to modify the object key to circumvent jdk 1.3 and omniORB compatibility issues.
 
So I modified the files omniNames.cc and log.cc (.h) - sent in the nameservice object key - as a default parameter of type char* to the omniNameslog.init().
 
Read the key from the -ORBInitRef on command line to omniNames and supplied the parameter in place of the "NameService" hard-coded string - default it to "NameService" if one is not specified on cmd line.
 
This way I was able to make omniNames generate an IOR of an even number of bytes (by varying the string for the key) - 44 in our case - earlier it was 39 bytes - also divisible by 4 -- and this JDK1.3.x ORB was able to decipher this new IOR. This way we are able to circumvent the problem of the omni generated IOR not being compatible with JDK1.3.x ORB. It earlier generated the ArrayIndexOutOfBounds error. The other option was to upgrade to JDK1.4.x which we cannot readily do at this time.
 
Similarly, with genior - if the GIOP version were configurable, we believe JDK1.3.x ORB would not generate the INV_OBJREF or the codeset related exception upon reading the generated ior.
 
I am sort of a beginner to CORBA programming - please do correct if the above workaround is inaccurate or violates any design specification. Not sure if omniORB code can incorporate the above change.
 
Thanks,
Satya.

Duncan Grisby <duncan at grisby.org> wrote:
On Wednesday 15 September, Satya B wrote:

> In the omniorb.cfg file the following is specified
> 
> InitRef = NameService=corbaname::1.0 at localhost:14003/MyService
> 
> When omniNames is run - however - the IOR shows the object key as
> "NameService" and not "MyService". I tried specifying the same on
> command line -ORBInitRef - still did not work. I need omninames to
> output the IOR with different object key.

The omniORB.cfg file is for configuring _clients_ to the naming
service. omniNames does not look at it at all. omniNames is hardcoded
to use the standard key "NameService". Why would you want a different
key?

> Another issue is - genior always produces an IOR with GIOP 1.2 - is
> there no way to output an IOR with GIOP 1.0?

Not without modifying genior, no.

Cheers,

Duncan.

-- 
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20040925/0ca4cf63/attachment-0001.htm


More information about the omniORB-list mailing list