Java Reference
In-Depth Information
When the session factory closes, it destroys the cache for the entity persisters and collec-
tion persisters, and also destroys the query cache and the timestamps cache. Then the session
factory closes the JDBC connection provider and removes the current instance from its JNDI
object factory binding.
public void close() throws HibernateException
The Hibernate developers designed their implementation of the SessionFactory interface
to be scalable in a multithreaded application.
SQL Dialects
JDBC abstracts away many of the underlying connection details for each relational database,
yet every relational database supports a different set of features and uses a slightly different
version of SQL. Among the features that differ between relational databases are the syntax for
marking identity columns, column data types, available SQL functions, foreign key constraint
syntax, limits, GUID support, and support for cascade deletes.
Hibernate abstracts away all of these changes into dialect classes. Each supported data-
base has its own dialect. When Hibernate constructs an SQL query, it obtains appropriate
syntax information for the current database from the dialect. Hibernate 3 comes with over 20
different dialects. All of these standard dialects are supplied within the org.hibernate.dialect
package. Table 2-2 shows the supported databases in Hibernate 3 and their corresponding
dialect classes.
Table 2-2. Supported Databases and Dialect Class Names for Hibernate 3
Database Name
Dialect Class Name
DB2390Dialect
DB2/390
DB2/400
DB2400Dialect
DB2Dialect
DB2
Derby
DerbyDialect
FirebirdDialect
Firebird
FrontBase
FrontBaseDialect
HSQLDialect
HSQLDB
Informix
InformixDialect
IngresDialect
Ingres
InterBase
InterbaseDialect
JDataStoreDialect
JDataStore
Mimer SQL
MimerSQLDialect
MckoiDialect
Mckoi
MySQL 5
MySQL5Dialect
MySQLDialect
MySQL (< 5.x)
MySQL with InnoDB tables
MySQLInnoDBDialect
MySQLMyISAMDialect
MySQL with MyISAM tables
Search WWH ::




Custom Search