Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 01-16-2007
lucsat's Avatar
lucsat lucsat is offline
Registered User
 
Name: Jordi Rubio
Organization: Grupo Intercom
Project: I+D
 
Join Date: Oct 2005
Location: Terrassa
Posts: 15
Multiple objects with IceGrid

Hi,

I'm testing your Allocate IceGrid demo, and I don't understand why the client can only create a Hello object in the simple case.

This is the xml configuration file:

<icegrid>

<application name="Allocate">

<node name="localhost">
<server id="AllocateServer" exe="java" activation="on-demand">
<option>Server</option>
<adapter name="Hello" endpoints="tcp" register-process="true">
<allocatable identity="hello" type=":emo::Hello"/>
</adapter>
<property name="Identity" value="hello"/>
</server>
</node>

</application>

</icegrid>

I would like to create 1 object per connecion, without restrictions (10 clients, 10 objects, i.e). I have tried with <property name="Hello.ThreadPool.Size" value="5"/> but it doesn't work.

Thanks a lot your time

Cheers
__________________
Jordi Rubio Moreno
Grupo Intercom
www.grupointercom.com
Reply With Quote
  #2 (permalink)  
Old 01-16-2007
lucsat's Avatar
lucsat lucsat is offline
Registered User
 
Name: Jordi Rubio
Organization: Grupo Intercom
Project: I+D
 
Join Date: Oct 2005
Location: Terrassa
Posts: 15
Hi again,

I'm sorry... I have change my new signature :P

Cheers
__________________
Jordi Rubio Moreno
Grupo Intercom
www.grupointercom.com
Reply With Quote
  #3 (permalink)  
Old 01-16-2007
benoit's Avatar
benoit benoit is online now
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,542
Hi,

The demo doesn't create one Ice object per client -- it demonstrates the IceGrid allocation (in the sense of reserving or leasing) feature of Ice objects: when a client allocates an object, other clients can't allocate the object until it's released. See the Ice manual for more information on the IceGrid allocation mechanism.

If you want to allow multiple clients to invoke concurrently on the same object, you don't need to use the IceGrid allocation mechanism (just take a look at the IceGrid simple demo).

If you want to have one object per client, you need to implement a factory on the server to allow the client to create objects. You'll have to make sure to correctly clean up the server resources when the client goes away. I recommend you to take a look at the Issue 3 of the Ice newsletter for more information on how to do this (and at this FAQ for the reason why tying the object lifetime to the connection is a not a good idea).

Cheers,
Benoit.
Reply With Quote
  #4 (permalink)  
Old 01-16-2007
lucsat's Avatar
lucsat lucsat is offline
Registered User
 
Name: Jordi Rubio
Organization: Grupo Intercom
Project: I+D
 
Join Date: Oct 2005
Location: Terrassa
Posts: 15
Hi benoit,

ok, I understand what you mean to me

Thanks a lot for helping me

Best regards!
__________________
Jordi Rubio Moreno
Grupo Intercom
www.grupointercom.com
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
passing objects nicole Help Center 5 02-12-2007 10:12 PM
Multiple Layers of Redirection in IceGrid zhi Help Center 1 11-22-2006 05:28 AM
How can I get all Objects in evictor db? Yunqiao Yin Help Center 2 02-10-2006 04:21 AM
Objects and Proxies ganzuoni Help Center 1 06-18-2003 03:49 PM


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