Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 03-28-2004
Jonathan Jonathan is offline
Registered User
 
 
Join Date: Dec 2003
Posts: 5
Question Self access problem

A simple interface as below:
Code:
interface Hello
{
	string say();
};
and its implementation has been registered as a global object "hello" during initialization:
Code:
	Ice::ObjectPtr object = new HelloI();
	Ice::ObjectPrx obj = _adapter->add(object, Ice::stringToIdentity("hello"));
	IcePack::AdminPrx admin = IcePack::AdminPrx::checkedCast(
		communicator->stringToProxy("IcePack/Admin")
	);
	admin->addObjectWithType(obj, "::Hello");
The problem is, inside the implemetation of Hello::say, cannot I access the "hello" object? The following code could not run.
Code:
::std::string
HelloI::say(const Ice::Current& current)
{
	// thread blocked here
	HelloPrx hello = HelloPrx::checkedCast(
		current.adapter->getCommunicator()->stringToProxy("hello")
	);
	return "hi";
}
What's wrong?

Last edited by Jonathan : 03-29-2004 at 10:08 AM.
Reply With Quote
  #2 (permalink)  
Old 03-29-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
Hi,

I'm pretty sure that you're encountering a thread pool size limitation. The default size of the server thread pool is one, therefore if a server makes a call to itself the server will deadlock unless the size of the thread pool is increased.

The property to set is Ice.ThreadPool.Server.Size.

Take care,
- Mark
Reply With Quote
  #3 (permalink)  
Old 03-31-2004
Jonathan Jonathan is offline
Registered User
 
 
Join Date: Dec 2003
Posts: 5
Yeah, it's the problem. Thanks very much.
I've seen the warning but I forgot this
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
Can I Simultenously Access an ICE server alexm Help Center 1 11-17-2006 04:19 AM
DLL access violation youkind Help Center 2 08-15-2006 05:47 AM
Why concurrent access to FreezeMap is so slow? kingbo Help Center 4 05-27-2006 01:06 AM
service access control problem yomi Help Center 7 04-04-2004 11:36 AM
Access Violation using ICE with Automation DLL amrufon Help Center 2 08-07-2003 12:14 AM


All times are GMT -4. The time now is 11:28 AM.


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.