This forum has been archived. Please start a new discussion on GitHub.

Why Server create connectionpool repeatedly while Client request Server ?

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?:confused:

The snippet of my application connection pool and application.xml as following:
// 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) {
	<application name="cepsApp">

		<service-template id="HelloService">
			<parameter name="name" />
			<service name="${name}"
					<property name="Hello.Identity" value="hello" />
				<adapter name="helloAdapter-${name}" endpoints="default"
					id="helloAdapter-${name}" replica-group="HelloGroup"
					server-lifetime="false" />
		<replica-group id="HelloGroup">
			<load-balancing type="round-robin" n-replicas="1" />
			<object identity="hello"
				type="com::demo::Hello" />
		<!-- other templates-->
		<node name="node1">
			<icebox id="HelloIceBoxNode1" activation="on-demand"
					<property name="IceBox.InstanceName" value="${server}" />
					<property name="Ice.Admin.Endpoints" value="tcp -h" />
					<property name="IceBox.Trace.ServiceObserver" value="1" />
				<service-instance template="HelloService"
					name="HelloNode1First" />
				<service-instance template="HelloService"
					name="HelloNode1Second" />
			<!-- other iceboxs-->

The helloClient creats a connection pool after requested, and othersClient also create their OWN connection pools. Just this issue.

Best regards,


  • :D

    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.
  • bernard
    bernard Jupiter, FL

    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,