Archived
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: :confused:](https://forums.zeroc.com/resources/emoji/confused.png)
The snippet of my application connection pool and application.xml as following:
The helloClient creats a connection pool after requested, and othersClient also create their OWN connection pools. Just this issue.
Best regards,
Zhaoningbo
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: :confused:](https://forums.zeroc.com/resources/emoji/confused.png)
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) { e.printStackTrace(); } }
<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
0
Comments
-
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.0 -
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,
Bernard0