Go Back   ZeroC Forums > Bug Reports

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 07-23-2007
ctennis ctennis is offline
Registered User
 
Name: Caleb Tennis
Organization: AEI
Project: Project GINA
 
Join Date: Mar 2006
Posts: 120
bug in ice_getCachedConnection ?

I'm not sure if this is a bug or not, but it seems to defy the behavior in the manual:

In the IceRuby bindings, I can't get the ice_getCachedConnection() method to ever return anything but nil. Whether the connection is really open, closed, or I'm using a locator, even if I force connection caching with ice_connectionCached(), it always seems to just return nil and doesn't return any type of Connection information like ice_getConnection(). I've kind of assumed this was because I was using locators, but the Ruby bindings don't exhibit any change when not using a location service so I thought I would bring it up.

All that said, I've noticed that the C++ version of ice_getCachedConnection always seems to return null (which might explain what's going on in the Ruby bindings). Again, I've verfied my connection is established and can see it via netstat, but never get anything other than a null proxy with ice_getCachedConnection(). Again, this might be something to do with locators; I'm not sure.

Is there a trick to using ice_getCachedConnection or a gotcha that may not be in the manual?

--------

Separately, when I was testing connection failures, I was able to create this error:

Code:
irb(main):015:0> ps.getPublishedValue(200)
Ice::TimeoutException: Ice::TimeoutException
        from (eval):345:in `invoke'
        from (eval):345:in `getPublishedValue'
        from (irb):15
irb(main):016:0> ps.getPublishedValue(200)
Ice::ConnectFailedException: Ice::ConnectFailedException
        from (eval):345:in `invoke'
        from (eval):345:in `getPublishedValue'
        from (irb):16
irb(main):019:0> ps.ice_getCachedConnection
RuntimeError: unknown Ice exception: IceUtil::NullHandleException
.... un-useful backtrace

Thanks,
Caleb
__________________
Caleb Tennis
Analytical Engineering, Inc.
http://www.aei-tech.com
Project: Our facility infrastructure heavily utilizes Ice

Gentoo ebuild maintainer for Ice, IceRuby, etc.
Reply With Quote
  #2 (permalink)  
Old 07-23-2007
matthew's Avatar
matthew matthew is offline
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,055
Thanks for the report. This is a bug in the ruby plug-in. It will be fixed for Ice 3.2.1. To fix this apply the following patch to src/IceRuby/Proxy.cpp:

index 98fa699..3601eba 100644
--- a/rb/src/IceRuby/Proxy.cpp
+++ b/rb/src/IceRuby/Proxy.cpp
@@ -1002,7 +1002,7 @@ IceRuby_ObjectPrx_ice_getCachedConnection(VALUE self)
{
Ice::ObjectPrx p = getProxy(self);
Ice::ConnectionPtr conn = p->ice_getCachedConnection();
- if(!conn)
+ if(conn)
{
return createConnection(conn);
}
Reply With Quote
  #3 (permalink)  
Old 07-24-2007
ctennis ctennis is offline
Registered User
 
Name: Caleb Tennis
Organization: AEI
Project: Project GINA
 
Join Date: Mar 2006
Posts: 120
Thanks, Matthew!
__________________
Caleb Tennis
Analytical Engineering, Inc.
http://www.aei-tech.com
Project: Our facility infrastructure heavily utilizes Ice

Gentoo ebuild maintainer for Ice, IceRuby, etc.
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
Bug in documentation acbell Bug Reports 1 02-24-2006 05:29 PM
bug ? OrNot Bug Reports 1 12-03-2005 04:58 AM
is it a bug or conflict ? fw_csha Help Center 2 05-20-2005 09:50 AM
Is this a bug? GlacierX Bug Reports 5 05-17-2005 10:54 AM
much like a Bug ! damingyipai Bug Reports 4 04-04-2004 01:41 AM


All times are GMT -4. The time now is 07:50 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.