Java open source project hibernate package effect

xiaoxiao2021-03-06  111

Hibernate includes 23 JAR bags, dazzling. This article will explain in detail the role of Hibernate every JAR package, which is convenient for you to pay according to your needs in your application. Download Hibernate, for example 2.0.3 stable version, decompression, you can see 22 jar packages in a hibernate2.jar and lib directory: hibernate2.jar: Hibernate's library, there is nothing to say, the JAR package must be used CGLIB -asm.jar: cglib library, Hibernate uses it to realize the dynamic generation of PO bytecode, very core library, must use JAR package DOM4J. Jar: Dom4j is a Java XML API, similar to Jdom, use to read Write XML files. Dom4j is a very very excellent Java XML API with features that have excellent performance, powerful and extremely easy to use, and it is also an open source software that can be found on the SourceForge. An article can be found on IBM DeveloperWorks, and the performance, functionality, and ease of use of mainstream Java XML APIs, DOM4J is very excellent in that way. I started using DOM4J as early as nearly two years until now. Now you can see that more and more Java software is using DOM4J to read and write XML, especially worth mentioning that Sun's JAXM is also using DOM4J. This is the JAR package that must be used, Hibernate uses it to read the configuration file. Odmg.jar: ODMG is an ORM specification, Hibernate implements the ODMG specification, this is a core library, the JAR package that must be used. Commons-Collections.jar: One of the Apache Commons package contains some collection classes developed by Apache, which is powerful than java.util. *. The JAR package that must be used. Commons-beanutils.jar: One of the Apache Commons package contains some Bean tool classes. The JAR package that must be used. Commons-lang.jar: One of the Apache Commons package contains some data type tool classes, which is the extension of java.lang. *. The JAR package that must be used. Commons-logging.jar: One of the Apache Commons package contains log features, and the JAR package that must be used. This package itself contains a Simple Logger, but the function is weak. When you run, it will look at the log4j in ClassPath. If there is, use log4j, if not, find java.util.logging with JDK1.4, if you can't find Simple Logger. Commons-logging.jar's appearance is a regret of a history. At the beginning, Apache strongly lobbyed SUN to join the log4j to JDK1.4, however JDK1.4 project team has been close to the time of the release JDK1.4 product, so rejection Apache Requirements, using their own java.util.logging, this package is far from log4j, and performance is also general. Later, Apache was developed comMMons-logging.jar used to compatible with two loggers. So use the log program written by Commons-Logging.jar, the bottom layer Logger can be switched, you can choose Log4j, java.util.logging, or the Simple Logger itself.

转载请注明原文地址:https://www.9cbs.com/read-100859.html

New Post(0)