1.TheServerside.com 依然是地位無可動搖的CCTV1。
2.InfoQ.com Floyd Marinescu 在離開 TSS 后另起爐灶,2006年中最重要推薦。視野不再局限于Java 而是包括Java,.Net, Ruby ,SOA, Agile方法等熱門話題。
3.JDJ的電子雜志 在JDJ首頁的最底處訂閱,文章質量不低于5-7的傳統(tǒng)三強。
4.SWik.net
1) 在處理大數(shù)據(jù)量時,會有大量的數(shù)據(jù)緩沖保存在Session的一級緩存中,這緩存大太時會嚴重顯示性能,所以在使用Hibernate處理大數(shù)據(jù)量的,可以使用session.clear()或者session. Evict(Object) 在處理過程中,清除全部的緩存或者清除某個對象。
2) 對大數(shù)據(jù)量查詢時,慎用list()或者iterator()返回查詢結果,
1. 使用List()返回結果時,Hibernate會所有查詢結果初始化為持久化對象,結果集較大時,會占用很多的處理時間。
2. 而使用iterator()返回結果時,在每次調用iterator.next()返回對象并使用對象時,Hibernate
程序開發(fā)是一方面,系統(tǒng)架構設計(硬件+網(wǎng)絡+軟件)是另一方面。
中國的網(wǎng)絡分南北電信和網(wǎng)通,訪問的ip就要區(qū)分南北進入不同的網(wǎng)絡;
然后是集群,包括應用服務器集群和web服務器集群,應用服務器集群可以采用apache+tomcat集群和weblogic集群等,web服務器集群可以用反向代理,也可以用NAT的方式,或者多域名解析都可以;
軟件架構方面,做網(wǎng)站首先需要很多web服務器存儲靜態(tài)資源,比如圖片、視頻、靜態(tài)頁等,千萬不要把靜態(tài)資源和應用服務器放在一起;
頁面數(shù)據(jù)調用更要認真設計,一些數(shù)據(jù)查詢可
閱讀全文1.TheServerside.com 依然是地位無可動搖的CCTV1。
2.InfoQ.com Floyd Marinescu 在離開 TSS 后另起爐灶,2006年中最重要推薦。視野不再局限于Java 而是包括Java,.Net, Ruby ,SOA, Agile方法等熱門話題。
3.JDJ的電子雜志 在JDJ首頁的最底處訂閱,文章質量不低于5-7的傳統(tǒng)三強。
4.SWik.net
This article is copy of the article article written by Juergen Hoeller a few months ago to showcase the integration of Hbernate with Spring. I have replaced Hibernate-specific references w
閱讀全文Declarative Transaction Demarcation
Alternatively, one can use Spring's AOP TransactionInterceptor, replacing the transaction demarcation code with an interceptor configuration in the application context. This allows to keep business objects free from repetitive transaction demarcation code in each business method. Furthermore, transaction semantics like propagation behavior and isolation level can be changed in a configuration file and do not affect the business object implementati
Hibernate與Spring整合后,就可以使用IoC及AOP的功能了,好處不在多言。另外一個好處,就是可以通過使用Spring的HibernateTemplate來簡化數(shù)據(jù)庫CRUD代碼。然而,正是這個HibernateTemplate,存在著以下的缺點:
一是功能不全,不如Hibernate的儲如createQuery()等方法方便、靈活與強大,使用頗受限制;
二是HibernateTemplate中的SessionFacotry封裝得太死,且session常常會自動過早關閉,使用上頗多不便;
三是Spring1.2.7實際上只支持Hibernate3.0.5,HibernateTemplate無法使用Hibernate3.1以后新加的功能。
1.External-Ref
這種方法看起來比較煩瑣,(這里描述的和spring文檔里的有些區(qū)別,這種方法可按spring文檔里的做法)
第一步:在web.xml里面增加一個listener,如下
java代碼:
<listener>
<listener-class>org.s