Hibernate Jar Package Details

Source: Internet
Author: User
Tags xml parser ibm developerworks

Hibernate includes a total of 23 jar packs, dazzling. This article will explain in detail the role of each jar package in hibernate, so that you can make your own choices in your application.

To download hibernate, for example 2.0.3 stable version, unzip, you can see a Hibernate2.jar and lib directory with 22 jar packages:

    • Hibernate2.jar:

Hibernate Library, there is nothing to say, the jar package must be used

    • Cglib-asm.jar:

CGLIB Library, Hibernate uses it to achieve the dynamic generation of PO bytecode, very core libraries, must use the jar package

    • 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.

    • 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.

    • 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.

    • Commons-beanutils.jar :

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

    • 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.

    • Commons-logging.jar:

Apache Commons

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

    • Ant.jar:

the ANT Compilation Tool's Jar package is used to compile the hibernate source code. If you are not ready to modify and compile Hibernate source code, then there is no use, optional jar package

    • Optional.jar:

an auxiliary package for Ant.

    • 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:

is 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 are going to use JCS in Hibernate, you must include it, otherwise you will not have to.

    • Jdbc2_0-stdext.jar:

JDBC2.0 , the database connection pool will typically be used for the extension package. But the app server is always on, so it's redundant.

    • Jta.jar:

The JTA specification is required when Hibernate uses JTA, but the app server is always on, so it's redundant.

    • Junit.jar:

The Junit package is required when you run Hibernate's own test code, otherwise it is not needed.

    • 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.

Hibernate Jar Package Details

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.