Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 05-15-2008
sober sober is offline
Registered User
 
Name: sober ding
Organization: bupt
Project: net security mangement
 
Join Date: Mar 2008
Posts: 25
QS aboout AMI

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
Reply With Quote
  #2 (permalink)  
Old 05-16-2008
benoit's Avatar
benoit benoit is offline
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,451
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:

Code:
     void
     ice_exception(const Ice::Exception& ex)
     {
         try
         {
              ex.ice_throw();
         }
         catch(const MydefinationException& e)
         {
              cerr << e.reason << endl;
         }
     }
Cheers,
Benoit.
Reply With Quote
  #3 (permalink)  
Old 05-16-2008
sober sober is offline
Registered User
 
Name: sober ding
Organization: bupt
Project: net security mangement
 
Join Date: Mar 2008
Posts: 25
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 .


sober
Reply With Quote
  #4 (permalink)  
Old 05-16-2008
benoit's Avatar
benoit benoit is offline
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,451
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.
Reply With Quote
  #5 (permalink)  
Old 05-16-2008
sober sober is offline
Registered User
 
Name: sober ding
Organization: bupt
Project: net security mangement
 
Join Date: Mar 2008
Posts: 25
3x

thank you very much.

cheers,
Sober
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
AMI or not AMI depending on slice args? stepancheg Help Center 2 02-26-2008 03:00 PM
abut ami rellik78 Help Center 3 11-17-2006 12:27 AM
Question about AMI (C++) albertods Help Center 10 09-25-2006 06:34 AM
Help : AMI mykael Help Center 7 06-22-2006 12:23 PM
ICE::AMI is useful? zigzag Comments 8 03-29-2006 07:07 AM


All times are GMT -4. The time now is 02:20 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.