在Java EE应用系统中,持久化层采用对象关系映射(ORM)解决了与数据库之间的耦合问题,但因不同的ORM框架之间存在差异,难以摆脱对具体ORM框架的依赖。JPA(Java Persistence API,Java持久化API)是Sun官方提供的持久化的解决方案,它为Plain Old Java Objects(POJO)提供持久化标准规范。在研究JPA技术及其原理的基础上,给出了JPA与SSH架构的整合方案及数据访问对象(DAO)设计模式。采用该架构方案开发的系统,减少了对具体ORM的依赖性,各层次间耦合度低,模块复用性高,大大提高了开发的效率,降低了开发和维护的成本。%In the Java EE application system,persistence layer uses ORM to solve the coupling problem between with database,but there are differences between different ORM framework,so it is difficult to get rid of the dependence of the specific ORM framework.JPA(Java Persistence API) is the official persistence solution that Sun proposed,is standard specification for POJO persistence.Based on research the JPA technology and its principles,given the plan to integate the JPA and SSH architecture,and DAO design pattern.The plan development system,reduces the specific ORM dependent,the layers of coupling degree low,module high reuse,greatly improves the development efficiency,reduce development and maintenance costs.
展开▼