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(); } }The helloClient creats a connection pool after requested, and othersClient also create their OWN connection pools. Just this issue.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>
Best regards,
Zhaoningbo


Reply With Quote
