Blog信息 |
blog名称: 日志总数:1304 评论数量:2242 留言数量:5 访问次数:7593631 建立时间:2006年5月29日 |

| |
[Cache]memcached 软件技术
lhwork 发表于 2007/1/26 15:28:28 |
转自http://nio.infor96.com/php-memcached/
memcached 安装
首先是下载 memcached 了,目前最新版本直接从官方网站即可下载到
http://www.danga.com/memcached/
memcached 用到了 libevent
|
|
[软件设计]Pageable DisplayTag with Hibernate 软件技术
lhwork 发表于 2007/1/23 12:09:49 |
啊~~~~~~ 昨、今兩天都跟 DisplayTag 大戰。搞了好久總算搞定了。DisplayTag 這個 taglib 寫的真很不錯,介面很好看,而且 pageable, sort, group 使用上都很簡單。最後還有無限變化的 decorator,設計的人真的非常有經驗!然而它還是有一些地方還不夠完美。使用它的 page 功能,比方說120筆分12頁,每頁10筆好了,它沒有機制可以讓你一次只讀10筆。一定要一次讀完 120 筆才行。這樣分頁的用意就少了一大半了!這兩天就都花在這玩意上,浪費了好多時間。最後的答案還算差強人意。
HibernatePageList page = new HibernatePageList(pageSize, "from Foo f where f.id >20" ) ; page.loadPage(2) ;
HibernatePageList 是一個帶有 iterator() method 的 list (不全是,沒有 implement List) 。這個物件裡面會有空的 list, |
|
[Hibernate]use AOP to simplify hibernateTemplate (Hibernate3) 软件技术
lhwork 发表于 2007/1/23 12:08:54 |
Spring ORM 替 Hibernate 的 API (Session and Query) 做了一番修整,也就是 HibernateTemplate ,它最主要的目的是 resource 控管及 exception 的轉換。有了這個 persistence layer 的 code 就可以大量的減少並且降低出錯的機會。然而這個 API 卻抹剎了 Hibernate API 的簡單易用優點,舉例來說,如果藉由 hibernateTemplate 控制 Hibernate Session (ex. Criteria),唯一的做法就是寫很難看的 Callback:
public MyData findByNo(final String no) { final String hql = " select data from MyData data " + " where data.no = :no "; HibernateCallback hc = new HibernateCallback() { publi |
|
[Java Open Source]Integrate axis and appfuse part3 软件技术
lhwork 发表于 2007/1/23 9:03:38 |
Introduction
First congraguration you already have an env developing webservice under appfuse.
In part3, we will use xdoclet help us generate servier-config.xml that axis needs.
A brief description below before we start up.
Add required sources.
Prepare ant task.
Declare model and service mapping.
Generate server-config.xml and deploy.
Generate stubs and test.
Step1. Add requi |
|
[Java Open Source]Integrate axis and appfuse part2 软件技术
lhwork 发表于 2007/1/23 9:03:14 |
Introduction
In part1, we hava a happy axis now works with appfuse.
Further more, in Integrate axis and appfuse part2, we will use ant task wsdl2java comes with axis to generate stub codes and test axis version service.
A brief description below before we start up.
Step1. Modify eclipse project |
|
[Java Open Source]Integrate Axis and Appfuse Part1 软件技术
lhwork 发表于 2007/1/23 9:02:52 |
Introduction
The purpose of the practice is to show how to integrate Apache Axis into Appfuse.
In part1, we add required libs and jsps to make a happy axis.
In part2, we port webservice from appfuse service layer and make a simple test.
Step 0. Check out Envirenment.
Before we start, please make sure you already prepare all tools we need.
appfuse 1.8.1
Eclipse 3.1
Sun JDK 1.5
Tomcat 5.5.11
ant 1.6.2
Mysql |
|
|