Results 1 to 3 of 3

Thread: bug in ice_getCachedConnection ?

  1. #1
    ctennis is offline Registered User
    Name: Caleb Tennis
    Organization: AEI
    Project: Project GINA
    Join Date
    Mar 2006
    Posts
    123

    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.

  2. #2
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    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);
    }

  3. #3
    ctennis is offline Registered User
    Name: Caleb Tennis
    Organization: AEI
    Project: Project GINA
    Join Date
    Mar 2006
    Posts
    123
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Bug of Glacier2Router
    By GlacierX in forum Bug Reports
    Replies: 5
    Last Post: 04-11-2007, 05:00 AM
  2. bug ?
    By OrNot in forum Bug Reports
    Replies: 1
    Last Post: 12-03-2005, 03:58 AM
  3. is it a bug or conflict ?
    By fw_csha in forum Help Center
    Replies: 2
    Last Post: 05-20-2005, 08:50 AM
  4. Is this a bug?
    By GlacierX in forum Bug Reports
    Replies: 5
    Last Post: 05-17-2005, 09:54 AM
  5. much like a Bug !
    By damingyipai in forum Bug Reports
    Replies: 4
    Last Post: 04-04-2004, 12:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •