Results 1 to 2 of 2

Thread: Ice::Plugin && Ice::LoggerPlugin

  1. #1
    Andrew is offline Registered User
    Name: Andrea Nicotra
    Organization: Personal
    Project: Backend for IPTV
    Join Date
    Jan 2008
    Posts
    29

    Ice::Plugin && Ice::LoggerPlugin

    hi, I try to make a plugin for send the logs messages to an icestorm service

    but when i try to do the checkedCast I receive an exception ( icestorm service is up because is used from other client)

    the exception is that:
    Ice::Excetpion : Reference.cpp:1585: Ice::NoEndpointException:
    no suitable endpoint available for proxy `MyStorm/TopicManager -t @ StormAdapter'

    Code:
    void
    IceLoggerPlugin::initialize()
    {
           ...
            try
            {
                    IceStorm::TopicManagerPrx topicManager = IceStorm::TopicManagerPrx::checkedCast(m_com->stringToProxy(props->getProperty("Log.topicManagerPrx") ));
            }
            catch(Ice::Excetpion& ex )
            {
                    cout << "  Ice::Excetpion : "<< ex.what()  << endl;
            }
    
    }

  2. #2
    mes's Avatar
    mes
    mes is online now ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,445
    Hi Andrew,

    Your plugin is attempting to use an indirect proxy, which requires that the communicator be configured with a locator. However, Ice does not configure the communicator's default locator until after the plugins are initialized. This is necessary because the locator's proxy might use endpoints that depend on a transport plugin.

    You should be able to work around this by manually configuring your proxy with a locator. For example:
    Code:
    Ice::ObjectPrx obj =
        m_com->stringToProxy(props->getProperty("Ice.Default.Locator"));
    Ice::LocatorPrx locator = Ice::LocatorPrx::checkedCast(obj);
    obj = m_com->stringToProxy(props->getProperty("Log.topicManagerPrx"));
    obj = obj->ice_locator(locator);
    IceStorm::TopicManagerPrx topicManager =
        IceStorm::TopicManagerPrx::checkedCast(obj);
    Also note that if your logger uses SSL, you must ensure that the IceSSL plugin is loaded before your logger plugin.

    Hope that helps,
    Mark

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 13
    Last Post: 05-08-2008, 08:38 AM
  2. visual Studio & ice 3.0 & Global Assembly Cache
    By loheron in forum Help Center
    Replies: 7
    Last Post: 11-23-2006, 07:39 AM
  3. Replies: 22
    Last Post: 02-07-2006, 08:12 AM
  4. Using ICE in .NET 1.1 && .NET 2.0
    By dmitry.medvedev in forum Help Center
    Replies: 8
    Last Post: 01-27-2006, 03:48 AM
  5. Ice && crob jobs
    By xdm in forum Help Center
    Replies: 2
    Last Post: 09-23-2004, 09:04 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
  •