使用的是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执行的错误是否是致命的,如果是的话就会销毁该连接。如果为空的话,那么任何错误都不会被认为是致命的。

jboss jndi配置部分参数详解的更多相关文章

  1. Nginx 配置及参数详解

    Nginx 配置及参数详解 Nginx Location 指令语法 如下就是常用的 location 配置的语法格式,其中modifier是可选的,location_match就是制定 URI 应该去 ...

  2. Redis 主从配置和参数详解

    安装redis 下载redis wget http://download.redis.io/releases/redis-3.0.7.tar.gz 解压redis tar -xvf redis-.ta ...

  3. pureftpd安装配置-pureftp参数详解(一)

    1. 下载 #cd /usr/local/src/ #wget ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.30.tar.g ...

  4. vsftpd 配置用户及根目录及其参数详解

    vsftpd 常用功能参数配置及参数详解 Table of Contents 1. 配置超级服务 2. 配置匿名用户 3. 配置本地用户登录 4. 配置虚拟用户登录 5. 使用SSL登入 6. 日志文 ...

  5. Nginx主配置参数详解,Nginx配置网站

    1.Niginx主配置文件参数详解 a.上面博客说了在Linux中安装nginx.博文地址为:http://www.cnblogs.com/hanyinglong/p/5102141.html b.当 ...

  6. mha配置参数详解

    mha配置参数详解: 参数名字 是否必须 参数作用域 默认值 示例 hostname Yes Local Only - hostname=mysql_server1, hostname=192.168 ...

  7. reids配置参数详解

    转自:http://www.jb51.net/article/60627.htm reids配置参数详解 #daemonize no  默认情况下, redis 不是在后台运行的,如果需要在后台运行, ...

  8. nginx配置参数详解

    配置参数详解 user nginx nginx ; Nginx用户及组:用户 组.window下不指定 worker_processes 8; 工作进程:数目.根据硬件调整,通常等于CPU数量或者2倍 ...

  9. Redis配置参数详解

    Redis配置参数详解 /********************************* GENERAL *********************************/ // 是否作为守护进 ...

随机推荐

  1. Search API 官方文档 可以用了查看自己的app

    Search API October 24, 2012 - HTTPS is now supported for Search and Lookup requests. Please update y ...

  2. ```````````````辐射度 Radiometry

    solid angel --立体角 单位 sr  球面度 dω就是对solid angel的微分 4π代表一个球 我发现dω就是对半径为1的球的表面积的微分 所以4π代表一个球  这就是球的表面积.. ...

  3. ubuntu安装后没有root密码

    新安装的ubuntu没有设置root密码,也就不能登录到root账户下.要想设置root密码需要在当前账户下输入sudo passwd,然后输入当前用户的密码,然后输入两次root的新密码,即可完成r ...

  4. 谈谈arm下的函数栈

    引言 这篇文章简要说说函数是怎么传入参数的,我们都知道,当一个函数调用使用少量参数(ARM上是少于等于4个)时,参数是通过寄存器进行传值(ARM上是通过r0,r1,r2,r3),而当参数多于4个时,会 ...

  5. Solr笔记--转载

    Solr 是一种可供企业使用的.基于 Lucene 的搜索服务器,它支持层面搜索.命中醒目显示和多种输出格式.在这篇分两部分的文章中,Lucene Java™ 的提交人 Grant Ingersoll ...

  6. Message,MessageQueue,Looper,Handler详解

    Message,MessageQueue,Looper,Handler详解   一.几个关键概念 1.MessageQueue:是一种数据结构,见名知义,就是一个消息队列,存放消息的地方.每一个线程最 ...

  7. Java加密技术

    相关链接: Java加密技术(一)——BASE64与单向加密算法MD5&SHA&MAC Java加密技术(二)——对称加密DES&AES Java加密技术(三)——PBE算法  ...

  8. lintcode: 生成括号

    生成括号 给定 n 对括号,请写一个函数以将其生成新的括号组合,并返回所有组合结果. 样例 给定 n = 3, 可生成的组合如下: "((()))", "(()())&q ...

  9. C++函数默认参数

    C++中允许为函数提供默认参数,又名缺省参数. 使用默认参数时的注意事项: ① 有函数声明(原型)时,默认参数可以放在函数声明或者定义中,但只能放在二者之一 double sqrt(double f ...

  10. Struts2笔记——自定义拦截器

    需要两个步骤,自定义类实现拦截器接口和在struts.xml注册拦截器 =============================== 1.自定义类实现com.opensymphony.xwork2. ...