- 浏览: 3473531 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
wanglf1207:
EJB的确是个不错的产品,只是因为用起来有点门槛,招来太多人吐 ...
weblogic-ejb-jar.xml的元素解析 -
qwfys200:
总结的不错。
Spring Web Flow 2.0 入门 -
u011577913:
u011577913 写道也能给我发一份翻译文档? 邮件437 ...
Hazelcast 参考文档-4 -
u011577913:
也能给我发一份翻译文档?
Hazelcast 参考文档-4 -
songzj001:
DbUnit入门实战
本文地址:http://qzone.qq.com/blog/454389842-1217557897
<!-- 文章内容开始-->Tomcat设置方法
在配置Context连接池参数时候加上如下参数:复制内容到剪贴板代码:
<parameter>
<name>validationQuery</name>
<value>SELECT COUNT(*) FROM DUAL</value>
</parameter>
<parameter>
<name>testOnBorrow</name>
<value>true</value>
</parameter>
<parameter>
<name>testOnReturn</name>
<value>true</value>
</parameter>
<parameter>
<name>testWhileIdle</name>
<value>true</value>
</parameter>testOnBorrow、 testOnReturn、testWhileIdle,这些属性的意义是取得、返回对象和空闲时是否进行验证,检查对象是否有效,默认都为false即 不验证。所以当使用DBCP时,数据库连接因为某种原因断掉后,再从连接池中取得连接又不进行验证,这时取得的连接实际已经时无效的数据库连接了,只有把 这些属性设为true,再提供validationQuery语句就可以保证数据库连接始终有效了,oracle数据库可以使用SELECT COUNT(*) FROM DUAL,不过DBCP要求validationQuery语句查询的记录集必须不为空,可能这也可以算一个小小的BUG,其实只要 validationQuery语句执行通过就可以了。
Weblogic设置方法
进入某个连接池配置页,进入“连接“页,点击高级选项的”show“显示高级选项。
指定 "测试频率" 并启用 "测试保留的连接"、"测试创建的连接" 和 "测试释放的连接"。
测试频率(Test Frequency): 60 秒
自动数据库连接测试之间的秒数(0 - 32 位正整数)。测试失败的连接将被关闭,然后重新打开以重新建立有效的物理数据库连接。(必须在下面指定测试表名称。)
The number of seconds (between 0 and a positive 32-bit integer) between automatic database connection tests. Connections that fail the test are closed and reopened to re-establish a valid physical database connection. (You must specify a Test Table Name below.)
测试保留的连接(Test Reserved Connections)
指定 WebLogic Server 是否在将连接提供给客户端之前测试该连接。(必须在下面指定测试表名称。)
Specifies whether WebLogic Server tests a connection before giving it to the client. (You must specify a Test Table Name below.)
测试创建的连接(Test Created Connections)
指定 WebLogic Server 是否在创建连接后且将该连接添加到缓冲池中可用连接列表之前对该连接进行测试。(必须指定测试表名称。)
Specifies whether WebLogic Server tests a connection after creating it but before adding it to the list of connections available in the pool. (You must specify a Test Table Name.)
测试释放的连接(Test Released Connections)
指定 WebLogic Server 是否在将连接返回到该 JDBC 连接缓冲池之前测试该连接。(必须指定测试表名称。)
Specifies whether WebLogic Server tests a connection before returning it to this JDBC connection pool. (You must specify a Test Table Name.)
连接保留超时(Connection Reserve Timeout): 设为 30 秒
在保留缓冲池连接的调用超时之前的秒数(-1 - 32 位正整数)。如果设置为 -1,则调用永远不会超时。
The number of seconds (between -1 and a positive 32-bit integer) after which a call to reserve a connection from the pool will timeout. When set to 0, a call will never timeout. When set to -1, a call will timeout immediately
重试创建连接的频率(Connection Creation Retry Frequency): 设为 30 秒
尝试建立与数据库的连接的间隔秒数(0 - 32 位正整数)。适用于在数据库不可用的情况下服务器启动时创建的连接缓冲池。
The number of seconds (between 0 and a positive 32-bit integer) between attempts to establish connections to the database. Applies to connection pools created at server startup when the database is unavailable.
钝化连接超时(Inactive Connection Timeout):
The number of inactive seconds on a reserved connection (between 0 and a positive 32-bit integer) before WebLogic Server reclaims the connection and releases it back into the connection pool.
服务器申请复议连接并且保留返回给连接池前的钝化时间
测试表名称(Test Table Name):
oracle的连接池默认为 SQL SELECT 1 FROM DUAL,sybase数据库可以填入一个记录不多的配置表名例如sys_code。
The name of the database table to use when testing physical database connections. This field is required when you specify a Test Frequency and enable Test Reserved Connections, Test Created Connections, and Test Released Connections
在配置Context连接池参数时候加上如下参数:复制内容到剪贴板代码:
<parameter>
<name>validationQuery</name>
<value>SELECT COUNT(*) FROM DUAL</value>
</parameter>
<parameter>
<name>testOnBorrow</name>
<value>true</value>
</parameter>
<parameter>
<name>testOnReturn</name>
<value>true</value>
</parameter>
<parameter>
<name>testWhileIdle</name>
<value>true</value>
</parameter>testOnBorrow、 testOnReturn、testWhileIdle,这些属性的意义是取得、返回对象和空闲时是否进行验证,检查对象是否有效,默认都为false即 不验证。所以当使用DBCP时,数据库连接因为某种原因断掉后,再从连接池中取得连接又不进行验证,这时取得的连接实际已经时无效的数据库连接了,只有把 这些属性设为true,再提供validationQuery语句就可以保证数据库连接始终有效了,oracle数据库可以使用SELECT COUNT(*) FROM DUAL,不过DBCP要求validationQuery语句查询的记录集必须不为空,可能这也可以算一个小小的BUG,其实只要 validationQuery语句执行通过就可以了。
Weblogic设置方法
进入某个连接池配置页,进入“连接“页,点击高级选项的”show“显示高级选项。
指定 "测试频率" 并启用 "测试保留的连接"、"测试创建的连接" 和 "测试释放的连接"。
测试频率(Test Frequency): 60 秒
自动数据库连接测试之间的秒数(0 - 32 位正整数)。测试失败的连接将被关闭,然后重新打开以重新建立有效的物理数据库连接。(必须在下面指定测试表名称。)
The number of seconds (between 0 and a positive 32-bit integer) between automatic database connection tests. Connections that fail the test are closed and reopened to re-establish a valid physical database connection. (You must specify a Test Table Name below.)
测试保留的连接(Test Reserved Connections)
指定 WebLogic Server 是否在将连接提供给客户端之前测试该连接。(必须在下面指定测试表名称。)
Specifies whether WebLogic Server tests a connection before giving it to the client. (You must specify a Test Table Name below.)
测试创建的连接(Test Created Connections)
指定 WebLogic Server 是否在创建连接后且将该连接添加到缓冲池中可用连接列表之前对该连接进行测试。(必须指定测试表名称。)
Specifies whether WebLogic Server tests a connection after creating it but before adding it to the list of connections available in the pool. (You must specify a Test Table Name.)
测试释放的连接(Test Released Connections)
指定 WebLogic Server 是否在将连接返回到该 JDBC 连接缓冲池之前测试该连接。(必须指定测试表名称。)
Specifies whether WebLogic Server tests a connection before returning it to this JDBC connection pool. (You must specify a Test Table Name.)
连接保留超时(Connection Reserve Timeout): 设为 30 秒
在保留缓冲池连接的调用超时之前的秒数(-1 - 32 位正整数)。如果设置为 -1,则调用永远不会超时。
The number of seconds (between -1 and a positive 32-bit integer) after which a call to reserve a connection from the pool will timeout. When set to 0, a call will never timeout. When set to -1, a call will timeout immediately
重试创建连接的频率(Connection Creation Retry Frequency): 设为 30 秒
尝试建立与数据库的连接的间隔秒数(0 - 32 位正整数)。适用于在数据库不可用的情况下服务器启动时创建的连接缓冲池。
The number of seconds (between 0 and a positive 32-bit integer) between attempts to establish connections to the database. Applies to connection pools created at server startup when the database is unavailable.
钝化连接超时(Inactive Connection Timeout):
The number of inactive seconds on a reserved connection (between 0 and a positive 32-bit integer) before WebLogic Server reclaims the connection and releases it back into the connection pool.
服务器申请复议连接并且保留返回给连接池前的钝化时间
测试表名称(Test Table Name):
oracle的连接池默认为 SQL SELECT 1 FROM DUAL,sybase数据库可以填入一个记录不多的配置表名例如sys_code。
The name of the database table to use when testing physical database connections. This field is required when you specify a Test Frequency and enable Test Reserved Connections, Test Created Connections, and Test Released Connections
发表评论
-
collectd
2011-08-03 14:27 2239collectd是一个守护(daemon)进程,用来收集系 ... -
HP ASR(Automatic Server Recovery)机制
2011-04-15 14:24 3517ASR(Automatic Server Re ... -
LINUX下用HP的IML工具查看服务器的日志信息
2011-04-14 16:40 4806LINUX下用HP的IML工具查看 ... -
LINUX做服务器的无盘系统
2011-01-26 18:19 1890客户端是支持PXE方式启 ... -
简易搭建一个私有云平台
2010-11-17 18:30 3173众说周知Amazon EC2是一个公共云的计算平台,属于Iaa ... -
[HA]利于heartbeat构建Oracle高可用
2010-09-17 12:41 472210月 24th, 2008 @ Kevin.yuan ... -
服务部署--IP SAN潜在的关键应用
2010-08-26 09:38 2060IP SAN可以说是近几年来存储领域的关键技术之一, ... -
通过HAProxy构建开源负载均衡架构平台
2010-08-09 00:07 49471. 目的 通过此作业指导书,知道如何使用ubu ... -
MySQL负载均衡
2010-08-08 23:39 46421. 添加监控MySQL状态的端口 # vi /etc/se ... -
Ha-proxy 学习
2010-08-08 23:08 8923什么是ha-proxy ... -
SQL Server 各版本的区别
2010-08-08 17:49 3965SQL Server 2005 Enterprise Ed ... -
Oracle数据库11g版本介绍
2010-08-08 17:44 3451无论您是独立开发者、中小企业还是大型企业,这些世界一 ... -
tpmC简单计算法
2010-07-29 18:59 17922计算原则: 以单台服务器性能进行计算,即确保单台服务器工作的时 ... -
KVM遥控服务器群
2010-07-07 15:54 2119众所周知,所谓KVM,就是键盘(Keyboard)、显示器 ... -
数据存储配置参考
2010-07-02 10:07 1774型号 配 置 数量 ... -
More Numbers (OpenDS and a hint at ApacheDS)
2010-04-29 23:45 2450Some more numbers have come in. ... -
利用Copssh在windows下搭建ssh服务
2010-03-09 01:04 13402现在远程维护基本上用ssh连接,linux系 ... -
Taking a load off: Load balancing with balance
2010-03-05 16:00 1761A server is limited in how man ... -
Software Based Load Balancers
2010-03-05 15:57 1794keyword:Load Balance ref: http ... -
SAN,NAS,DAS及其架构之间区别
2010-02-26 14:11 1648随着计算机技术的发展 ...
相关推荐
weblogic连接池配置数据库断掉重连的问题
tomcat 调用weblogic EJB tomcat 调用weblogic EJB
服务器tomcat和weblogic区别[参考].pdf
weblogic与oracle数据库通过连接池连接及测试代码 另有myeclipse中weblogic服务器下使用jsf1.2的设置步骤
Tomcat和weblogic中文乱码问题解决方案
weblogic项目移植到tomcat,配置说明
项目框架从tomcat到weblogic
1、 介绍安装步骤,重点注意事项; 2、 集群规划,搭建主要步骤,重点注意事项; 3、 编制简单脚本进行优化,参数调优。 4、 最全面、最实用 5、 教程适用于各种版本 ...脚本进行优化,tomcat参数调优
WebLogic连接Oracle数据库的配置流程图解
1、weblogic数据源的配置,2、数据库连接配置,3、jndi连接方式配置
在WebLogic中建立数据库连接池与数据源及利用JBuilder进行测试
tomcat和weblogic共2页.pdf.zip
Weblogic 服务器的基本配置 Weblogic 服务器的基本配置 Weblogic 服务器的基本配置 Weblogic 服务器的基本配置
本文档主要描述weblogic服务器如何配置。希望能够帮到大家!
解决weblogic时间与系统时间不一致的问题
此文档描述了tomcat、weblogic、jboss的区别,并且根据不同的环境运用不同的容器,做了解析。
在WebLogic中建立数据库连接池与数据源及利用JBuilder进行测试.pdf
图文并茂,详细描述pinpoint安装部署、监控tomcat、weblogic、webSphere 实际操作,自己编写
IIS、Apache、Tomcat、Weblogic、WebSphere都各属于哪种服务器,这些问题困惑了很久,今天终于梳理清楚了: Web服务器的基本功能就是提供Web信息浏览服务。它只需支持HTTP协议、HTML文档格式及URL。与客户端的网络...
WebLogic服务器管理概述