Hi,
In my project I have a seperate logging application. I use remoting to log
to it. The remoted object exposes a certain (log-)interface, and the methods
therein are all OneWay methods (decorated with the OneWay attribute).
In my real application, I connect to the remoted log-object (using
RemotingServices.Connect). This returns a proxy for the remoted object, which
I cast to the logging-interface.
This always succeeds because the Connect call simply returns a proxy. So at
the point of connection, I cannot deduce whether the remoted object is
actually alive (or started). Since all the methods in the logging interface
are OneWay, calling them always succeeds, so again there is no way of telling
whether the remoted object is present.
The problem is the following. I start my application, but not my
logging-application (which hosts the remoted logging object). My application
logs a lot and it calls the methods in the logging-interface without getting
remoting-exceptions whatsoever. But after a few method calls on the
logging-interface, these method calls start to become _very_ slow, so slow
that my program seems to hang.
I suspect that a call to a OneWay method posts these calls in a queue
somewhere, and that the queue starts to fill up after a while because the
queue is never emptied (since my remoted object is not alive).
Anyway, I don't know a solution to this. Does anyone know how to solve this
issue?
I thought about making one dummy-method in the interface just to ensure that
the logging-application is started. This dummy-method would not be OneWay,
and if calling it throws a remoting exception then I can just disable the
logging calls. But that seems more like a workaround and not a real solution.
Any input is appreciated.
Thanks,
--
Tom Tempelaere.