使用的是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 *********************************/ // 是否作为守护进 ...
随机推荐
- JAVA算法系列 冒泡排序
java算法系列之排序 手写冒泡 冒泡算是最基础的一个排序算法,简单的可以理解为,每一趟都拿i与i+1进行比较,两个for循环,时间复杂度为 O(n^2),同时本例与选择排序进行了比较,选择排序又叫直 ...
- UML状态图(转载)
概述: 图表本身的名称,阐明该图的目的和其他细节.它描述了在一个系统中的一个组成部分不同的状态.状态是特定的一个系统的组件/对象. 状态图描述了一个状态机.我们阐明的状态机可以被定义为一台机器,它定义 ...
- HTTP常见返回代码(HTTP Status codes)的分类和含义
HTTP错误主要分成三类:用户设备问题.Web服务器问题和连接问题.当客户端向Web服务器发送一个HTTP请求时,服务器都会返回一个响应代码.而这些响应代码主要分成五类. HTTP状态码中定义了5大类 ...
- 了解Javascript 变量
javascript语言变量的作用域可以分为局部变量和全局变量 函数内部定义的变量为局部变量,作用范围在整个函数体内,函数外定义的变量为全局变量,如果在函数内部定义变量时没有使用关键字var,那么该变 ...
- http authorization basic请求代码示例
/** * */ package testJava.java; import java.io.BufferedReader; import java.io.InputStream; import ja ...
- 初识layer 快速入门
http://layer.layui.com/hello.html 如果,你初识layer,你对她不知所措,你甚至不知如何绑定事件… 那或许你应该用秒做单位,去认识她. 开始了解 第一步:部署 下载l ...
- C# WINFORM 捕获全局异常
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Thr ...
- Linux下TOmcat调试命令
1.显示linux系统的环境变量:env命令,会显示JAVA_HOME,Catalina,CLASSPATH等系统变量 2.
- php curl getinfo
<?php $ch = curl_init("http://www.baidu.com/"); echo "<pre>";print_r ...
- Struts2笔记——Action校验器
在struts2中,我们可以实现对action的所有方法进行校验或者对action的指定方法进行校验. 对于输入校验struts2提供了两种实现方法: 1.采用手工编写代码实现. 2.基于XML配置 ...