Orbix: Picking up client disconnect on server

Orbix: Picking up client disconnect on server

Post by Andy » Tue, 22 Jul 2003 15:50:41



Hi folks,

 Am messing around with orbix 3.01.

 I have three methods, connect(), doSomthing() and disconnect() which
need to be called in sequence by each client.

 Basically, the connect() method sets up some data for the client and
the disconnect() method performs a clean up.

 My problem is that if I abnormally terminate the client before the
disconnect() call (by pressing Ctrl C),  the server displays a message
 saying  IIOP connection terminated.

Does anyone know how I can trap this event in the server, so that
 I can call the disconnect() method the the client that just died.

Cheers
Andy

 
 
 

Orbix: Picking up client disconnect on server

Post by Brian Kel » Wed, 23 Jul 2003 00:45:51


Hi Andy,

Quote:>  Am messing around with orbix 3.01.

>  I have three methods, connect(), doSomthing() and disconnect() which
> need to be called in sequence by each client.

>  Basically, the connect() method sets up some data for the client and
> the disconnect() method performs a clean up.

>  My problem is that if I abnormally terminate the client before the
> disconnect() call (by pressing Ctrl C),  the server displays a message
>  saying  IIOP connection terminated.

> Does anyone know how I can trap this event in the server, so that
>  I can call the disconnect() method the the client that just died.

With Orbix 3.x, you can use IOCallbacks to detect IIOP connection
closure (the docs have details on how to use them).

However, in CORBA you should never really assume that a client
connection closure means that the client has exited - ORBs can
use connection management techniques that close connections while
the client is still alive. The Orbix ASP product contains a
session management technology that abstracts above this layer
and can be used to reliably detect when a client has terminated.

Cheers,
Brian
IONA Technologies

 
 
 

Orbix: Picking up client disconnect on server

Post by Andy » Wed, 23 Jul 2003 14:48:07


Cheers for that.
   Its mainly so that I can ensure that database connections are
    closed and released to the pool correctly. Its easier for me
    to re-assign them again if the client re-connects than it
    is for me to try and manage them in the hope that the client
    may come back.



Quote:>Hi Andy,

>>  Am messing around with orbix 3.01.

>>  I have three methods, connect(), doSomthing() and disconnect() which
>> need to be called in sequence by each client.

>>  Basically, the connect() method sets up some data for the client and
>> the disconnect() method performs a clean up.

>>  My problem is that if I abnormally terminate the client before the
>> disconnect() call (by pressing Ctrl C),  the server displays a message
>>  saying  IIOP connection terminated.

>> Does anyone know how I can trap this event in the server, so that
>>  I can call the disconnect() method the the client that just died.

>With Orbix 3.x, you can use IOCallbacks to detect IIOP connection
>closure (the docs have details on how to use them).

>However, in CORBA you should never really assume that a client
>connection closure means that the client has exited - ORBs can
>use connection management techniques that close connections while
>the client is still alive. The Orbix ASP product contains a
>session management technology that abstracts above this layer
>and can be used to reliably detect when a client has terminated.

>Cheers,
>Brian
>IONA Technologies

 
 
 

1. Orbix 3.0.1 clients to Orbix 2000 server

All those suffering through the pangs of migration:

We are in the process of migrating from Orbix 3.0.1 to Orbix 2000 1.2.1.

As it turns out, all our clients cannot be converted to Orbix 2000 yet. I
tried reading about the config changes I need to make that's allow these
legacy clients to find Orbix 2000 server (our interfaces remained exact
same).

Now, Orbix 3.0.1 clients relied on 4 different parameters to locate the
server and these were embedded in the config files - (1) server hostname (2)
IT_DAEMON_PORT, (3) IT_DAEMON_SERVER_BASE and (4) IT_NS_PORT.

I am assuming these map to the "new world" of Orbix 2000 as follows:
(1) server hostname            = Orbix 2000's  Locator hostname
(2) IT_DAEMON_PORT    = Orbix 2000's Locator port
(3) IT_DAEMON_SERVER_BASE    = No freaking idea!! Need help!
(4) IT_NS_PORT                = Orbix 2000's Locator port???

Question:
1 - Are these assumptions correct?
2 - What is the value of IT_DAEMON_SERVER_BASE since it is a poa world now?!
3 - What is the impact of using configuration domain services on the server
on the legacy clients?

[The documentation at Iona does not discuss any of these details, and only
instructs putting the following in the common.cfg:
services{
    INS = "IOR:4567...";
]

Any help would be greatly appreciated!

essbee

2. WANTED: Toshiba 3401 CD-ROM drive

3. ORBIX-Web clients with ORBIX-server via orbixd

4. TCP/IP 3.0 name resolution?

5. Orbix-TAO; Orbix client unable to _narrow to TAO server provided IOR

6. Need patch Q294769

7. Orbix: one client process, one server host, two server processes?

8. server notification when clients disconnect?

9. Is server notified of client disconnect?

10. How can server tell when client disconnects?

11. Client-server between Pick and Dos/Windows

12. Connecting to a PICK database in Client Server mode