Do all the <server>s in host.xml of JBoss share the same database pool configuration?

172 views Asked by At

Inside my host.xml file, I have the following entry:

<servers>
    <server name="server-one" group="application-group" auto-start="true">
        <socket-bindings socket-binding-group="full-sockets" port-offset="1"/>
    </server>
    <server name="server-two" group="application-group" auto-start="true">
        <socket-bindings socket-binding-group="full-sockets" port-offset="2"/>
    </server>
</servers>

In the domain.xml, I have data source configured like this:

<datasource jta="true" jndi-name="java:/myApp" pool-name="java:/myApp" enabled="true" use-ccm="true">
    <connection-url>some_url</connection-url>
    <driver>ojdbc6.jar</driver>
    <pool>
        <min-pool-size>10</min-pool-size>
        <max-pool-size>50</max-pool-size>
        <flush-strategy>IdleConnections</flush-strategy>
    </pool>
</datasource>

Since the max pool size is specified at 50, does it mean that its the max pool 50 per server (specified in host.xml) or its the overall pool size shared by all servers?

1

There are 1 answers

1
Panagiotis Chavariotis On

The pool configurations are copied to each JVM(server). Servers cannot share a single physical pool of connections. If a pool has a max-pool-size of 50, this value should be multiplied by the number of JVMs using the profile (include all JVMs using the profile on all hosts). According to your example, the potential number of open connections could reach 50*2 (depending on usage).