摘要
随着基于J2EE分布式多层应用的发展,由此引入的分层逻辑处理的框架逐渐成熟,同时几乎所有的J2EE应用都需要访问持久性数据资源,如此以来,实现和封装J2EE数据访问层越来越成为构建稳定、健壮和灵活的J2EE应用的基础。本文阐述了如何采用J2EE核心设计模式DAO(DataAccess Object)实现数据访问层逻辑,以及在DAO中如何实现事务和异常处理,并通过一个已经成功应用的实例来详细描述了DAO的具体实现方法。
With the developement of distributed N-tiers application based on J2EE,as a result the framework of N-tiers logic procedure becomes more and more mature,and almost all of these J2EE applications need to access the persistent data resource,so implementation and encapsulation of the tier of data access becomes more and more necessary to construct stable,strong and flexible J2EE applications. The paper explains how to use the core design pattern of J2EE to implement the data access tier logic ,and how to deal with transaction and exception,finally describes the implement of DAO in details by a successful application.
出处
《仪器仪表用户》
2005年第1期88-90,共3页
Instrumentation