[omniORB] How to create a Persistance Corba server

Mahanta, Dhruba Dhruba.Mahanta at kla-tencor.com
Sat Nov 20 14:27:33 GMT 2010


Hi Duncan

Thanks for your quick response. As you suggested, I do that to specify the IP and Port while initializing as below:

CORBA::ORB_var objCorbaOrb;
string strIP, strPort;

GetIPPort(strIP, strPort);
string strConfiguredIP_Port = "giop:tcp:" + strIP + ":" + strPort; 
const char* options[][2] = { { "endPoint", strConfiguredIP_Port.c_str() }, { 0, 0 } }; 

objCorbaOrb = CORBA::ORB_init(argc, argv, "omniORB4", options);

I did not mention the above part in my early code snip shot in order to keep it short.

But still it did not worked as expected. Please help to figure out the issue.


Regards
Dhruba

-----Original Message-----
From: Duncan Grisby [mailto:duncan at grisby.org] 
Sent: Friday, November 19, 2010 8:00 PM
To: Mahanta, Dhruba
Cc: omniORB-list at omniorb-support.com
Subject: Re: [omniORB] How to create a Persistance Corba server

On Wed, 2010-11-17 at 20:41 +0800, Mahanta, Dhruba wrote:

> Requirement: Corba server should be persistent so that even if the
> Corba server application restarted, or the computer hosting Corba
> server is rebooted, Corba Client application need not be
> reinitialized.

As well as using a persistent policy POA (which you are, by using the
omniINSPOA), you must pin down the port the server listens on.
Otherwise, the server will listen on a different port chosen by the OS
each time it starts. You need to give an endPoint parameter:

  http://omniorb.sourceforge.net/omni41/omniORB/omniORB008.html#toc42

Cheers,

Duncan.

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




More information about the omniORB-list mailing list