- 浏览: 7357184 次
- 性别:
- 来自: 上海
-
文章分类
- 全部博客 (1546)
- 企业中间件 (236)
- 企业应用面临的问题 (236)
- 小布Oracle学习笔记汇总 (36)
- Spring 开发应用 (54)
- IBatis开发应用 (16)
- Oracle基础学习 (23)
- struts2.0 (41)
- JVM&ClassLoader&GC (16)
- JQuery的开发应用 (17)
- WebService的开发应用 (21)
- Java&Socket (44)
- 开源组件的应用 (254)
- 常用Javascript的开发应用 (28)
- J2EE开发技术指南 (163)
- EJB3开发应用 (11)
- GIS&Mobile&MAP (36)
- SWT-GEF-RCP (52)
- 算法&数据结构 (6)
- Apache开源组件研究 (62)
- Hibernate 学习应用 (57)
- java并发编程 (59)
- MySQL&Mongodb&MS/SQL (15)
- Oracle数据库实验室 (55)
- 搜索引擎的开发应用 (34)
- 软件工程师笔试经典 (14)
- 其他杂项 (10)
- AndroidPn& MQTT&C2DM&推技术 (29)
- ActiveMQ学习和研究 (38)
- Google技术应用开发和API分析 (11)
- flex的学习总结 (59)
- 项目中一点总结 (20)
- java疑惑 java面向对象编程 (28)
- Android 开发学习 (133)
- linux和UNIX的总结 (37)
- Titanium学习总结 (20)
- JQueryMobile学习总结 (34)
- Phonegap学习总结 (32)
- HTML5学习总结 (41)
- JeeCMS研究和理解分析 (9)
最新评论
-
lgh1992314:
[u][i][b][flash=200,200][url][i ...
看看mybatis 源代码 -
尼古拉斯.fwp:
图片根本就不出来好吧。。。。。。
Android文件图片上传的详细讲解(一)HTTP multipart/form-data 上传报文格式实现手机端上传 -
ln94223:
第一个应该用排它网关吧 怎么是并行网关, 并行网关是所有exe ...
工作流Activiti的学习总结(八)Activiti自动执行的应用 -
ZY199266:
获取不到任何消息信息,请问这是什么原因呢?
ActiveMQ 通过JMX监控Connection,Queue,Topic的信息 -
xiaoyao霄:
DestinationSourceMonitor 报错 应该导 ...
ActiveMQ 通过JMX监控Connection,Queue,Topic的信息
方式一:
在Spring的"applicationContext.xml"中的dataSource bean定义——




















第一种方式需要把用户名和密码写在连接串里面,
ProxoolDataSource类提供的user,password属性似乎没有什么用。
无论提供什么,它都会以空用户名、密码去连接数据库。
这可能是Proxool RC0.93的一个bug。
不过配置中的user,password两个属性还必须设置,否则hibernate会报空指针错误。
方式二:
在Spring的"applicationContext.xml"中的dataSource bean定义——









第二种方式需要预先在"web.xml"先配置好Proxool连接池,配置如下:



















注意,第二种方式下Spring的上下文加载如果想使用listener方式(Struts2要求),
则与连接池有关的Bean全得延迟初始化。因为listener比servlet优先初始化,
如果相关Bean不是lazy-init的话,则启动服务器时会出现Bean找不到连接定义的异常。
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
其中proxool的配置文件可以采用xmlFile"proxool.xml"或者propertyFile"proxool.properties"
"proxool.xml"格式如下:























"proxool.properties"格式如下:






















-----------------------------------------------------------
个人比较倾向于第二种配置方式,
一来可以避免在Spring的"applicationContext.xml"中写一大堆参数,
尤其是避免了driverUrl中带用户名密码(这会显示在proxool包中带的
org.logicalcobwebs.proxool.admin.servlet.AdminServlet输出的页面中)
二来proxool连接池可以在tomcat启动时就初始化好,可以提高第一次访问web时的连接速度。
发表评论
-
【转】Django resources
2014-01-23 14:35 10861Django resources This page li ... -
使用国内镜像源来加速python pypi包的安装
2014-01-16 11:16 197918pipy国内镜像目前有: http://pypi.d ... -
[转 ]vagrant使用简介
2014-01-10 13:53 258001> 简介: vagrant提供了易于配置,重复性 ... -
[转]在Java中调用Python
2014-01-07 13:08 9255在执行之前都需要把jython对应的包加载进去,这个是必须的 ... -
[转]Eclipse配置PyDev插件
2014-01-02 14:25 2870安装python解释器 安装PyDev: 首 ... -
RestFuse的研究(五) Http请求的封装
2014-06-14 15:50 3691在RestFuse中封装了Http请 ... -
RestFuse的研究(四) Junit的Statement的分析
2013-12-06 11:46 1706在RestFuse提供了多种单 ... -
RestFuse的研究(三) Junit的Rule的使用和分析
2013-12-06 11:01 2268在junit中定义一些可以公用的规则(R ... -
RestFuse的研究(二) Junit的Runner的分类和模式
2013-12-06 10:40 1631在Junit4中的调用JunitCore可以采 ... -
RestFuse的研究(一) HttpJunitRunner的实现
2013-12-06 10:11 1773在RestFuse是一种针对Rest We ... -
[转]An open-source JUnit extension to test HTTP/REST APIs
2013-12-06 09:57 1129http://developer.eclipsesource ... -
TestNG简单的学习(十三)TestNG中Junit的实现
2013-12-04 09:00 3383TestNG和junit的整合 ... -
TestNG简单的学习(十二)TestNG运行
2013-12-03 09:08 51643文档来自官方地址: ... -
TestNG简单的学习(十一)TestNG学习总结
2013-12-03 09:08 14266最近一直在学习关于TestNG方面的知识,根 ... -
TestNG简单的学习(十)TestNG @Listeners 的使用
2013-12-03 09:07 8731TestNG官方网站: http://testng.or ... -
TestNG简单的学习(九)TestNG Method Interceptors 的使用
2013-12-03 09:07 2746TestNG官方网站: http://testng ... -
TestNG简单的学习(八)TestNG Annotation Transformers 的使用
2013-12-03 09:07 2842TestNG官方网站: http://testng.or ... -
TestNG简单的学习(七)TestNG编程方式运行
2013-12-02 09:22 2484TestNG官方网站: http://testng.or ... -
TestNG简单的学习(六)测试工厂注释的使用
2013-12-02 09:22 2818TestNG官方网站: http://testng.or ... -
TestNG简单的学习(五)参数化测试数据的定制
2013-12-02 09:22 2732TestNG官方网站: http://testng.or ...
相关推荐
标题 "Spring+Hibernate+Proxool连接池" 涉及到的是在Java Web开发中,如何使用Spring框架集成Hibernate ORM框架,并结合Proxool作为数据库连接池的技术实践。这通常是为了提高应用性能,有效管理和复用数据库连接,...
另一份文件`spring中以dataSource方式使用proxool连接池_2种方式.txt`可能详细介绍了两种在Spring中配置Proxool连接池的方法。通常,可以通过XML配置或Java配置来设置数据源。在XML配置中,可以使用`...
本文将详细介绍如何在Struts2+Spring+Hibernate的环境中配置Proxool连接池。 首先,理解Proxool的工作原理。Proxool是一个基于池化的JDBC代理,它维护着一个数据库连接池,当应用需要访问数据库时,可以从池中获取...
总之,基于SSH的Proxool连接池配置涉及到Spring、Hibernate和Proxool之间的协作,通过这种方式,我们可以有效地管理和优化数据库连接,提高应用程序的性能和稳定性。在实际开发中,需要根据项目需求调整配置参数,以...
在Java的Web开发中,Spring框架是不可或缺的一部分,它提供了丰富的功能来管理应用程序的各个组件。...在项目中的`spring+proxool连接池的配置`文件中,应该包含上述所有配置的细节,以供实际部署时参考。
数据库连接池是在应用服务器启动时预创建一定数量的数据库连接,然后在应用运行过程中,当需要与数据库交互时,不再直接创建新的连接,而是从连接池中获取一个已存在的连接,用完后归还,而不是关闭,这样减少了...
Spring Proxool是Spring框架中一个非常重要的组件,它提供了对proxool数据库连接池的集成。Proxool是一个轻量级、高效的数据库连接池,它允许应用程序在处理大量并发请求时有效地管理数据库连接,从而提高系统的性能...
Proxool是SSH框架中常用的数据库连接池之一,以其轻量级、灵活配置和优秀的性能表现而受到青睐。 数据库连接池的基本原理是预先在内存中创建一定数量的数据库连接,应用程序在需要时可以从池中获取连接,使用完毕后...
Proxool的工作原理是预先在内存中创建一定数量的数据库连接,当应用程序需要连接数据库时,不再直接创建新的连接,而是从连接池中获取一个已存在的连接。使用完毕后,连接不会被关闭,而是返回连接池,等待其他请求...
在Java的Web应用开发中,Spring框架以其强大的依赖注入(DI)和面向切面编程(AOP)功能而被广泛使用。而Proxool是Oracle公司开源的一个数据库连接池组件,它提供了高效的数据库连接管理,有助于减少数据库资源的...
下面是一个使用Proxool连接池的示例配置: ```xml <bean id="DataSource" class="org.logicalcobwebs.proxool.ProxoolDataSource" destroy-method="shutdown"> <property name="driver"><value>oracle.jdbc.driver...
在使用Proxool时,理解其配置参数是至关重要的,这些参数可以调整连接池的行为,以适应不同应用场景的需求。以下是一些主要的Proxool配置参数: 1. **driver-url**: 这个参数指定数据库驱动的URL,例如`jdbc:mysql:...
在Spring框架中,数据库连接池是管理数据库连接的关键组件,它能提高应用性能,通过复用已存在的连接而不是每次请求时创建新的连接。本篇文章将深入探讨Spring支持的几种主要连接池,包括Apache DBCP、C3P0以及...
3. **集成 Proxool**:添加 Proxool 的依赖,并在 Spring 配置文件中配置 DataSource,设置连接池的参数,如最大连接数、最小空闲连接数等。将这个 DataSource 注入到 Spring 中,供其他组件如 Hibernate 或 ...
在Spring框架中,配置Proxool连接池通常涉及以下步骤: 1. 添加上述提到的jar包到项目的类路径中。 2. 在Spring的配置文件中定义一个DataSource bean,使用Proxool的配置属性来指定连接池的参数,例如最大连接数、...