WebSphere Application Server 传统版和 Liberty 之间的配置差异:connectionManager 元素
Liberty 中 connectionManager 的配置与WebSphere® Application Server 传统版中连接池的配置之间存在一些差异。
- 属性的名称不同
- maxConnectionsPerThread,在WebSphere Application Server 传统版中是 maxNumberofMCsAllowableInThread。
- maxIdleTime,在WebSphere Application Server 传统版中是 unusedTimeout。
- maxPoolSize,在WebSphere Application Server 传统版中是 maxConnections。
- minPoolSize,在WebSphere Application Server 传统版中是 minConnections。
- 持续时间属性可以使用 Liberty 中的单位来选择性地指定持续时间属性。例如,
有关 connectionManager 元素的可接受时间单位和格式的更多信息,请参阅 Java Database Connectivity 4.1。如果没有指定 Liberty 中的时间单位,那么使用和WebSphere Application Server 传统版相同的缺省单位。<connectionManager id="pool1" connectionTimeout="30s" reapTime="3m" maxIdleTime="30m"/>
- 立即超时值和永不(禁用)超时之间的差异表示立即超时和永不(禁用)超时的值之间存在差异。
- Liberty 使用值 0 来表示立即,而WebSphere Application Server 传统版通常使用 -1 来表示立即。
- Liberty 使用值 -1 来表示永不(禁用),而 WebSphere Application Server 传统版 通常使用 0 来表示永不(禁用)。
- agedTimeout
- connectionTimeout
- maxIdleTime,在WebSphere Application Server 传统版中是 unusedTimeout
- reapTime
- 清除策略更改
在 Liberty 中,有三个清除策略值:EntirePool、FailingConnectionOnly 和 ValidateAllConnections。
在WebSphere Application Server 传统版中,有两个清除策略值:EntirePool 和 FailingConnectionOnly,以及另一个属性 defaultPretestOptimizationOverride,用来确定 FailingConnectionOnly 的行为。
Liberty 中的清除策略及其WebSphere Application Server 传统版等价项如下所示:
- purgePolicy="EntirePool",对于两者而言相同。
- purgePolicy="FailingConnectionOnly",等价于WebSphere Application Server 传统版中的 purgePolicy="FailingConnectionOnly" 与 defaultPretestOptimizationOverride="false"。
- purgePolicy="ValidateAllConnections",等价于WebSphere Application Server 传统版中的 purgePolicy="FailingConnectionOnly" 与 defaultPretestOptimizationOverride="true"。