Go Back   ZeroC Forums > Bug Reports

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 02-28-2004
damingyipai damingyipai is offline
Registered User
 
 
Join Date: Jan 2004
Posts: 59
problem when call another service at start function.

Maybe it's not a bug, but it's little discommodiousness.



I'll work with multiple service on a single IceBox server.

I want to call another service in start function(that is

IceBox::Service member), it must initialize it-self in

start function. But Ice can not specify the Services

startup order, so be desirous to call another service in

start function maybe fail, because that service maybe

not loaded by IceBox. It's a little bit discommodiousness.

maybe i can do it by another way, Can you help me?

thanks a lot.


sample code:

void
MyService1I::start(
const ::std::string& name,
const ::Ice::CommunicatorPtr& communicator,
const ::Ice::StringSeq& args)
{
m_adapter = communicator->createObjectAdapter(name);

// !!!! this call maybe fail. !!!
::jf::accounts::Connection conn = getSystemConn();

m_fs = new FilesysI( conn );
m_adapter->add( m_fs, Ice::stringToIdentity( gProxyName ) );


m_adapter->activate();
}

::jf::accounts::ConnectionPrx MyServiceI::getSystemConn(void) const
{
if ( m_system_conn ) {
return m_system_conn;
}

Ice::PropertiesPtr properties = getFilesys()->getProperties();
const std::string proxyProperty = jf::accounts::gProxyName + ".Proxy";
std::string proxy = properties->getProperty(proxyProperty);
if(proxy.empty())
{
throw jf::GenericError e;
}
Ice::ObjectPrx base = getFilesys()->getCommunicator()->stringToProxy(proxy);
::jf::accounts::AccountsPrx twoway = ::jf::accounts::AccountsPrx::checkedCast(base->ice_twoway()->ice_timeout(-1)->ice_secure(false));
m_system_conn = twoway->findConnection( jf::accounts::getSystemConnID() );
return m_system_conn;
}
Reply With Quote
  #2 (permalink)  
Old 02-28-2004
mes's Avatar
mes mes is offline
ZeroC Staff
 
Name: Mark Spruiell
Organization: ZeroC, Inc.
Project: Ice Developer
 
Join Date: Feb 2003
Location: California
Posts: 971
The next Ice release will provide the ability to specify the load order of the IceBox services. Until then, you can control the load order by using service names that produce the desired order.

- Mark
Reply With Quote
  #3 (permalink)  
Old 02-29-2004
damingyipai damingyipai is offline
Registered User
 
 
Join Date: Jan 2004
Posts: 59
thans. btw: Can you publish a roadmap?

We can arrange rate of progress to be rationalization.

like: http://www.go-mono.com/mono-roadmap.html
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
why I can't start icebox as as a Windows service? kexi Help Center 1 01-18-2007 01:02 AM
Call to a member function GetID() on a non-object rama Help Center 0 12-15-2006 10:12 AM
Simultaneously function call AlexKom Help Center 2 09-04-2005 04:26 AM
icepackregistry start service - cannot find the path specified gminorcoles Help Center 4 07-19-2005 05:25 PM
Memory leak when I dynamicly call a proxy function! weiwei Help Center 3 06-10-2004 01:39 AM


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