Results 1 to 3 of 3

Thread: Why Server create connectionpool repeatedly while Client request Server ?

  1. #1
    zhaoningbo is offline Registered User
    Name: Ningbo Zhao
    Organization: China ChengXin Credit Management CO., LTD.
    Project: message push, a financial analysis soft.
    Join Date
    Jul 2011
    Location
    Beijing, China
    Posts
    10

    Question Why Server create connectionpool repeatedly while been requested ?

    Hi all,

    My application use the Ice-Grid-Box, and can run without any Error/Warning.But it spend lots of time on CREATING DIFFERENT CONNECTION POOL foreach different Client.

    I want to make them share only one connection pool, how/what should I do?

    The snippet of my application connection pool and application.xml as following:

    Code:
    // filename:BoneCPs. 
    // description: multiple source connection pool.
    public static Map<String, BoneCP> poolsMap = null;
    
    static {
    		try {
    			// run repeatedly
    			BoneCPsUtil bcpsUtil = new BoneCPsUtil();
    			poolsMap = bcpsUtil.getPoolsMap();
    		} catch (Exception e) {
    			e.printStackTrace();
    		}
    	}
    Code:
    <icegrid>
    	<application name="cepsApp">
    
    		<service-template id="HelloService">
    			<parameter name="name" />
    			<service name="${name}"
    				entry="com.demo.HelloService">
    				<properties>
    					<property name="Hello.Identity" value="hello" />
    				</properties>
    				<adapter name="helloAdapter-${name}" endpoints="default"
    					id="helloAdapter-${name}" replica-group="HelloGroup"
    					server-lifetime="false" />
    			</service>
    		</service-template>
    		<replica-group id="HelloGroup">
    			<load-balancing type="round-robin" n-replicas="1" />
    			<object identity="hello"
    				type="com::demo::Hello" />
    		</replica-group>		
    		<!-- other templates-->
    		
    		<node name="node1">
    			<icebox id="HelloIceBoxNode1" activation="on-demand"
    				exe="java">
    				<option>IceBox.Server</option>
    				<env>classpath=/usr/share/java/Ice.jar:/usr/share/java/db-4.8.30.jar:/opt/demoproject/lib/*:/opt/demoproject/build/classes
    				</env>
    				<properties>
    					<property name="IceBox.InstanceName" value="${server}" />
    					<property name="Ice.Admin.Endpoints" value="tcp -h 10.1.90.115" />
    					<property name="IceBox.Trace.ServiceObserver" value="1" />
    				</properties>
    				<service-instance template="HelloService"
    					name="HelloNode1First" />
    				<service-instance template="HelloService"
    					name="HelloNode1Second" />
    			</icebox>
    			<!-- other iceboxs-->
    			
    		</node>
    	</application>
    </icegrid>
    The helloClient creats a connection pool after requested, and othersClient also create their OWN connection pools. Just this issue.

    Best regards,
    Zhaoningbo
    Last edited by zhaoningbo; 09-25-2011 at 11:58 PM. Reason: for the more correct

  2. #2
    zhaoningbo is offline Registered User
    Name: Ningbo Zhao
    Organization: China ChengXin Credit Management CO., LTD.
    Project: message push, a financial analysis soft.
    Join Date
    Jul 2011
    Location
    Beijing, China
    Posts
    10

    Red face



    Hi all,

    I have solved this problem, just by combining All-Services into One-Icebox. Because I guess, I find every IceBox maintain a ENV itself. is it ?

    And to share resource between IceBox, I need more learn.

    If anyone know about this, I would be very grateful for you further help.

  3. #3
    bernard's Avatar
    bernard is online now ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    Hello,

    It's good to see you figure out this issue, although unfortunately I don't understand what it was.

    Ice does not create connection pools; it just creates connections between clients and servers. I'd suggest to read the 'Connection Management' article in this issue of the Connections newsletter for a good overview.

    With respect to IceBox, you can share more between services (in the same IceBox) by using a shared communicator.

    Best regards,
    Bernard
    Bernard Normier
    ZeroC, Inc.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 8
    Last Post: 06-05-2011, 05:08 PM
  2. Replies: 6
    Last Post: 08-15-2007, 02:08 AM
  3. Can a server close all its connections on request?
    By Ewgenijkkg in forum Help Center
    Replies: 6
    Last Post: 07-24-2007, 07:41 AM
  4. how to create a icepatch2 Server using python?
    By jeylee in forum Help Center
    Replies: 3
    Last Post: 03-11-2005, 04:05 AM
  5. Replies: 1
    Last Post: 09-12-2003, 07:18 AM

Tags for this Thread

Posting Permissions

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