[omniORB] Problem with Persistent POA

srinath duraisamy mail2srinathd at gmail.com
Fri Oct 30 16:44:07 GMT 2009


Hi Duncan, Igor

Thanks for you suggestions.

@Duncan
I tried your suggestions.
I started my server with -ORBendPoint option. Run my client got a reference
for server from naming service.
When I restarted the server again I am getting the following error

$ build/Server.exe -ORBInitRef NameService=corbaname::localhost -ORBendPoint
giop:tcp:localhost:2810
omniORB: Failed to bind to address 127.0.0.1 port 2810. Address in use?
omniORB: Error: Unable to create an endpoint of this description:
giop:tcp:localhost:2810
Caught CORBA::INITIALIZE

It is not able rebind to the port again. Whether I have to do anything in
windows for rebinding the port.

Also I tried testing persistent_objref example in omniORB source code. I
redirected the output to a file and run the eg2_clt.exe with IOR as argument
first time it is working fine. when I restart the server(using ctrl+c)
client gives
Caught a CORBA::OBJECT_NOT_EXIST error.

What I am doing wrong here? is this problem with my version of omniORB(my
version is omniORB-4.1.3) or my assumption is wrong.

Thanks and regards
Srinath.D





On Thu, Oct 29, 2009 at 8:30 PM, Duncan Grisby <duncan at grisby.org> wrote:

> On Thu, 2009-10-29 at 14:14 +0100, Igor Lautar wrote:
>
> [...]
> > > Since Server POA is with PERSISTENT policy the reference of the object
> > > should be valid even server gets restarted. But when I restart the
> server
> > > and call a method with the same reference, I am getting the
> COMM_FAILURE
> > > exception.
> > >
> > > Have any one faced this error with omniorb ? or correct me if my
> > > understanding is wrong.
> >
> > So you're trying to achieve that your IOR are not changing when service
> is
> > restarted?
> >
> > The only way to do it with omniORB (others, correct me if I'm wrong) is
> to use
> > omniINSPOA. Actually, we use it in that way and there is no need for
> naming
> > service then (as corbaloc URI can be used instead).
>
> omniINSPOA is an orthogonal thing to what Srinith is asking.
>
> If you use a PERSISTENT POA, and want its object references to survive
> restarts, you must also ensure it starts up with the same endPoints each
> time, by setting the endPoint parameter suitably. For example, you can
> make it always start listening on port 12345 by giving command line
> arguments -ORBendPoint giop:tcp::12345
>
> omniINSPOA allows you to create objects with simple string keys,
> allowing you to use simple corbaloc URIs to refer to persistent objects.
> If you do that, you probably also want to specify endPoints, otherwise
> the port number will change each time.
>
> Cheers,
>
> Duncan.
>
> --
>  -- Duncan Grisby         --
>  -- duncan at grisby.org     --
>   -- http://www.grisby.org --
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20091030/a4cb6bf1/attachment.htm


More information about the omniORB-list mailing list