Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 08-31-2006
rc_hz rc_hz is offline
Registered User
 
Name: Eric RC
Organization: www.genband.com
Project: No project yet
 
Join Date: Jul 2004
Location: Hangzhou, China
Posts: 189
Send a message via MSN to rc_hz
-->
How to disable Ice's reestablish-connection behavior ?

This is the requirement: If a proxy really established a connection to the server and then at some time the connection is broken, the proxy does not reestablish the connection in all later operation calls. Suppose we have configured: Ice.RetryIntervals=-1.

That is:
Code:
ObjectPrx proxy = ...;          //timeA: get a proxy at timeA
proxy.ping();                      //timeB: really establish the connection

...                                    //timeC: the connection is broken for some reason

proxy.ping();		//timeD: 
proxy.ping();		//timeE:
proxy.ping();		//timeF:
we want the operations at timeD/E/F all fail and don't try to reestablish a connection to the server.
__________________
Eric RC
www.genband.com (telecommunication)
I like ICE (Ice for C++/Java/Python)
Reply With Quote
  #2 (permalink)  
Old 08-31-2006
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,781
You could use a fixed connection proxy:

Code:
ObjectPrx proxy = ...;          //timeA: get a proxy at timeA
proxy.ping();                      //timeB: really establish the connection

proxy = proxy.getConnection().createProxy(proxy.getIdentity());

...                                    //timeC: the connection is broken for some reason

proxy.ping();		//timeD: 
proxy.ping();		//timeE:
proxy.ping();		//timeF:
Reply With Quote
  #3 (permalink)  
Old 08-31-2006
rc_hz rc_hz is offline
Registered User
 
Name: Eric RC
Organization: www.genband.com
Project: No project yet
 
Join Date: Jul 2004
Location: Hangzhou, China
Posts: 189
Send a message via MSN to rc_hz
-->
Great! Thank you!

By the way, it should be:
Code:
...
proxy = proxy.ice_getConnection().createProxy(proxy.ice_getIdentity());
...
__________________
Eric RC
www.genband.com (telecommunication)
I like ICE (Ice for C++/Java/Python)
Reply With Quote
  #4 (permalink)  
Old 08-31-2006
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,781
I'm glad that I could help. As an aside, can you please update your signature with the name of your organization and the project you are working on? Please see this post for details.
Reply With Quote
  #5 (permalink)  
Old 08-31-2006
rc_hz rc_hz is offline
Registered User
 
Name: Eric RC
Organization: www.genband.com
Project: No project yet
 
Join Date: Jul 2004
Location: Hangzhou, China
Posts: 189
Send a message via MSN to rc_hz
-->
Thank you, Marc. I like Ice very much and now just study and evaluate it(Ice for C++, Ice for Java, Ice for Python). Until now, I have no chance to put Ice into practical use because my company just uses corba and Tuxedo. It's a sorrow for me!
__________________
Eric RC
www.genband.com (telecommunication)
I like ICE (Ice for C++/Java/Python)
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
Disable marshalling mykael Help Center 4 07-05-2006 11:26 AM
Disable features mykael Help Center 1 07-03-2006 05:28 AM
Can I use Ice's smart pointer with my own type? timeguest Help Center 1 06-27-2005 05:17 AM
Change in Behavior in 2.1 from 2.0 acbell Help Center 3 04-22-2005 02:29 PM
Why allow undefined behavior ? Mogens Hansen Comments 2 02-19-2003 05:46 PM


All times are GMT -4. The time now is 05:33 PM.


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