Callbacks

in Help Center
Hi,
I'm trying to get callbacks working with Ice 3.3.0 and have a problem. According to the code snippit in the Biddirectional Connections section describing the server side you have the following
Now when I try and modify the bidir sample server to make the callback in the addClient() method, the server makes the callback but never returns. The client seems to be deadlocked
I'm trying to get callbacks working with Ice 3.3.0 and have a problem. According to the code snippit in the Biddirectional Connections section describing the server side you have the following
void addClient(const Ice::Identity& ident, const Ice::Current& curr) { CallbackPrx client = CallbackPrx::uncheckedCast(curr.con‑>createProxy(ident)); client‑>notify(); }
Now when I try and modify the bidir sample server to make the callback in the addClient() method, the server makes the callback but never returns. The client seems to be deadlocked
void CallbackSenderI::addClient(const Identity& ident, const Current& current) { IceUtil::Monitor<IceUtil::Mutex>::Lock lock(*this); cout << "adding client `" << _communicator->identityToString(ident) << "'"<< endl; CallbackReceiverPrx client = CallbackReceiverPrx::uncheckedCast(current.con->createProxy(ident)); _clients.insert(client); [B]client->callback( 999 );[/B] }
0
Comments
Run the server as follows and try again: Alternately you could invoke on callback() as oneway so it does not need to wait for a response.