Websphere Application Server 6.1 连接池问题 - AS 无法获取连接时会发生什么

发布于 2024-07-27 13:19:25 字数 443 浏览 9 评论 0原文

我研究了 Websphere Application Server Express v6.1 的 Websphere 文档“连接生命周期”,并在网络上搜索了以下问题的答案。

连接池状态

  1. 选择预测试现有池连接 - 重试间隔为 0 秒
  2. 选择预测试新连接 - 重试次数为零且重试间隔为 0
  3. 预测试 SQL 字符串为“Select 'Hello' from Dual”

如果预测试失败并且重试失败,会发生什么情况

  1. 中没有任何连接 处于FreePool 状态还是InUse 状态?
  2. 有处于inFreePool状态的连接吗?

我指的是“数据源 > data_source > Websphere Application Server 数据源”中的设置

I have studied the Websphere document "Connection Life Cycle" for Websphere Application Server Express v6.1 and and have searched the web for an answer to the following.

Connection Pool State

  1. Pretest existing pooled connection is selected - retry interval is zero seconds
  2. Pretest new connections is selected - # of retries is zero and retry interval is 0
  3. Pretest SQL String is "Select 'Hello' from dual"

What happens if the pretest fails and

  1. There are no connections in the
    inFreePool or InUse state?
  2. There are connections in the inFreePool state?

I'm referring to the settings in "Data sources > data_source > Websphere Application Server data source"

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

微暖i 2024-08-03 13:19:25

应用程序调用 getConnection

  1. 如果 FreePool 中有连接,则使用预测试 SQL 字符串进行测试,并且
    如果通过测试,则将其交给应用程序。

    1. 如果测试失败,池将根据清除策略进行清除。
      1. 如果清除策略为EntirePool,则清除整个空闲池并获取并测试新连接。
      2. 如果清除策略为failingConnectionOnly,则丢弃失败的连接,并从池中获取另一个连接并进行测试。
      3. 如果池中没有连接,则会创建并测试新连接。 如果新连接失败,则会抛出异常(类型?)。
  2. 如果空闲池中没有连接,则创建一个新连接,对其进行测试,如果通过测试则将其交给应用程序。 如果新连接失败,则会引发异常。

application calls getConnection

  1. If there is a connection inFreePool then it is tested using pretest SQL string and
    handed to the application if it passes the test.

    1. If it fails the test the pool is purged according to the Purge policy.

      1. If the purge policy is EntirePool then the entire free pool is purged and a new connection is acquired and tested.
      2. If purge policy is failingConnectionOnly then the failing connection is discarded and another connection is obtained from the pool and tested.
      3. If there are no connections in the pool then a new connection is created and tested. If the new connection fails then an exception (Type?) is thrown.
  2. If there are no connections in the free pool then a new connection is created, tested and handed to the application if it passes the test. If the new connection fails then an exception is thrown.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文