- 浏览: 159943 次
- 性别:
- 来自: 济南
文章分类
- 全部博客 (103)
- ORA-19815: WARNING: db_recovery_file_dest_size of 2147483648 bytes is 100.00% used (1)
- SUN-solaris (1)
- liunx------suse平台 (1)
- alter system switch logfile和alter system archive log current的区别 (1)
- http://shanchao7932297.blog.163.com/blog/static/1363624201131534318387/ (1)
- http://linuxkeep.blog.51cto.com/1010009/634472 (1)
- http://download.chinaunix.net/download.php?id=24294&ResourceID=12275 (1)
- http://zhumeng8337797.blog.163.com/blog/static/100768914201182810548991/ (1)
- 安装mysql,在./configure时出现错误:error: No curses/termcap library found的解决办法 (1)
- http://www.docin.com/p-79019394.html (1)
- http://wenku.it168.com/d_000410287.shtml (1)
- http://www.db2china.net/club/thread-24311-1-1.html (1)
- Download DB2 Fix Packs by version for DB2 for Linux (1)
- UNIX and Windows (1)
- http://www.db2china.net/club/viewthread.php?tid=26443 (1)
- http://beijing.qianpin.com/goods/103761.html?showGoods=true&abacusoutsid=api_fee_360_103761 (1)
- http://www.db2china.net/home/space.php?uid=23781&do=blog&id=18855 (1)
- http://www.db2china.net/club/search.php?searchid=19&orderby=lastpost&ascdesc=desc&searchsubmit=yes (0)
- http://www.db2china.net/home/space.php?uid=23781&do=blog&id=18853 (1)
- http://www.db2china.net/home/space.php?uid=26946&do=blog&id=13104 (1)
- 北京社保卡缴费记录查询网站 (1)
- http://blog.sina.com.cn/s/blog_58dc4b630100fesx.html (0)
- http://www.db2china.net/home/space.php?uid=26946&do=blog&id=14419 (1)
- itpub数据库猎头招聘 (0)
- http://www.itpub.net/thread-1128353-1-1.html (1)
- aix (0)
- nub的使用 (0)
最新评论
jboss中连接池的相关配置
一、中间件配置
主要配置在JBOSS服务器的server/default/deploy目录下oracle-ds.xml文件。主要参数说明:
local-tx-datasource:本地数据源配置根标记名;
jndi-name:数据源JNDI名称,对应Application.properties文件中配置;
driver-class:数据库连接驱动类;
connection-url:数据库连接URL字符串;
user-name:数据库连接用户名;
password:数据库连接密码;
min-pool-size:连接池可激活最小连接数;
max-pool-size:连接池可激活最大连接数;
blocking-timeout-millis:抛出异常前最大的等待连接时间,单位毫秒;
idle-timeout-minutes:连接池已激活的空闲连接超时时间,单位秒。
二、事务管理机制
EJB容器初始化数据持久化环境SessionContext;
用户调用某一xxxSessionBean中的事务方法;
xxxSessionBean调用某一业务逻辑xxxLogic操作;
xxxLogic调用DAO层存取数据;
当2~4过程中出现异常,sessionContext调用方法setRollbbackonly来捕捉异常,并且把该异常转化为EJBException(继承自RuntimeException)继续抛出,同时回滚事务。
三、事务管理配置
由JBOSS的EJB容器管理事务,一般是配置在JBOSS的server/default/conf目录下jboss-service.xml文件中。具体配置参数说明如下:
<mbean code="org.jboss.tm.TransactionManagerService"
name="jboss:service=TransactionManager"
xmbean-dd="resource:xmdesc/TransactionManagerService-xmbean.xml">
<!-- 容器管理事务超时时间,单位秒 -->
<attribute name="TransactionTimeout">300</attribute>
<!-- 容器管理事务的全局标示。值为true表示启用全局性事务,false表示不启用 -->
<attribute name="GlobalIdsEnabled">true</attribute>
<depends optional-attribute-name="XidFactory">jboss:service=XidFactory</depends>
</mbean>
四、JAVA代码获取数据库连接
[java] view plaincopyprint?
package com.sunrise.www.utils;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.sunrise.www.utils.exception.DAOException;
public class DAOUtils {
private static final Log log = LogFactory.getLog(DAOUtils.class);
private static boolean datasource_flag = false;
private static boolean read_datasource_flag = true;
private static boolean read_direct_conn_flag = false;
private static String datasource_name = null;
public static Connection getDBConnection(String datasourceName)
throws DAOException {
try {
return ServiceLocator.getInstance().getDataSource(datasourceName).getConnection();
} catch (Exception ex) {
throw new DAOException("Cannot connect to database.", ex);
}
}
public static Connection getDBConnection() throws DAOException {
try {
if (read_datasource_flag) {
String tmp = SystemConfig.getDefaultConfig("USE_DATASOURCE").toLowerCase();
datasource_flag = Boolean.parseBoolean(tmp);
read_datasource_flag = false;
}
Connection conn = null;
if (!datasource_flag) {
String user = "", password = "", url = "", driver = "";
if (!read_direct_conn_flag) {
user = SystemConfig.getDefaultConfig("USER");
password = SystemConfig.getDefaultConfig("PASSWORD");
url = SystemConfig.getDefaultConfig("URL");
driver = SystemConfig.getDefaultConfig("DATABASEDRIVER");
read_direct_conn_flag = true;
}
Class.forName(driver).newInstance();
conn = DriverManager.getConnection(url, user, password);
conn.setAutoCommit(true);
} else {
if (datasource_name == null)
datasource_name = SystemConfig.getDefaultConfig("DATASOURCE_NAME");
conn = getDBConnection(datasource_name);
}
return conn;
} catch (Exception ex) {
log.error("连接数据库出错", ex);
throw new DAOException(ex);
}
}
public static void closeAll(Connection dbConnection,
PreparedStatement stmt, ResultSet result) throws DAOException {
close(result);
close(stmt);
close(dbConnection);
}
public static void close(Connection dbConnection, PreparedStatement stmt)
throws DAOException {
close(stmt);
close(dbConnection);
}
public static void close(Connection dbConnection) throws DAOException {
try {
if (dbConnection != null && !dbConnection.isClosed()) {
dbConnection.close();
dbConnection = null;
}
} catch (SQLException se) {
throw new DAOException("SQL Exception while closing " + "DB connection : /n", se);
}
}
public static void close(ResultSet result) throws DAOException {
try {
if (result != null) result.close();
} catch (SQLException se) {
throw new DAOException("SQL Exception while closing " + "Result Set : /n", se);
}
}
public static void close(PreparedStatement stmt) throws DAOException {
try {
if (stmt != null) stmt.close();
} catch (SQLException se) {
throw new DAOException("SQL Exception while closing " + "Statement : /n", se);
}
}
/**
* @return read_datasource_flag
*/
public static boolean isRead_datasource_flag() {
return read_datasource_flag;
}
/**
* @param read_datasource_flag
* 设置read_datasource_flag
*/
public static void setRead_datasource_flag(boolean read_datasource_flag) {
DAOUtils.read_datasource_flag = read_datasource_flag;
}
}
package com.sunrise.www.utils;
import java.util.Hashtable;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.sunrise.www.utils.exception.ServiceLocatorException;
public class ServiceLocator {
private static Log log = LogFactory.getLog(ServiceLocator.class);
private static ServiceLocator serviceLocator;
private static InitialContext context;
private static Hashtable<String, DataSource> datasourceTable = new Hashtable<String, DataSource>();
private ServiceLocator() throws ServiceLocatorException {
try {
context = getInitialContext();
} catch (Exception e) {
log.error(e.getMessage());
throw new ServiceLocatorException(e.getMessage());
}
}
/**
* 取得一个服务定位器的实例
* @return
* @throws ServiceLocatorException
*/
public static synchronized ServiceLocator getInstance()
throws ServiceLocatorException {
if (serviceLocator == null)
serviceLocator = new ServiceLocator();
return serviceLocator;
}
/**
* 取J2EE服务器的相关环境变量
* @return
* @throws NamingException
*/
public static InitialContext getInitialContext() throws NamingException {
return new InitialContext();
}
/**
* 取指定的 data source
* @param datasourceName
* @return
* @throws ServiceLocatorException
*/
public DataSource getDataSource(String datasourceName)
throws ServiceLocatorException {
try {
DataSource dataSource = (DataSource) datasourceTable.get(datasourceName);
if (dataSource == null) {
dataSource = (DataSource) context.lookup(actualJndiName(datasourceName));
if (dataSource == null) {
log.error("不能初始化系统对象: " + datasourceName);
throw new ServiceLocatorException("不能初始化系统对象: " + datasourceName);
}
datasourceTable.put(datasourceName, dataSource);
}
return dataSource;
} catch (NamingException ne) {
log.error(ne.getMessage());
throw new ServiceLocatorException(ne);
}
}
private String actualJndiName(String jndiName) throws NamingException {
String prefixes = (String) context.getEnvironment().get(InitialContext.URL_PKG_PREFIXES);
return ((prefixes != null && prefixes.contains("jboss")) ? "java:/" : "") + jndiName;
}
}
package com.sunrise.www.utils;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
import com.sunrise.www.utils.exception.SystemConfigException;
public class SystemConfig {
private static final String DEFAULT_CONFIG = "Application.properties";
private static ClassLoader defaultClassLoader;
private SystemConfig() {
}
/**
* Returns the default classloader (may be null).
*
* @return The default classloader
*/
public static ClassLoader getDefaultClassLoader() {
return defaultClassLoader;
}
/**
* Sets the default classloader
*
* @param defaultClassLoader -
* the new default ClassLoader
*/
public static void setDefaultClassLoader(ClassLoader defaultClassLoader) {
SystemConfig.defaultClassLoader = defaultClassLoader;
}
/**
* Returns a resource on the classpath as a Properties object
*
* @param resource
* The resource to find
* @return The resource
* @throws IOException
* If the resource cannot be found or read
*/
public static Properties getResourceAsProperties(String resource)
throws IOException {
Properties props = new Properties();
InputStream in = null;
String propfile = resource;
in = getResourceAsStream(propfile);
props.load(in);
in.close();
return props;
}
/**
* Returns a resource on the classpath as a Properties object
*
* @param loader
* The classloader used to load the resource
* @param resource
* The resource to find
* @return The resource
* @throws IOException
* If the resource cannot be found or read
*/
public static Properties getResourceAsProperties(ClassLoader loader,
String resource) throws IOException {
Properties props = new Properties();
InputStream in = null;
String propfile = resource;
in = getResourceAsStream(loader, propfile);
props.load(in);
in.close();
return props;
}
/**
* Returns a resource on the classpath as a Stream object
*
* @param resource
* The resource to find
* @return The resource
* @throws IOException
* If the resource cannot be found or read
*/
public static InputStream getResourceAsStream(String resource)
throws IOException {
return getResourceAsStream(getClassLoader(), resource);
}
/**
* Returns a resource on the classpath as a Stream object
*
* @param loader
* The classloader used to load the resource
* @param resource
* The resource to find
* @return The resource
* @throws IOException
* If the resource cannot be found or read
*/
public static InputStream getResourceAsStream(ClassLoader loader,
String resource) throws IOException {
InputStream in = null;
if (loader != null)
in = loader.getResourceAsStream(resource);
if (in == null)
in = ClassLoader.getSystemResourceAsStream(resource);
if (in == null)
throw new IOException("Could not find resource " + resource);
return in;
}
private static ClassLoader getClassLoader() {
if (defaultClassLoader != null) {
return defaultClassLoader;
} else {
return Thread.currentThread().getContextClassLoader();
}
}
// 本行以上代码拷贝自com.ibatis.common.resources.Resources
/**
* 从默认配置文件(Application.properties)中读取配置
*
* @param key
* 键
* @param defaultValue
* 默认值
* @return
*/
public static String getDefaultConfig(String key, String defaultValue) {
return loadProperties(DEFAULT_CONFIG).getProperty(key, defaultValue);
}
public static String getDefaultConfig(String key) {
return loadProperties(DEFAULT_CONFIG).getProperty(key);
}
public static String getConfig(String resource, String key) {
return loadProperties(resource).getProperty(key);
}
public static String getConfig(String resource, String key,
String defaultValue) {
return loadProperties(resource).getProperty(key);
}
public static Properties loadProperties(String resource) {
try {
Properties props = getResourceAsProperties(resource);
if(props != null){
return props;
}
throw new SystemConfigException("Resource " + resource + " is not exist.");
} catch (IOException e) {
throw new SystemConfigException(e);
}
}
}
主要配置在JBOSS服务器的server/default/deploy目录下oracle-ds.xml文件。主要参数说明:
local-tx-datasource:本地数据源配置根标记名;
jndi-name:数据源JNDI名称,对应Application.properties文件中配置;
driver-class:数据库连接驱动类;
connection-url:数据库连接URL字符串;
user-name:数据库连接用户名;
password:数据库连接密码;
min-pool-size:连接池可激活最小连接数;
max-pool-size:连接池可激活最大连接数;
blocking-timeout-millis:抛出异常前最大的等待连接时间,单位毫秒;
idle-timeout-minutes:连接池已激活的空闲连接超时时间,单位秒。
二、事务管理机制
EJB容器初始化数据持久化环境SessionContext;
用户调用某一xxxSessionBean中的事务方法;
xxxSessionBean调用某一业务逻辑xxxLogic操作;
xxxLogic调用DAO层存取数据;
当2~4过程中出现异常,sessionContext调用方法setRollbbackonly来捕捉异常,并且把该异常转化为EJBException(继承自RuntimeException)继续抛出,同时回滚事务。
三、事务管理配置
由JBOSS的EJB容器管理事务,一般是配置在JBOSS的server/default/conf目录下jboss-service.xml文件中。具体配置参数说明如下:
<mbean code="org.jboss.tm.TransactionManagerService"
name="jboss:service=TransactionManager"
xmbean-dd="resource:xmdesc/TransactionManagerService-xmbean.xml">
<!-- 容器管理事务超时时间,单位秒 -->
<attribute name="TransactionTimeout">300</attribute>
<!-- 容器管理事务的全局标示。值为true表示启用全局性事务,false表示不启用 -->
<attribute name="GlobalIdsEnabled">true</attribute>
<depends optional-attribute-name="XidFactory">jboss:service=XidFactory</depends>
</mbean>
四、JAVA代码获取数据库连接
[java] view plaincopyprint?
package com.sunrise.www.utils;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.sunrise.www.utils.exception.DAOException;
public class DAOUtils {
private static final Log log = LogFactory.getLog(DAOUtils.class);
private static boolean datasource_flag = false;
private static boolean read_datasource_flag = true;
private static boolean read_direct_conn_flag = false;
private static String datasource_name = null;
public static Connection getDBConnection(String datasourceName)
throws DAOException {
try {
return ServiceLocator.getInstance().getDataSource(datasourceName).getConnection();
} catch (Exception ex) {
throw new DAOException("Cannot connect to database.", ex);
}
}
public static Connection getDBConnection() throws DAOException {
try {
if (read_datasource_flag) {
String tmp = SystemConfig.getDefaultConfig("USE_DATASOURCE").toLowerCase();
datasource_flag = Boolean.parseBoolean(tmp);
read_datasource_flag = false;
}
Connection conn = null;
if (!datasource_flag) {
String user = "", password = "", url = "", driver = "";
if (!read_direct_conn_flag) {
user = SystemConfig.getDefaultConfig("USER");
password = SystemConfig.getDefaultConfig("PASSWORD");
url = SystemConfig.getDefaultConfig("URL");
driver = SystemConfig.getDefaultConfig("DATABASEDRIVER");
read_direct_conn_flag = true;
}
Class.forName(driver).newInstance();
conn = DriverManager.getConnection(url, user, password);
conn.setAutoCommit(true);
} else {
if (datasource_name == null)
datasource_name = SystemConfig.getDefaultConfig("DATASOURCE_NAME");
conn = getDBConnection(datasource_name);
}
return conn;
} catch (Exception ex) {
log.error("连接数据库出错", ex);
throw new DAOException(ex);
}
}
public static void closeAll(Connection dbConnection,
PreparedStatement stmt, ResultSet result) throws DAOException {
close(result);
close(stmt);
close(dbConnection);
}
public static void close(Connection dbConnection, PreparedStatement stmt)
throws DAOException {
close(stmt);
close(dbConnection);
}
public static void close(Connection dbConnection) throws DAOException {
try {
if (dbConnection != null && !dbConnection.isClosed()) {
dbConnection.close();
dbConnection = null;
}
} catch (SQLException se) {
throw new DAOException("SQL Exception while closing " + "DB connection : /n", se);
}
}
public static void close(ResultSet result) throws DAOException {
try {
if (result != null) result.close();
} catch (SQLException se) {
throw new DAOException("SQL Exception while closing " + "Result Set : /n", se);
}
}
public static void close(PreparedStatement stmt) throws DAOException {
try {
if (stmt != null) stmt.close();
} catch (SQLException se) {
throw new DAOException("SQL Exception while closing " + "Statement : /n", se);
}
}
/**
* @return read_datasource_flag
*/
public static boolean isRead_datasource_flag() {
return read_datasource_flag;
}
/**
* @param read_datasource_flag
* 设置read_datasource_flag
*/
public static void setRead_datasource_flag(boolean read_datasource_flag) {
DAOUtils.read_datasource_flag = read_datasource_flag;
}
}
package com.sunrise.www.utils;
import java.util.Hashtable;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.sunrise.www.utils.exception.ServiceLocatorException;
public class ServiceLocator {
private static Log log = LogFactory.getLog(ServiceLocator.class);
private static ServiceLocator serviceLocator;
private static InitialContext context;
private static Hashtable<String, DataSource> datasourceTable = new Hashtable<String, DataSource>();
private ServiceLocator() throws ServiceLocatorException {
try {
context = getInitialContext();
} catch (Exception e) {
log.error(e.getMessage());
throw new ServiceLocatorException(e.getMessage());
}
}
/**
* 取得一个服务定位器的实例
* @return
* @throws ServiceLocatorException
*/
public static synchronized ServiceLocator getInstance()
throws ServiceLocatorException {
if (serviceLocator == null)
serviceLocator = new ServiceLocator();
return serviceLocator;
}
/**
* 取J2EE服务器的相关环境变量
* @return
* @throws NamingException
*/
public static InitialContext getInitialContext() throws NamingException {
return new InitialContext();
}
/**
* 取指定的 data source
* @param datasourceName
* @return
* @throws ServiceLocatorException
*/
public DataSource getDataSource(String datasourceName)
throws ServiceLocatorException {
try {
DataSource dataSource = (DataSource) datasourceTable.get(datasourceName);
if (dataSource == null) {
dataSource = (DataSource) context.lookup(actualJndiName(datasourceName));
if (dataSource == null) {
log.error("不能初始化系统对象: " + datasourceName);
throw new ServiceLocatorException("不能初始化系统对象: " + datasourceName);
}
datasourceTable.put(datasourceName, dataSource);
}
return dataSource;
} catch (NamingException ne) {
log.error(ne.getMessage());
throw new ServiceLocatorException(ne);
}
}
private String actualJndiName(String jndiName) throws NamingException {
String prefixes = (String) context.getEnvironment().get(InitialContext.URL_PKG_PREFIXES);
return ((prefixes != null && prefixes.contains("jboss")) ? "java:/" : "") + jndiName;
}
}
package com.sunrise.www.utils;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
import com.sunrise.www.utils.exception.SystemConfigException;
public class SystemConfig {
private static final String DEFAULT_CONFIG = "Application.properties";
private static ClassLoader defaultClassLoader;
private SystemConfig() {
}
/**
* Returns the default classloader (may be null).
*
* @return The default classloader
*/
public static ClassLoader getDefaultClassLoader() {
return defaultClassLoader;
}
/**
* Sets the default classloader
*
* @param defaultClassLoader -
* the new default ClassLoader
*/
public static void setDefaultClassLoader(ClassLoader defaultClassLoader) {
SystemConfig.defaultClassLoader = defaultClassLoader;
}
/**
* Returns a resource on the classpath as a Properties object
*
* @param resource
* The resource to find
* @return The resource
* @throws IOException
* If the resource cannot be found or read
*/
public static Properties getResourceAsProperties(String resource)
throws IOException {
Properties props = new Properties();
InputStream in = null;
String propfile = resource;
in = getResourceAsStream(propfile);
props.load(in);
in.close();
return props;
}
/**
* Returns a resource on the classpath as a Properties object
*
* @param loader
* The classloader used to load the resource
* @param resource
* The resource to find
* @return The resource
* @throws IOException
* If the resource cannot be found or read
*/
public static Properties getResourceAsProperties(ClassLoader loader,
String resource) throws IOException {
Properties props = new Properties();
InputStream in = null;
String propfile = resource;
in = getResourceAsStream(loader, propfile);
props.load(in);
in.close();
return props;
}
/**
* Returns a resource on the classpath as a Stream object
*
* @param resource
* The resource to find
* @return The resource
* @throws IOException
* If the resource cannot be found or read
*/
public static InputStream getResourceAsStream(String resource)
throws IOException {
return getResourceAsStream(getClassLoader(), resource);
}
/**
* Returns a resource on the classpath as a Stream object
*
* @param loader
* The classloader used to load the resource
* @param resource
* The resource to find
* @return The resource
* @throws IOException
* If the resource cannot be found or read
*/
public static InputStream getResourceAsStream(ClassLoader loader,
String resource) throws IOException {
InputStream in = null;
if (loader != null)
in = loader.getResourceAsStream(resource);
if (in == null)
in = ClassLoader.getSystemResourceAsStream(resource);
if (in == null)
throw new IOException("Could not find resource " + resource);
return in;
}
private static ClassLoader getClassLoader() {
if (defaultClassLoader != null) {
return defaultClassLoader;
} else {
return Thread.currentThread().getContextClassLoader();
}
}
// 本行以上代码拷贝自com.ibatis.common.resources.Resources
/**
* 从默认配置文件(Application.properties)中读取配置
*
* @param key
* 键
* @param defaultValue
* 默认值
* @return
*/
public static String getDefaultConfig(String key, String defaultValue) {
return loadProperties(DEFAULT_CONFIG).getProperty(key, defaultValue);
}
public static String getDefaultConfig(String key) {
return loadProperties(DEFAULT_CONFIG).getProperty(key);
}
public static String getConfig(String resource, String key) {
return loadProperties(resource).getProperty(key);
}
public static String getConfig(String resource, String key,
String defaultValue) {
return loadProperties(resource).getProperty(key);
}
public static Properties loadProperties(String resource) {
try {
Properties props = getResourceAsProperties(resource);
if(props != null){
return props;
}
throw new SystemConfigException("Resource " + resource + " is not exist.");
} catch (IOException e) {
throw new SystemConfigException(e);
}
}
}
相关推荐
tomcat、jboss 连接池配置,详细步骤,准确代码,让你实践中学会这两种服务器的连接池配置
jboss配置Oracle连接池.doc
在Eclipse中使用JBoss数据库连接池技术 配置:JBoss 5.0 Eclipse Platform3.4 MySQL4.0 在Eclipse中使用JDBC桥来连接数据库大家应该都很熟悉,今天我要说的是如何在Eclipse中使用数据库连接池技术
jboss配置 mysql数据库连接池 配置简单
Jboss + 优化配置 Jboss内存优化 Jboss数据库连接池优化 Jboss部署目录优化 Jboss应用安全加固
在上一篇中介绍了任何在Eclipse中使用JBoss数据库连接池技术,现在介绍一下在MyEclipse中使用Weblogic数据库连接池技术。
Jboss 优化配置 一. Jboss后台启动: 二. Jboss内存优化: 调整JVM 三. Jboss日志输出模式 去除不必... Jboss数据库连接池优化 五. Jboss部署目录优化 六. Jboss应用安全加固 七. 设置Connector 八、加大并发量
JBOSS优化配置/内存优化/Jboss日志输出模式/Jboss数据库连接池优化/ Jboss部署目录优化
个人的一些学习记录,大家可以做个参考。 安装 启动 部署 端口修改 访问jboss 连接池配置 连接池验证 JVM内存 连接池参数 线程参数
jboss安全加密:数据源配置密码加密;使用加密的https协议;检测是否设置定时登出;检测是否设置Jboss错误页面重定向...
JBoss压缩文件包括:jboss 4 2 2 GA zip JBoss5 0安装和JBoss5 0启动时遇到的问题以及解决办法 txt JBoss配置mysql数据库连接池和配置过程中的详细代码 txt和配置JBoss数据源 txt 欢迎下载
通过统一的图形化管理控制台,您可以管理和监控网络、操作系统、数据库等基础设施服务,也可以管理和监控Java虚拟机、JBoss Web、连接池等中间件,还可以通过自定义的JMX MBean管理和监控您的业务应用。通过对配置...
1.1-beta-6.jar,jboss-marshalling-1.3.0.CR9.jar,jboss-marshalling-serial-1.3.0.CR9.jar,jdom.jar,json-lib-2.4-jdk15.jar,json-simple-1.1.1.jar,json.jar,log4j-1.2.17.jar,mail.jar,memcached-2.5.jar,mongo-...
注意:配置JBoss服务器和调试的动作参见readme.txt文档,有详细说明怎样匹配连接池,以及可能遇到的问题及解决办法。该例子演示怎样使用Hibernate技术(没有使用XDoclet技术)实现JPA的Top-Down的XP开发流程,本人...
建立连接池 <br>将oracle-ds.xml文件复制到你的Jboss主目录下的server\default\deploy目录下,如果你的目录下已经有了这个文件,你可以把我的内容复制过去,相应的IP地址、SID、用户名、密码等你根据你的实际情况...
环境:Window XP profession, JDK 1.6, MySQL 5.0, JBoss 4.2.1, Eclipse Ganymede 本示例是对上一个资源“演示EJB3.0 + JPA + MySQL5.0 + C3P0连接池技术实战编程...注意:连接池的配置参见上一个资源readme.txt文档
Jetty 能够提供数据库连接池服务,不仅支持 JSP 等 Java 技术,同时还支持其他 Web 技术的集成,譬如 PHP、.NET 两大阵营。Jetty 的性能参数匹配甚至超越了本地 Apache HTTP 服务器或者 IIS。 三、Nginx Nginx 是...
Activiti核心配置文件,配置流程引擎创建工具的基本参数和数据库连接池参数。 定义数据库配置参数: jdbcUrl: 数据库的JDBC URL。 jdbcDriver: 对应不同数据库类型的驱动。 jdbcUsername: 连接数据库的用户名...
最近温习ssh2整合编程,顺便浏览下struts2有什么更新的消息,下载了新版本的struts2的2.1.8.1...注:以下包为数据源连接池 相关 用到那个添加相应的包 c3p0-0.9.1.2.jar //3 commons-pool.jar //3 commons-dbcp.jar //3
本文总结了Java web开发面试中的一些常见问题和答案,涵盖了forward和redirect的区别、JSP中的INCLUDE、应用服务器、数据连接池、JSP的内置对象、JSP指令、Servlet的生命周期等知识点。 一、forward和redirect的...