Archived
This forum has been archived. Please start a new discussion on GitHub.
QS aboout AMI
in Help Center
Hi,there
Should I implement op_async() in Server Side when I just using AMI, and how can I get MydefinationException's detail , I mean the reason , I test just to find it print MydefinationException not the reason. Is this because ice_exception(const ::IceException& e)?
thank you !
sober
Should I implement op_async() in Server Side when I just using AMI, and how can I get MydefinationException's detail , I mean the reason , I test just to find it print MydefinationException not the reason. Is this because ice_exception(const ::IceException& e)?
thank you !
sober
0
Comments
-
Hi,
AMI is a client side API only, you don't have anything to change on the server if your client is using AMI. You need to cast or re-throw the exception to access its attributes, for example:void ice_exception(const Ice::Exception& ex) { try { ex.ice_throw(); } catch(const MydefinationException& e) { cerr << e.reason << endl; } }
Cheers,
Benoit.0 -
3x
Hi,
Thanks for your reply , I see.
And one more question, if I use AMI to send file block by block ,can these blocks reached sequently ?
How can I do to achieve this , use Ice.ThreadPool.Server.Serialize=1 ?
thank you .
sober0 -
Hi,
Yes, you can use Ice.ThreadPool.Server.Serialize=1 to ensure that AMI calls received over the connection are dispatched sequentially. Note that this is only necessary if you configure multiple threads for your server thread pool.
Cheers,
Benoit.0 -
3x
thank you very much.
cheers,
Sober0