[Java] The jar package and function definitions required by hibernate

Source: Internet
Author: User
Tags connection pooling xml parser apache log jboss ibm developerworks log4j

Hibernate needs the jar package

1)Hibernate3.jar: Hibernate core Library, nothing to say, must use the JAR package

2)Cglib-asm.jar: Cglib Library, Hibernate uses it to achieve the dynamic generation of PO bytecode, very core library, must use the JAR package

3)Dom4j.jar: dom4j is a Java XML API, similar to Jdom, used to read and write XML files. Dom4j is a very, very good Java XML API that features great performance, power, and extreme ease of use, as well as an open source software that can be found on SourceForge. The IBM Developerworks can find an article on the performance, functionality, and usability of the mainstream Java XML API, and DOM4J is excellent in that respect. I started using dom4j almost two years ago, until now. Now you can see that more and more Java software is using dom4j to read and write XML, especially to mention that even Sun's JAXM is using DOM4J. This is the jar package that must be used and hibernate uses it to read and write the configuration file.

4)Odmg.jar: ODMG is an ORM specification, Hibernate implements the ODMG specification, which is a core library that must be used by the jar package.

5)Commons-collections.jar: One of the Apache Commons packages contains some Apache-developed collection classes that are more powerful than java.util.*. The jar package that must be used.

6)Commons-beanutils.jar: One of the Apache Commons packages that contains some Bean tool class classes. The jar package that must be used.

7)Commons-lang.jar: One of the Apache Commons packages, containing some data type tool classes, is an extension of the java.lang.*. The jar package that must be used.

8)Commons-logging.jar: One of the Apache Commons packages that contains the log function that must be used for the jar package. The package itself contains a simple Logger, but the function is very weak. At run time it will first find log4j in Classpath, if                           &N Bsp     have, use log4j, if not, find JDK1.4 belt java.util.logging, if also can not find to use simple Logger. The advent of Commons-logging.jar is a legacy of a history of regret, the original Apache                                         Force lobby Sun to join log4j to JDK1.4, however JDK1.4 project team has been close to releasing JDK1.4 products, thus rejecting The Apache requirements, using its own java.util.logging, this package is less functional than log4j                     &N Bsp                 Very far, performance is also general. Later, Apache developed the Commons-logging.jar to be compatible with two logger. Therefore, the log program written with Commons-logging.jar, the underlying logger can be toggled, you can choose                   &NBSP ;                   log4j,java.util.logging or its own simple Logger. But I still strongly recommend using LOg4j, because the log4j performance is very high, log output information time is almost equal to System.out, while processing a log average only need                   &N Bsp                     5us. You can find the log4j configuration file that hibernate has prepared for you in the SRC directory of hibernate, you just need to go to the Apache website to download log4j. Commons-logging.jar is also a required jar package.

The jar packages required for Hibernate are the ones above, and the rest are optional.

Ant.jar: The jar package for the Ant compilation tool that compiles the hibernate source code. If you are not ready to modify and compile Hibernate source code, then there is no use for the optional Jar package Optional.jar:Ant a helper package.

C3p0.jar: C3PO is a database connection pool that hibernate can configure to use the C3PO connection pool. If you are going to use this connection pool, you will need this jar package.

Proxool.jar: Also a connection pool, ibid.

Commons-pool.jar, Commons-dbcp.jar: DBCP database connection pool, Apache Jakarta organization developed, TOMCAT4 connection pool is also dbcp. In fact, hibernate itself has implemented a very very simple database connection pool, plus the top 3, you can actually choose 4 different database connection pools on hibernate, choose which one to look at the personal preferences, but dbcp may be more general. In addition, if Hibernate is used in EJBs, be sure to use the connection pool of app server, not the above 4 connection pools, otherwise the container management transaction will not work.

Connector.jar: JCA specification, this jar is required if you configure Hibernate as connector on the app server. But in fact, the General app server will definitely bring this package, so it's actually an extra package.

Jaas.jar: Jaas is used for permission validation and is already included in the JDK1.4. So it's actually an extra bag.

Jcs.jar: If you're going to use JCS in Hibernate, you have to include it, otherwise you don't.

Jdbc2_0-stdext.jar: JDBC2.0 expansion pack, generally the database connection pool will use it. But the app server is always on, so it's redundant.

Jta.jar: JTA specification, when Hibernate uses the JTA, but the app server will be taken, so it is redundant.

Junit.jar: The JUnit package is required when you run Hibernate's own test code, or not.

Xalan.jar, Xerces.jar, Xml-apis.jar: Xerces is an XML parser, Xalan is a formatter, Xml-apis is actually JAXP. General app Server will bring, JDK1.4 also contains the parser, but not xerces, is crimson, inefficient, but hibernate with XML is just read configuration file, performance is not critical, so is redundant.

Ant-1.63.jar Ant's core package, which will be used when building hibernate

Antlr-2.7.5h3.jar language translator, Hibernate uses it for HQL to SQL conversion

Asm.jar/asm-attrs.jar ASM Byte Conversion Library

The c3p0-0.8.5.2.jar C3PO JDBC Connection Pooling tool Cglib-2.1.jar efficient code generation tools that Hibernate uses to extend Java classes and implement Java interfaces at runtime

Commons-collections-2.1.1.jar Apache's toolset to enhance Java's ability to handle collections

Commons-logging-1.0.4.jar Apache software Base the log tool provided by my group

The Concurrent-1.3.2.jar thread Synchronization tool, which needs to be used when using JBoss's tree-like cache

Connector.jar Standard Connector for multiple application servers

Dom4j-1.6.jar dom4j XML Parser

Ehcache-1.1.jar Caching tool. This caching tool is essential when no other caching tools are available

Jaas.jar Standard Java Permissions and Authentication Service pack

Jaxen-1.1-beta-4.jar General-purpose XPath processing engine

A tree-like cache implementation tool for Jboss-cache.jar JBoss

Jboss-common.jar JBoss's base package, which must be available when using the JBoss tree cache

Jboss-jmx.jar JBoss's JMX implementation package

Jboss-system.jar JBoss Core, including server and deployment engine

Jdbc2_0-stdext.jar standard JDBC 2.0 extension API

Jgroups2.2.7.jar Network Communication Toolkit

Jta.jar standard JAVA Transaction Processing interface

Junit-3.8.1.jar junit test Framework

Log4.j-1.2.9.jar log4j Library, Apache log tool

Oscache-2.1.jar Caching tools for Java objects

Proxool-0.8.3.jar Proxool JDBC Connection Pooling Tool

A caching tool that Swarmcache-1.0rc2.jar Hibernate can use

Versioncheck.jar Version Checker Kit for checking the version of the secondary jar package file when building Hibernate

Xerces-2.6.2.jar SAX XML Parser

xml-apis.jar standard XML parser in the Java language

[Java] The jar package and function definitions required by hibernate

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.