Hibernate core package and core interface Introduction

Source: Internet
Author: User
Tags jboss
Hibernate3.2 core package Functions
Package Description
JTA. Jar standard jta api required
Commons-logging.jar log feature required
Commons-collections.jar collection class required
Anlr. Jar another tool for language recognition (anlr) required
Required for dom4j. Jar xml configuration and ing Interpreter
Hibernate3.jar core library required
ASM. Jar ASM bytecode library is required if "cglib" is used
Asm-attrs.jar ASM bytecode library is required if "cglib" is used
Ehcache. Jar ehcache is required if no other cache exists.
Cglib. Jar cglib bytecode interpreter is required if "cglib" is used

Hibernate has five core interfaces: Session, sessionfactory, transaction, query, and
Configuration. These five core interfaces are used in any development. Through these interfaces, you can not only access persistent objects, but also control transactions. The core of the five
Interfaces are described separately.

· Session interface: The session interface is responsible for executing the CRUD operation on the Persistent Object (the crud task is to complete the communication with the database, including many common SQL statements.
.). However, it should be noted that the session object is non-thread-safe. At the same time, the hibernate session is different from the httpsession In the JSP application.

Here, when we use the term session, it actually refers to the session in hibernate, and later we will call the httsemi sion object a user session.

· Sessionfactory interface: sessionfactroy interface is used to initialize hibernate. It acts as a proxy for the data storage source and is responsible for creating
Session object. The factory model is used here. Note that sessionfactory is not lightweight, because generally, only one
Sessionfactory is enough. When you need to operate multiple databases, you can specify a sessionfactory for each database.

· Configuration interface: the configuration interface is responsible for configuring and starting hibernate to create the sessionfactory object. In
During hibernate startup, the configuration class instance first locates the ing document location, reads the configuration, and then creates the sessionfactory object.

· Transaction interface: the transaction interface is responsible for transaction-related operations. It is optional. developers can also design and write their own underlying transaction processing code.

· Query and criteria interfaces: Query and criteria interfaces are used to perform various database queries. It can be expressed in hql or SQL statements.

Detailed folder description under hibernate3.jar

Org. hibernate. type. * // data type of the attribute of the Persistent Object defined in hibernate

Org. hibernate. transaction. * // hibernate transaction implementation class

Org. hibernate. util. * // some tool classes with scattered Functions

Org. hibernate. tool. hbm2ddl. * // use the HBM configuration file to generate the DDL

Org. hibernate. SQL. * // generate a jdbc SQL statement package

Org. hibernate. Proxy. * // support for proxy and lazy loading

Org. hibernate. persister. * // core package to realize the ing between persistent objects and tables

Meta Implementation of org. hibernate. Metadata. * // Po

Org. hibernate. Mapping. * // attribute Implementation of the HBM File

Org. hibernate. lob .*
// Blob and clob support

Org. hibernate. loader. * // is also a core package, mainly used to generate SQL statements.

Org. hibernate. JMX. * // only know that JMX is used to write the Management Program of the app server, so that the app server can manage hibernate through the JMX interface.

Org. hibernate. impl. * // The core package, implementation class of some important interfaces, if session, sessionfactory, query, etc.

Org. hibernate. Id. * // ID Generator

Org. hibernate. hql. * // hql implementation

Org. hibernate. Engine. * // The class of this package has relatively different functions.

// Supports multiple database features. Each dialect implementation class represents a database that describes the supported data types and other features, such as autoincrement and sequence, paging SQL?

Org. hibernate. dialect .*

Org. hibernate. Connection. * // Several Database Connection Pool providers

// Hibernate collection interface implementation class, such as list, set, bag, etc. hibernate needs to write the collection interface implementation class to support lazy loading

Org. hibernate. collection .*

Org. hibernate. cfg. * // configuration file read class

Org. hibernate. cache. * // implementation class of JCs

Org. hibernate. * // The classes of this package are basically interface classes and exception classes.

Hibernate3.2 core package Functions
Package Function Description
JTA. Jar Standard JTA API Required
Commons-logging.jar Log feature Required
Commons-collections.jar Collection class Required
Anlr. Jar Another tool for language recognition (anlr) Required
Dom4j. Jar Xml configuration and ing Interpreter Required
Hibernate3.jar Core Library Required
ASM. Jar ASM bytecode Library If "cglib" is used
Asm-attrs.jar ASM bytecode Library If "cglib" is used
Ehcache. Jar Ehcache Cache If there is no other cache, It is necessary
Cglib. Jar Cglib bytecode Interpreter If "cglib" is used
Optional
Versioncheck. Jar Version Check  
Swarmcache. Jar    
Jboss-cache.jar Treecache  
Jgroups. Jar    
Xml-apis.jar JAXP API  
C3p0-0.9.1.jar C3PO JDBC connection pool  
Connector. Jar JCA API  
Jboss-system.jar   Required when using treecache
Jacc-1_0-fr.jar Jacc Library  
Checkstyle-all.jar    
JUnit. Jar    
Javassist. Jar Javassist bytecode Interpreter  
Ant-lanuncher.jar    
JAAS. Jar JAAS API  
Jdbc2_0-stdext.jar JDBC extension API  
Ant-antlr.jar Ant anlr support  
Jboss-jmx.jar    
Cleanimports. Jar Cleanimports  
Xerces. Jar SAX Parser Required when JDK version is earlier than 1.4
Jaxen-1.1-beta-7.jar Jaxen If you want to improve the Startup Performance, use
Ant-junit.jar Ant JUnit support  
Ant-swing.jar Ant swing support  
Ant. Jar    
Proxool. Jar Proxool JDBC connection pool  
Concurrent. Jar   To use treecache
Syndiag2.jar    

 

Summary:

Most
A small necessary package is anlr. jar, cglib. jar, ASM. jar, asm-attrs.jar,
Commons-collections.jar, commons-loggins.jar, encache. jar,
Dom4j. jar, log4j. jar, JTA. Jar

Spring. jar is a single jar package that contains the complete release, and spring. jar contains all the jar packages except the content contained in the spring-mock.jar.
Because only in the development environment will use spring-mock.jar for auxiliary testing, formal application systems are not used in these classes.
 
Except spring. JAR file. Spring also includes 13 other independent jar packages, each containing the corresponding spring components. You can choose to combine your own jar packages as needed, instead of introducing the entire spring. jar.
 
(1) spring-core.jar
 
This jar file contains the basic core tool class of the Spring framework. Other spring components must use the class in this package, which is the basic core of other components, of course, you can also use these tool classes in your application system.
 
(2) spring-beans.jar

This
Jar files are used by all applications, including accessing the configuration file, creating and managing beans, and performing
Inversion of control/dependency injection (IOC/di) operations related to all classes. If the application only needs the basic IOC
/Di support, introduce the spring-core.jar and spring-beans. jar file.

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.