本站首页    管理页面    写新日志    退出

The Neurotic Fishbowl

[/*Java*/]DriverManagerDataSource in Spring Framework
nybon 发表于 2005/1/29 23:38:58

DriverManagerDataSource in Spring Framework    javax.sql Interface DataSource 今天看了一天的spring,想使用里面提供的JdbcTemplate,看上去非常酷的样子,不过其中涉及到了一个DataSource接口,不知道干嘛的,好不容易才找到了一个讲的比较清楚的解释。 Implementation of SmartDataSource that configures a plain old JDBC Driver via bean properties, and returns a new Connection every time. Useful for test or standalone environments outside of a J2EE container, either as a DataSource bean in a respective ApplicationContext, or in conjunction with a simple JNDI environment. Pool-assuming Connection.close() calls will simply close the connection, so any DataSource-aware persistence code should work. In a J2EE container, it is recommended to use a JNDI DataSource provided by the container. Such a DataSource can be exported as a DataSource bean in an ApplicationContext via JndiObjectFactoryBean, for seamless switching to and from a local DataSource bean like this class. If you need a "real" connection pool outside of a J2EE container, consider Apache's Jakarta Commons DBCP. Its BasicDataSource is a full connection pool bean, supporting the same basic properties as this class plus specific settings. It can be used as a replacement for an instance of this class just by changing the class name of the bean definition to "org.apache.commons.dbcp.BasicDataSource".

阅读全文(2457) | 回复(0) | 编辑 | 精华

 



发表评论:
昵称:
密码:
主页:
标题:
验证码:  (不区分大小写,请仔细填写,输错需重写评论内容!)

 
 



The Neurotic Fishbowl

.: 公告

This blog focuses on:

Semantic Web && Java Technology


Bloginess

«August 2025»
12
3456789
10111213141516
17181920212223
24252627282930
31

.: 我的分类(专题)

首页(171)
/*SemanticWeb*/(34)
/*Java*/(74)
/*FreeComments*/(59)
/*Agent*/(4)


In the Bowl

.: 最新日志

The End
使用Google Trends进行选型
怎样才能称为一次新的版本发行?
如何防止RSS信息过载
使用Excel作为用户接口
如何有效地报告Bug
sourceforge再次被封
趣文两篇
编写Firefox扩展
Jetspeed心得随笔


.: 最新回复

回复:Google API与yahoo 
回复:JADE 3.3的bug
回复:JADE 3.3的bug
回复:JADE 3.3的bug
回复:JADE 3.3的bug
回复:Jbpm和Shark比较的feat
回复:JADE 3.3的bug
回复:JADE 3.3的bug
回复:[转]批判性地看待一种可行的表示技
回复:JIRA破解


The Fishkeeper
blog名称:SW Portal
日志总数:171
评论数量:219
留言数量:8
访问次数:1045067
建立时间:2004年10月30日



Text Me

.: 留言板

签写新留言

路过
路过
页脚问题
RE:请问一下你的主页的下面部分是怎么关
请问一下你的主页的下面部分是怎么关闭的?
我是做Mobile Agent的
Gmail
不错
不错啊小倪同学


Other Fish in the Sea

.: 链接





站点首页 | 联系我们 | 博客注册 | 博客登陆

Sponsored By W3CHINA
W3CHINA Blog 0.8 Processed in 0.047 second(s), page refreshed 144775277 times.
《全国人大常委会关于维护互联网安全的决定》  《计算机信息网络国际联网安全保护管理办法》
苏ICP备05006046号