public final class Environment extends Object implements AvailableSettings
property | meaning |
hibernate.dialect | classname of org.hibernate.dialect.Dialect subclass |
hibernate.connection.provider_class | classname of ConnectionProvider subclass (if not specified hueristics are used) |
hibernate.connection.username | database username |
hibernate.connection.password | database password |
hibernate.connection.url | JDBC URL (when using java.sql.DriverManager) |
hibernate.connection.driver_class | classname of JDBC driver |
hibernate.connection.isolation | JDBC transaction isolation level (only when using java.sql.DriverManager) | hibernate.connection.pool_size | the maximum size of the connection pool (only when using java.sql.DriverManager) |
hibernate.connection.datasource | databasource JNDI name (when using javax.sql.Datasource) |
hibernate.jndi.url | JNDI InitialContext URL |
hibernate.jndi.class | JNDI InitialContext classname |
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_scrollable_resultset | enable use of JDBC2 scrollable resultsets (you only need this specify this property when using user supplied connections) |
hibernate.jdbc.use_getGeneratedKeys | enable use of JDBC3 PreparedStatement.getGeneratedKeys() 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.session_factory_name | If set, the factory attempts to bind this name to itself in the JNDI context. This name is also used to support cross JVM Session (de)serialization. |
hibernate.transaction.jta.platform | classname of org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform implementor |
hibernate.transaction.factory_class | the factory to use for instantiating Transactions. (Defaults to JdbcTransactionFactory.) |
hibernate.query.substitutions | query language token substitutions |
SessionFactory
APP_CLASSLOADER, ARTIFACT_PROCESSING_ORDER, AUTO_CLOSE_SESSION, AUTO_EVICT_COLLECTION_CACHE, AUTO_SESSION_EVENTS_LISTENER, AUTOCOMMIT, BATCH_FETCH_STYLE, BATCH_STRATEGY, BATCH_VERSIONED_DATA, BYTECODE_PROVIDER, C3P0_ACQUIRE_INCREMENT, C3P0_CONFIG_PREFIX, C3P0_IDLE_TEST_PERIOD, C3P0_MAX_SIZE, C3P0_MAX_STATEMENTS, C3P0_MIN_SIZE, C3P0_TIMEOUT, CACHE_KEYS_FACTORY, CACHE_PROVIDER_CONFIG, CACHE_REGION_FACTORY, CACHE_REGION_PREFIX, CHECK_NULLABILITY, CLASSLOADERS, CONNECTION_PREFIX, CONNECTION_PROVIDER, CURRENT_SESSION_CONTEXT_CLASS, CUSTOM_ENTITY_DIRTINESS_STRATEGY, DATASOURCE, DEFAULT_BATCH_FETCH_SIZE, DEFAULT_CACHE_CONCURRENCY_STRATEGY, DEFAULT_CATALOG, DEFAULT_ENTITY_MODE, DEFAULT_NULL_ORDERING, DEFAULT_SCHEMA, DIALECT, DIALECT_RESOLVERS, DRIVER, ENABLE_LAZY_LOAD_NO_TRANS, ENABLE_SYNONYMS, ENVIRONMENT_CLASSLOADER, EXTRA_PHYSICAL_TABLE_TYPES, FLUSH_BEFORE_COMPLETION, FORCE_DISCRIMINATOR_IN_SELECTS_BY_DEFAULT, FORMAT_SQL, GENERATE_STATISTICS, GLOBALLY_QUOTED_IDENTIFIERS, HBM2DDL_AUTO, HBM2DDL_IMPORT_FILES, HBM2DDL_IMPORT_FILES_SQL_EXTRACTOR, HBM2DLL_CREATE_NAMESPACES, HIBERNATE_CLASSLOADER, HQL_BULK_ID_STRATEGY, IGNORE_EXPLICIT_DISCRIMINATOR_COLUMNS_FOR_JOINED_SUBCLASS, IMPLICIT_DISCRIMINATOR_COLUMNS_FOR_JOINED_SUBCLASS, IMPLICIT_NAMING_STRATEGY, INTERCEPTOR, ISOLATION, JACC_CONTEXT_ID, JACC_ENABLED, JACC_PREFIX, JMX_AGENT_ID, JMX_DEFAULT_OBJ_NAME_DOMAIN, JMX_DOMAIN_NAME, JMX_ENABLED, JMX_PLATFORM_SERVER, JMX_SF_NAME, JNDI_CLASS, JNDI_PREFIX, JNDI_URL, JPAQL_STRICT_COMPLIANCE, JTA_CACHE_TM, JTA_CACHE_UT, JTA_PLATFORM, JTA_PLATFORM_RESOLVER, JTA_TRACK_BY_THREAD, KEYWORD_AUTO_QUOTING_ENABLED, LOG_SESSION_METRICS, MAX_FETCH_DEPTH, MULTI_TENANT, MULTI_TENANT_CONNECTION_PROVIDER, MULTI_TENANT_IDENTIFIER_RESOLVER, NON_CONTEXTUAL_LOB_CREATION, ORDER_INSERTS, ORDER_UPDATES, PASS, PHYSICAL_NAMING_STRATEGY, POOL_SIZE, PREFER_POOLED_VALUES_LO, PREFER_USER_TRANSACTION, PREFERRED_POOLED_OPTIMIZER, PROCEDURE_NULL_PARAM_PASSING, PROXOOL_CONFIG_PREFIX, PROXOOL_EXISTING_POOL, PROXOOL_POOL_ALIAS, PROXOOL_PREFIX, PROXOOL_PROPERTIES, PROXOOL_XML, QUERY_CACHE_FACTORY, QUERY_PLAN_CACHE_MAX_SIZE, QUERY_PLAN_CACHE_MAX_SOFT_REFERENCES, QUERY_PLAN_CACHE_MAX_STRONG_REFERENCES, QUERY_PLAN_CACHE_PARAMETER_METADATA_MAX_SIZE, QUERY_STARTUP_CHECKING, QUERY_SUBSTITUTIONS, QUERY_TRANSLATOR, RELEASE_CONNECTIONS, RESOURCES_CLASSLOADER, SCANNER, SCANNER_ARCHIVE_INTERPRETER, SCANNER_DEPRECATED, SCANNER_DISCOVERY, SCHEMA_MANAGEMENT_TOOL, SESSION_FACTORY_NAME, SESSION_FACTORY_NAME_IS_JNDI, SHOW_SQL, SQL_EXCEPTION_CONVERTER, STATEMENT_BATCH_SIZE, STATEMENT_FETCH_SIZE, STATEMENT_INSPECTOR, TRANSACTION_COORDINATOR_STRATEGY, UNIQUE_CONSTRAINT_SCHEMA_UPDATE_STRATEGY, URL, USE_DIRECT_REFERENCE_CACHE_ENTRIES, USE_GET_GENERATED_KEYS, USE_IDENTIFIER_ROLLBACK, USE_MINIMAL_PUTS, USE_NATIONALIZED_CHARACTER_DATA, USE_NEW_ID_GENERATOR_MAPPINGS, USE_QUERY_CACHE, USE_REFLECTION_OPTIMIZER, USE_SCROLLABLE_RESULTSET, USE_SECOND_LEVEL_CACHE, USE_SQL_COMMENTS, USE_STREAMS_FOR_BINARY, USE_STRUCTURED_CACHE, USER, WRAP_RESULT_SETS
Modifier and Type | Method and Description |
---|---|
static BytecodeProvider |
buildBytecodeProvider(Properties properties) |
static BytecodeProvider |
getBytecodeProvider() |
static Properties |
getProperties()
Return System properties, extended by any properties specified
in hibernate.properties.
|
static String |
isolationLevelToString(int isolation)
Deprecated.
|
static boolean |
jvmHasTimestampBug()
Does this JVM's implementation of
Timestamp have a bug in which the following is true:
new java.sql.Timestamp( x ).getTime() != x
NOTE : IBM JDK 1.3.1 the only known JVM to exhibit this behavior. |
static boolean |
useReflectionOptimizer()
Should we use reflection optimization?
|
static boolean |
useStreamsForBinary()
Should we use streams to bind binary types to JDBC IN parameters?
|
static void |
verifyProperties(Map<?,?> configurationValues)
Issues warnings to the user when any obsolete or renamed property names are used.
|
public static void verifyProperties(Map<?,?> configurationValues)
configurationValues
- The specified properties.public static BytecodeProvider getBytecodeProvider()
public static boolean jvmHasTimestampBug()
Timestamp
have a bug in which the following is true:
new java.sql.Timestamp( x ).getTime() != x
NOTE : IBM JDK 1.3.1 the only known JVM to exhibit this behavior.Timestamp
implementapublic static boolean useStreamsForBinary()
AvailableSettings.USE_STREAMS_FOR_BINARY
public static boolean useReflectionOptimizer()
AvailableSettings.USE_REFLECTION_OPTIMIZER
,
getBytecodeProvider()
,
BytecodeProvider.getReflectionOptimizer(java.lang.Class, java.lang.String[], java.lang.String[], java.lang.Class[])
public static Properties getProperties()
@Deprecated public static String isolationLevelToString(int isolation)
ConnectionProviderInitiator.toIsolationNiceName(java.lang.Integer)
insteadpublic static BytecodeProvider buildBytecodeProvider(Properties properties)
Copyright © 2001-2017 Red Hat, Inc. All Rights Reserved.