【正文】
e and takes charge of mapping between Java objects and relational data. The inside of Hibernate packs the operation of accessing database by JDBC, which provides API of objectoriented database access to upper layer application. So developers can use the object programming thought to operate database sufficiently, caring for the bottom database structure unnecessarily. Hibernate relieves the developer from 95 percent of mon data persistence related programming tasks, pared to manual coding with SQL and the JDBC API[4]. And it can integrate various Web server or application server, and nearly support all popular databases server. Principle of Hibernate As shown in figure , Hibernate lies in the middle layer that is between application and database .In the provided persistent service, Hibernate maps class to rows of datasheet by properties and mapping files of class () itself. Application interacts with database by Persitstent Object (PO) to handle data directly. H i b e r n a t e . p r o p e r t i e s X M L . M a p p i n gP e r s i s t e n t O b j e c t sD a t a b a s eA p p l i c a t i o nH i b e r n a t e Figure Hibernate systematic structure 3 The Integration of Struts and Hibernate In the open source frameworks, for the presentation part, Tapestry has the powerful and natural bination of pages, its document is too conceptional to benefit programming. And its learning curve was too steep and so on. For the logic part, Spring has a good integration function, but there is a lack of public controller. And EJB depends on the EJB containers, at the same time, it is realized plicatedly. While Struts has been applied extensively because of its advantages. At present, most of systems apply the relational databases mainly, while Java is an objectoriented language essentially. In Model part of Struts framework application, using SQL and JDBC to operate databases when storing and fetching objects reduces programming efficiency and the systematic maintainability. Traditional J2EEbased application applies heavyweight framework based on EJB that adapts to the large enterprise development, while development and debugging by EJB container need to consume a plenty of time and high price. EJB3 improves the disadvantages of original EJB, but its application is not mature yet. Hibernate can substitute ContainerManaged Persistence (CMP) to acplish heavy responsibility of permanence in J2EE framework of applying a word, Hibern