Describes a Hibernate service MBean. Configures a
org.hibernate.SessionFactory instance and exposes it through JNDI.
The SessionFactory is built through either
auto-discovery : where the classpath of the top-level deployment
containing this MBean is searched for jars and directories to add to the
config
har-deployment : where the deployment containing this MBean description
conforms to the har layout definition.
getBatchVersionedDataEnabled() Should Hibernate allow JDBC batch-updating of versioned entities?
Many drivers have bugs regarding the row counts returned in response to JDBC Batch API operations; in these cases,
this should definitely be set to false.
getReflectionOptimizationEnabled() Should Hibernate use cglib-based reflection optimizations?
Note : this may or may not improve performance based on the JVM you are using.
getStatisticsServiceName() Retreive the service name of the managed stats mbean.
When statistics are enabled on the managed session factory, the mbean
automatically manages a stats mbean for stats exposure via jmx.
getUseStructuredCacheEntriesEnabled() Should Hibernate use structured cache entries when putting stuff into the second level cache?
Mainly useful if users wish to directly browse the second level caches as it is easier to see what the cache entries
actually represent.
getVersion() The version Hibernate for the managed
org.hibernate.SessionFactory .
public boolean
isDirty() Is this MBean dirty? Meaning, have any changes been made to it that have not yet been propogated to the managed
org.hibernate.SessionFactory ?
Note : the only way to propogate these changes to the SF is by calling the
HibernateMBean.rebuildSessionFactory() managed
operation.
public boolean
isScanForMappingsEnabled() Enables scanning of the entire deployment classpath for any potential mapping
sources (jars or directories).
rebuildSessionFactory() A JMX managed operation to rebuild the managed
org.hibernate.SessionFactory such that any setting changes
made can take effect.
setCacheProviderClass(String cacheProviderClass) The name of the
org.hibernate.cache.CacheProvider implementation class to use for second level caching.
public void
setCacheRegionPrefix(String cacheRegionPrefix) The prefix to use for this session factory within the second level cache.
setScanForMappingsEnabled(boolean scanForMappings) Enables scanning of the entire deployment classpath for any potential mapping
sources (jars or directories).
setSessionFactoryInterceptor(String sessionFactoryInterceptor) The name of an
org.hibernate.Interceptor impl class to be attached to the managed
org.hibernate.SessionFactory .
public void
setSessionFactoryName(String sessionFactoryName) The JNDI namespace where the managed
org.hibernate.SessionFactory is to be bound.
Should Hibernate allow JDBC batch-updating of versioned entities?
Many drivers have bugs regarding the row counts returned in response to JDBC Batch API operations; in these cases,
this should definitely be set to false.
The current setting value See Also: org.hibernate.cfg.Environment.BATCH_VERSIONED_DATA
The name of the
org.hibernate.cache.CacheProvider implementation class to use for second level caching.
The current setting value See Also: org.hibernate.cfg.Environment.CACHE_PROVIDER
The prefix to use for this session factory within the second level cache.
The current setting value See Also: org.hibernate.cfg.Environment.CACHE_NAMESPACE
The JNDI namespace of the
javax.sql.DataSource which should be used by the managed
org.hibernate.SessionFactory .
The current setting value. See Also: org.hibernate.cfg.Environment.DATASOURCE
The default database catalog to use within the database being mapped.
Used for databases which support the concept of catalogs instead of schemas.
The current setting value. See Also:HibernateMBean.getDefaultSchema See Also: org.hibernate.cfg.Environment.DEFAULT_CATALOG
The default database schema to use within the database being mapped.
Used for databases which support the concept of schemas instead of catalogs.
The current setting value. See Also:HibernateMBean.getDefaultCatalog See Also: org.hibernate.cfg.Environment.DEFAULT_SCHEMA
The url to the har deployment, if MBean is operating in har deployment mode.
The url of the har containing this MBean, or null if not part ofa har deployment.
Should Hibernate use cglib-based reflection optimizations?
Note : this may or may not improve performance based on the JVM you are using.
See Also: org.hibernate.cfg.Environment.USE_REFLECTION_OPTIMIZER
The date and time since which the currently managed
org.hibernate.SessionFactory has been running.
The date and time the current org.hibernate.SessionFactory was started.
Retreive the service name of the managed stats mbean.
When statistics are enabled on the managed session factory, the mbean
automatically manages a stats mbean for stats exposure via jmx. This
returns the name under which that stats mbean is available from the jmx
server.
The service name of the stats mbean, or null if stats not enabled.
Should Hibernate use structured cache entries when putting stuff into the second level cache?
Mainly useful if users wish to directly browse the second level caches as it is easier to see what the cache entries
actually represent.
See Also: org.hibernate.cfg.Environment.USE_STRUCTURED_CACHE
Is this MBean dirty? Meaning, have any changes been made to it that have not yet been propogated to the managed
org.hibernate.SessionFactory ?
Note : the only way to propogate these changes to the SF is by calling the
HibernateMBean.rebuildSessionFactory() managed
operation.
A JMX managed operation to rebuild the managed
org.hibernate.SessionFactory such that any setting changes
made can take effect.
throws: Exception -
setBatchVersionedDataEnabled
public void setBatchVersionedDataEnabled(Boolean batchVersionedDataEnabled)(Code)
Should Hibernate allow JDBC batch-updating of versioned entities?
Parameters: batchVersionedDataEnabled -
setCacheProviderClass
public void setCacheProviderClass(String cacheProviderClass)(Code)
The name of the
org.hibernate.cache.CacheProvider implementation class to use for second level caching.
Parameters: cacheProviderClass - The new provider impl class name.
setCacheRegionPrefix
public void setCacheRegionPrefix(String cacheRegionPrefix)(Code)
The prefix to use for this session factory within the second level cache.
Parameters: cacheRegionPrefix - The new prefix value.
setDatasourceName
public void setDatasourceName(String datasourceName)(Code)
The JNDI namespace of the
javax.sql.DataSource which should be used by the managed
org.hibernate.SessionFactory .
Parameters: datasourceName - The new DataSource JNDI name to use.
setDefaultCatalog
public void setDefaultCatalog(String defaultCatalog)(Code)
The default database catalog to use within the database being mapped.
Parameters: defaultCatalog - The new default catalog name.
setDefaultSchema
public void setDefaultSchema(String defaultSchema)(Code)
The default database schema to use within the database being mapped.
Parameters: defaultSchema - The new default schema name to use.
setDeployedTreeCacheObjectName
public void setDeployedTreeCacheObjectName(ObjectName deployedTreeCacheObjectName)(Code)
The JMX name of a
org.jboss.cache.TreeCache MBean to be used as the second level cache.
Parameters: deployedTreeCacheObjectName - The new mbean object name.
The name of the dialect class to use for communicating with the database.
Parameters: dialect - The new dialect class name to use.
setGetGeneratedKeysEnabled
public void setGetGeneratedKeysEnabled(Boolean getGeneratedKeysEnabled)(Code)
Is the use of JDBC3 getGeneratedKeys() enabled?
Parameters: getGeneratedKeysEnabled - The new value.
setHbm2ddlAuto
public void setHbm2ddlAuto(String hbm2ddlAuto)(Code)
The form, if any, of schema generation which should be used.
Parameters: hbm2ddlAuto - The new hbm2ddl setting; valid values are: update, create, create-drop
setJdbcBatchSize
public void setJdbcBatchSize(Integer jdbcBatchSize)(Code)
The JDBC batch update batch size.
Parameters: jdbcBatchSize - The new value for the number of statements to batch together.
setJdbcFetchSize
public void setJdbcFetchSize(Integer jdbcFetchSize)(Code)
The JDBC fetch size.
Parameters: jdbcFetchSize - The new value for the number of rows to fetch from server at a time.
setJdbcScrollableResultSetEnabled
public void setJdbcScrollableResultSetEnabled(Boolean jdbcScrollableResultSetEnabled)(Code)
Are scrollable result sets enabled?
Parameters: jdbcScrollableResultSetEnabled - The new value.
setListenerInjector
public void setListenerInjector(String listenerInjector)(Code)
The password used to access the specified datasource.
Parameters: password - The new password value.
setQueryCacheEnabled
public void setQueryCacheEnabled(Boolean queryCacheEnabled)(Code)
Is use of the query cache enabled?
Parameters: queryCacheEnabled - The new value of whether or not to enable.
setQuerySubstitutions
public void setQuerySubstitutions(String querySubstitutions)(Code)
Query substitutions to use.
Parameters: querySubstitutions - The new query substitutions to use
setReflectionOptimizationEnabled
public void setReflectionOptimizationEnabled(Boolean reflectionOptimizationEnabled)(Code)
Should Hibernate use cglib-based reflection optimizations?
Parameters: reflectionOptimizationEnabled -
setScanForMappingsEnabled
public void setScanForMappingsEnabled(boolean scanForMappings)(Code)
Enables scanning of the entire deployment classpath for any potential mapping
sources (jars or directories).
Only used in the case of har deployments.
Parameters: scanForMappings -
setSecondLevelCacheEnabled
public void setSecondLevelCacheEnabled(Boolean secondLevelCacheEnabled)(Code)
setSessionFactoryInterceptor
public void setSessionFactoryInterceptor(String sessionFactoryInterceptor)(Code)
The name of an
org.hibernate.Interceptor impl class to be attached to the managed
org.hibernate.SessionFactory .
Parameters: sessionFactoryInterceptor -
setSessionFactoryName
public void setSessionFactoryName(String sessionFactoryName)(Code)
The JNDI namespace where the managed
org.hibernate.SessionFactory is to be bound.
Parameters: sessionFactoryName - The new JNDI namespace to use.
setShowSqlEnabled
public void setShowSqlEnabled(Boolean showSqlEnabled)(Code)
Should all SQL be shown (dumped to console and logged)?
Parameters: showSqlEnabled -
setSqlCommentsEnabled
public void setSqlCommentsEnabled(Boolean commentsEnabled)(Code)
Should sql comments be used?
Parameters: commentsEnabled -
setStatGenerationEnabled
public void setStatGenerationEnabled(Boolean statGenerationEnabled)(Code)
Should generation and collection of Hibernate3 statistics be enabled?
Parameters: statGenerationEnabled -
setStreamsForBinaryEnabled
public void setStreamsForBinaryEnabled(Boolean streamsForBinaryEnabled)(Code)
Should Hibernate use I/O streaming for handling binary/LOB data?
Parameters: streamsForBinaryEnabled -
setUseStructuredCacheEntriesEnabled
public void setUseStructuredCacheEntriesEnabled(Boolean structuredEntriesEnabled)(Code)
Should Hibernate use structured cache entries when putting stuff into the second level cache?
Parameters: structuredEntriesEnabled -