atianchen 写道
当一个请求进来时候,我写了一个Filter会根据request请求信息设置当前的sessionFactory
然后就是重写,需要重写spring关于Hibernate3支持的四个类
HibernateAccessor,HibernateDaoSupport,HibernateTemplate,HibernateTransactionManager
其实主要是修改HibernateAccessor和HibernateTransactionManager的sessionFactory获取方式,由于HibernateDaoSupport->HibernateTempla ...
对这个贴的补充:动态切换多数据源
引用2。在有多个数据源的时候,需要为每个数据源生成一个 beanfactory 。这个目前可能无法通过 spring 提供的 servlet 来自动实现,需要自己手工来操作。这些 beanfactory 使用同样的 spring xml 配置文件,但是使用不同的数据库配置文件。
对应每一个数据源,在程序启动的时候生成一个 factory ,然后可以为每个 factory 和数据源标识对应起来保存在 hashmap 之类的列表中,以方便后面使用。
3。如果使用 webwork,web 层的 action 不能再在 spring 的配置文件中出现了。在 we ...
□吴智钢/文
桥牌(英文名称:Bridge)是一种优雅、文明、时尚、竞技性很强的智力游戏。它是一种全世界通行的游戏,人们可以不分种族、不分语言、不分社会等级地坐在一起,进行智力竞技。从另一个意义上说,桥牌本身已经成为一种国际交往的工具,或者说一种“特殊的语言”。
桥牌最初起源于欧洲,正因为如此,它使用了一些具有专用名词意义的英文单词或者英文简称,例如NT(无将),Pass(同意),Sta-syman(询问高花),Openni ...
- 15:10
- 浏览 (1403)
- 评论 (2)
《超越自由与尊严》斯金纳 著 王映桥 栗爱平 译 贵州人民出版社1988年版
《超越自由与尊严》一书是斯金纳重要的著作之一,该书一经问世便成为风靡北美的畅销书,随即流行世界。在书中,他根据行为主义的原理,对传统人文研究方法的深层心理研究运动进行了猛烈的抨击,并指出人根本不可能有绝对的自由与尊严,人只可能是环境的产物,因此,人类面临的首要任务是设计一个最合适自己生存的文化与社会。
第1章行为技术在这一章,斯金纳为回击人们对自己的理论的种种攻击,他首先全面清算了传统人文研究的种种弊病。在他看来,人文研究与科学研究相比,几千年来的成就与进步可以说微乎其微,科学已发展到了能将人送上月球 ...
- 17:49
- 浏览 (439)
- 评论 (0)
Erlang/OTP document
If a third instance of the module is loaded, the code server will remove (purge) the old code and any processes lingering in it will be terminated. Then the third instance becomes 'current' and the previously current code becomes 'old'.
即 Erlang 只能保留两个版本的 Code ,如果有第三个版本的 Code ...
- 11:17
- 浏览 (580)
- 评论 (0)
http://www.chinaai.org/Article_Show.asp?ArticleID=314
完整的prolog程序是有事实和规则组成的。
事实用来储存一些数据,而规则用来储存某种可以推理出来的关系。
理论上来说使用c语言可以编制任何种类的程序,甚至连prolog语言都是使用c语言编写的。不过对于急于开发应用程序的用户,最关心的是如何最经济最有效率的开发程序,prolog为你多提供了一个选择的余地。
在prolog程序中,是很难分清楚哪些是程序,哪些是数据的。事实上,prolog中的所有东西都有相同的形式,也就是说数据就是程序,程序就是数据。
prolog的原理就是关系 ...
- 15:28
- 浏览 (557)
- 评论 (0)
http://npt.cc.rsu.ru/user/wanderer/ODP/Erlang_tutorial.html
Atoms are used in places where in C one might define a constant
the = operator doesn't in fact mean assign, it means "match with".
-- match with -- unify 合一,prolog 里面的合一
the -> construct should be read as "evaluates to".
-- prolog 用 ...
- 11:33
- 浏览 (731)
- 评论 (0)
http://industry.ccidnet.com/art/1077/20050722/292705_1.html
Continuation则是另一种函数调用方式。它不采用堆栈来保存上下文,而是把这些信息保存在continuation record中。这些continuation record和堆栈的activation record的区别在于,它不采用后入先出的线性方式,所有record被组成一棵树(或者图),从一个函数调用另一个函数就等于给当前节点生成一个子节点,然后把系统寄存器移动到这个子节点。
http://www.chinaitpower.com/2006Aug/2006-0 ...
- 16:34
- 浏览 (738)
- 评论 (0)
Functional languages like Erlang have the opposite philosophy. They try to minimize the context surrounding a piece of logic-- a function. All you have to know is what parameters a function takes and what it returns. There is no implicit link between the function and the data it uses. With single-as ...
- 01:40
- 浏览 (582)
- 评论 (0)
Erlang has a process-based model of concurrency with asynchronous message passing.The concurrency mechanisms in Erlang are lightweight, i.e. processes require little memory, and creating and deleting processes and message passing require little computational effort.
Erlang has no shared memory. All ...
- 12:21
- 浏览 (562)
- 评论 (0)







评论排行榜