Ken Kolda
9/10/2004 3:05:00 PM
You need to override the InitializeLifetimeServices() method in your client
object. You can return NULL if you wish the object to live indefinitely.
Of course, this doesn't resolve the issue of the client being stopped and
your server having a reference to a now-inaccessible object. What you need
to do is make sure that when you invoke the proxy you are catching any
exceptions that may arise due to the disconnect. If the client is
disconnected, the server should drop the proxy it's holding. There is no
built-in call to detect is the proxy is still connected to a client object
(plus, even if there were, there's no guarantee the client wouldn't die
between the time of this call and the time you invoke the actual callback
method).
Ken
"kashif" <kashif.kazi@gonetbpo.com> wrote in message
news:e75nsTylEHA.592@TK2MSFTNGP11.phx.gbl...
> Hi All
> i had a little bit tricky scenario
> I have a server apoplication eposing remote object ,
> Oject is used by client application and client object is passed as proxy
to
> server using callback mechanism
>
> Now every thing works fine but after some time (in this time their is no
> communication b/w server & CLIENT) calling method on client object by
server
> results in exception 9service not available).
>
> So wats a way to increase lifetime of proxy object to remain for ever even
> their is no communication
> secondly how i can check that proxy is still refer to some remote object (
> To know either server is running or not)
>
> thanks in advance
>
> kashif
> Programmer
>
>