Properties objects.
Hibernate has two property scopes:
org.hibernate.SessionFactory is configured and instantiated. Each instance
might have different property values.
Environment properties in getProperties().
Environment properties are populated by calling System#getProperties()
and then from a resource named /hibernate.properties, if it exists. System
properties override properties specified in hibernate.properties.
The org. obtains properties from:
system properties,
/hibernate.properties, and
Properties passed to Configuration#addProperties.
| Property | Interpretation |
| hibernate.dialect | name of org. subclass |
| hibernate.connection.provider_class | name of a org.
subclass (if not specified heuristics are used) |
| hibernate.connection.username | database username |
| hibernate.connection.password | database password |
| hibernate.connection.url | JDBC URL (when using java.) |
| hibernate.connection.driver_class | classname of JDBC driver |
| hibernate.connection.isolation | JDBC transaction isolation level (only when using
java.)
|
| hibernate.connection.pool_size | the maximum size of the connection pool (only when using
java.)
|
| hibernate.connection.datasource | datasource JNDI name (when using javax.) |
| hibernate.jndi.url | JNDI javax. URL |
| hibernate.jndi.class | JNDI javax. class name |
| hibernate.max_fetch_depth | maximum depth of outer join fetching |
| hibernate.jdbc.batch_size | enable use of JDBC2 batch API for drivers which support it |
| hibernate.jdbc.fetch_size | set the JDBC fetch size |
| hibernate.jdbc.use_get_generated_keys | enable use of JDBC3 java.
to retrieve natively generated keys after insert. Requires JDBC3+ driver and
JRE1.4+ |
| hibernate.hbm2ddl.auto | enable auto DDL export |
| hibernate.default_schema | use given schema name for unqualified tables (always optional) |
| hibernate.default_catalog | use given catalog name for unqualified tables (always optional) |
| hibernate.transaction.jta.platform | name of org.
implementation |
API Note
This is really considered an internal contract, but leaving in place in this
package as many applications use it historically. However, consider migrating to use
AvailableSettings instead.
org.hibernate.SessionFactory
| Modifier and Type | Field and Description |
|---|---|
| private static final Properties | |
| private static final CoreMessageLogger |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Properties | getProperties()
The |
| GLOBAL_PROPERTIES | back to summary |
|---|---|
| private static final Properties GLOBAL_PROPERTIES | |
| LOG | back to summary |
|---|---|
| private static final CoreMessageLogger LOG | |
| Environment | back to summary |
|---|---|
| private Environment() Disallow instantiation | |
| getProperties | back to summary |
|---|---|
| public static Properties getProperties() The | |