tuscany-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Lottermann <tomlotterm...@gmail.com>
Subject What is the best way to notify a client?
Date Sun, 21 Oct 2012 11:57:04 GMT
I have a question about the interaction with the client application
using tuscany (1.6).
I need to push data to the client.
There are two different ideas that I came across in order to achieve this:
1) Registering for a callback for every client (by calling a register
method which provides a callback). I tried implementing the following
post: http://mail-archives.apache.org/mod_mbox/tuscany-user/200906.mbox/%3C11512CD2E0C72C4DB2D6FC2413F40BA102A7BDB7FB@ks1.B2MSoftwareAG.local%3E
The problem is, that when I start two clients only one gets notified.
It seems like it is only possible to register one callback per
composite service.
Am I doing something wrong? Is there a way to make this work?

2) Implementing it based on the notification (producer/consumer)
example in the samples of tuscany 1.6 (bit with java interfaces
instead of wsdl infertaces).
The problem here is that whenever i close a client the call to the
clients throws an exception.
This is ugly (since other exceptions are printed int he console) but it works.
Never the less: whenever I restart the client it receives the messages
twice and after a second restart it receives the same messages three
times and so on. That means that the client is not disconnected from
the server.
Is there a way to do so? If that is the case I would prefer this solution.

Thomas Lottermann

View raw message