使用的是jboss7.1.1, jndi的配置在$JBOSS_HOME/standalone/configuration/standalone.xml中进行配置。配置jndi时有很多参数,解释下用到的一些参数:
jndi-name
The JNDI name under which the Datasource should be bound.
datasource需要绑定的JNDI名称。
use-java-context
Boolean value indicating whether the jndi-name should be prefixed with java:. This prefix causes the Datasource to only be accessible from within the JBoss Enterprise Platform virtual machine. Defaults toTRUE.
布尔值表明是否在JNDI名称前加上前缀 "java:",默认值为"TRUE",也就是添加前缀"java:"
user-name
The user name used to create the connection to the datasource.
创建链接连接数据源的时候使用的用户名
password
The password used to create the connection to the datasource.
创建链接连接数据源的时候使用的密码
connection-url
The JDBC driver connection URL string
连接数据源的URL字符串
min-pool-size
The minimum number of connections maintained in the pool. Unless is TRUE, the pool remains empty until the first use, at which point the pool is filled to the . When the pool size drops below the due to idle timeouts, the pool is refilled to the . Defaults to 0.
数据库连接池保留的最小连接数。除非参数值为"TRUE",否则连接池在第一次使用前都将保持空连接数,当第一次使用后,数据库连接池会自动将连接数填满为所配置的最小连接数。当因为闲置而超时时,连接池将删除连接至最小连接数以下,但之后连接池会重新将连接数填为所配置的最小连接数。默认值为0.
max-pool-size
The maximum number of connections allowed in the pool. Defaults to 20.
数据库连接池允许的最大连接数。默认值为20
prefill
Whether to attempt to prefill the connection pool to the minimum number of connections. Only supporting pools (OnePool) support this feature. A warning is logged if the pool does not support prefilling. Defaults to TRUE.
是否在一开始的时候就尝试将连接池的连接数预先增加为配置的最小连接个数;否则在第一次获取连接时才启动创建最小连接个数。只有支持的连接池支持这个特性。如果连接池不支持预先填满,那么会有一个警告被打印。默认值为"TRUE"。
blocking-timeout-millis
The length of time, in milliseconds, to wait for a connection to become available when all the connections are checked out. Defaults to 30000, which is 30 seconds.
当所有的连接都被占用后,从连接池中等待一个连接变为可用的时间;如果超过该时间,则超时。单位是毫秒。默认是30000毫秒,也就是30秒。
idle-timeout-minutes
The maximum time, in minutes, before an idle connection is closed. A value of 0 disables timeout. Defaults to 15 minutes.
一个连接最大的空闲时间,超过这个时间,连接就会被关闭。如果值设置为0则禁用这个功能,默认为15分钟。后台程序会定时清理过度空闲的连接来节省数据库的连接资源。
valid-connection-checker
A class that checks whether a connection is valid using a vendor-specific mechanism.
使用一个厂商的机制来检查一个连接是否有效。
check-valid-connection-sql
An SQL statement that is executed before the connection is checked out from the pool to make sure it is still valid. If the SQL statement fails, the connection is closed and a new one is created.
在连接从连接池中被占用前会执行该SQL,来确保连接仍然有效。如果SQL执行失败,那么连接会被关闭并且同时会创建一个新的连接。
exception-sorter
A class that parses vendor-specific messages to determine whether SQL errors are fatal, and destroys the connection if so. If empty, no errors are treated as fatal.
默认情况下,jboss不会对无效的连接进行销毁,如果我们需要对异常列表中的连接进行销毁,则需要在设置该配置。该类解析每个厂商不同的应答来决定SQL执行的错误是否是致命的,如果是的话就会销毁该连接。如果为空的话,那么任何错误都不会被认为是致命的。
- Nginx 配置及参数详解
Nginx 配置及参数详解 Nginx Location 指令语法 如下就是常用的 location 配置的语法格式,其中modifier是可选的,location_match就是制定 URI 应该去 ...
- Redis 主从配置和参数详解
安装redis 下载redis wget http://download.redis.io/releases/redis-3.0.7.tar.gz 解压redis tar -xvf redis-.ta ...
- pureftpd安装配置-pureftp参数详解(一)
1. 下载 #cd /usr/local/src/ #wget ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.30.tar.g ...
- vsftpd 配置用户及根目录及其参数详解
vsftpd 常用功能参数配置及参数详解 Table of Contents 1. 配置超级服务 2. 配置匿名用户 3. 配置本地用户登录 4. 配置虚拟用户登录 5. 使用SSL登入 6. 日志文 ...
- Nginx主配置参数详解,Nginx配置网站
1.Niginx主配置文件参数详解 a.上面博客说了在Linux中安装nginx.博文地址为:http://www.cnblogs.com/hanyinglong/p/5102141.html b.当 ...
- mha配置参数详解
mha配置参数详解: 参数名字 是否必须 参数作用域 默认值 示例 hostname Yes Local Only - hostname=mysql_server1, hostname=192.168 ...
- reids配置参数详解
转自:http://www.jb51.net/article/60627.htm reids配置参数详解 #daemonize no 默认情况下, redis 不是在后台运行的,如果需要在后台运行, ...
- nginx配置参数详解
配置参数详解 user nginx nginx ; Nginx用户及组:用户 组.window下不指定 worker_processes 8; 工作进程:数目.根据硬件调整,通常等于CPU数量或者2倍 ...
- Redis配置参数详解
Redis配置参数详解 /********************************* GENERAL *********************************/ // 是否作为守护进 ...
随机推荐
- UIFontFamily
Family: Hiragino Kaku Gothic ProN W3 Font: HiraKakuProN-W3 Family: Courier Font: Courier ...
- GameMap(类结构)(不断跟新)
暂时有个疑问为什么这些需要这么复杂的继承
- Slim + Twig 构建PHP Web应用程序
Twig : PHP 视图模板引擎,类似于Smart模板引擎. 下载地址:http://twig.sensiolabs.org/ Slim: 轻量级PHP MVC框架,可用于构建Web app,Res ...
- function的prototype
prototype只有function才有的属性. var a = function() { this.age = 12; this.name = "haha"; }; a.pro ...
- JS中showModalDialog 详细使用(转)
基本介绍: showModalDialog() (IE 4+ 支持) showModelessDialog() (IE 5+ 支持) window.showModalDial ...
- Android App集成支付宝
原地址:http://blog.csdn.net/wenbingoon/article/details/7933078 手机的在线支付,被认为是2012年最看好的功能,我个人认为这也是移动互联网较传统 ...
- Firefly卡牌手游《暗黑世界V1.5》服务器端源码+GM管理后台源码
http://www.9miao.com/content-6-304.html Firefly卡牌手游<暗黑世界V1.5>服务器端源码+GM管理后台源码 关于<暗黑世界V1.5> ...
- C#&java重学笔记(泛型)
C#部分: 1.泛型的出现主要用于解决类.接口.委托.方法的通用性,通过定义泛型类.接口.委托.方法,可以让不同类型的数据使用相同运算规则处理数据,方便了开发. 2.利用System.Nullable ...
- super用法
Person类: public class Person { String _name; int _age; public Person(String name,int age) { _name= n ...
- java Timer类
java.util 类 Timer java.lang.Object java.util.Timer public class Timerextends Object 一种工具,线程用其安排以后在后台 ...