org.jboss.hibernate.jmx
Class Hibernate

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.hibernate.jmx.Hibernate
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, HibernateMBean, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class Hibernate
extends org.jboss.system.ServiceMBeanSupport
implements HibernateMBean

The HibernateMBean implementation.

Version:
$Revision: 57193 $
Author:
Alexey Loubyansky, Gavin King, Steve Ebersole, Dimitris Andreadis

Field Summary
static String SESSION_FACTORY_CREATE
           
static String SESSION_FACTORY_DESTROY
           
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
Hibernate()
           
 
Method Summary
 void createSchema()
          Export the CREATE DDL to the database
protected  void createService()
           
 void dropSchema()
          Export the DROP DDL to the database
 Boolean 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.

 String getCacheProviderClass()
          The name of the CacheProvider implementation class to use for second level caching.
 String getCacheRegionPrefix()
          The prefix to use for this session factory within the second level cache.
 String getDatasourceName()
          The JNDI namespace of the DataSource which should be used by the managed SessionFactory.
 String getDefaultCatalog()
          The default database catalog to use within the database being mapped.
 String getDefaultSchema()
          The default database schema to use within the database being mapped.
 javax.management.ObjectName getDeployedTreeCacheObjectName()
          The JMX name of a TreeCache MBean to be used as the second level cache.
 String getDialect()
          The name of the dialect class to use for communicating with the database.
 Boolean getGetGeneratedKeysEnabled()
          Is the use of JDBC3 getGeneratedKeys() enabled?
 URL getHarUrl()
          The url to the har deployment, if MBean is operating in har deployment mode.
 String getHbm2ddlAuto()
          The form, if any, of schema generation which should be used.
 org.hibernate.SessionFactory getInstance()
          Exposes the internally managed session factory via a read-only JMX managed attribute.
 Integer getJdbcBatchSize()
          The JDBC batch update batch size.
 Integer getJdbcFetchSize()
          The JDBC fetch size.
 Boolean getJdbcScrollableResultSetEnabled()
          Are scrollable result sets enabled?
 String getListenerInjector()
          The ListenerInjector implementor class to use.
 Integer getMaxFetchDepth()
          The maximum outer join fetch depth.
 Boolean getMinimalPutsEnabled()
          Should minimal puts be enabled against the given cache provider?
 Boolean getQueryCacheEnabled()
          Is use of the query cache enabled?
 String getQuerySubstitutions()
          Query substitutions to use.
 Boolean getReflectionOptimizationEnabled()
          Should Hibernate use cglib-based reflection optimizations?

Note : this may or may not improve performance based on the JVM you are using.

 Date getRunningSince()
          The date and time since which the currently managed SessionFactory has been running.
 Boolean getSecondLevelCacheEnabled()
           
 String getSessionFactoryInterceptor()
          The name of an Interceptor impl class to be attached to the managed SessionFactory.
 String getSessionFactoryName()
          The JNDI namespace where the managed SessionFactory is to be bound.
 Boolean getShowSqlEnabled()
          Should all SQL be shown (dumped to console and logged)?
 Boolean getSqlCommentsEnabled()
          Should sql comments be used?
 Boolean getStatGenerationEnabled()
          Should generation and collection of Hibernate3 statistics be enabled?
 javax.management.ObjectName getStatisticsServiceName()
          Retreive the service name of the managed stats mbean.
 Boolean getStreamsForBinaryEnabled()
          Should Hibernate use I/O streaming for handling binary/LOB data?
 String getUsername()
          The username used to access the specified datasource.
 Boolean 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.

 String getVersion()
          The version Hibernate for the managed SessionFactory.
 boolean isDirty()
          Is this MBean dirty? Meaning, have any changes been made to it that have not yet been propogated to the managed SessionFactory?

Note : the only way to propogate these changes to the SF is by calling the HibernateMBean.rebuildSessionFactory() managed operation.

 boolean isScanForMappingsEnabled()
          Enables scanning of the entire deployment classpath for any potential mapping sources (jars or directories).
 boolean isSessionFactoryRunning()
          Does this MBean instance have a currently running managed SessionFactory?
 void rebuildSessionFactory()
          A JMX managed operation to rebuild the managed SessionFactory such that any setting changes made can take effect.
 void setBatchVersionedDataEnabled(Boolean batchVersionedDataEnabled)
          Should Hibernate allow JDBC batch-updating of versioned entities?
 void setCacheProviderClass(String cacheProviderClass)
          The name of the CacheProvider implementation class to use for second level caching.
 void setCacheRegionPrefix(String cacheRegionPrefix)
          The prefix to use for this session factory within the second level cache.
 void setDatasourceName(String datasourceName)
          The JNDI namespace of the DataSource which should be used by the managed SessionFactory.
 void setDefaultCatalog(String defaultCatalog)
          The default database catalog to use within the database being mapped.
 void setDefaultSchema(String defaultSchema)
          The default database schema to use within the database being mapped.
 void setDeployedTreeCacheObjectName(javax.management.ObjectName deployedTreeCacheObjectName)
          The JMX name of a TreeCache MBean to be used as the second level cache.
 void setDialect(String dialect)
          The name of the dialect class to use for communicating with the database.
 void setGetGeneratedKeysEnabled(Boolean getGeneratedKeysEnabled)
          Is the use of JDBC3 getGeneratedKeys() enabled?
 void setHbm2ddlAuto(String hbm2ddlAuto)
          The form, if any, of schema generation which should be used.
 void setJdbcBatchSize(Integer jdbcBatchSize)
          The JDBC batch update batch size.
 void setJdbcFetchSize(Integer jdbcFetchSize)
          The JDBC fetch size.
 void setJdbcScrollableResultSetEnabled(Boolean jdbcScrollableResultSetEnabled)
          Are scrollable result sets enabled?
 void setListenerInjector(String listenerInjector)
          The ListenerInjector implementor class to use.
 void setMaxFetchDepth(Integer maxFetchDepth)
          The maximum outer join fetch depth.
 void setMinimalPutsEnabled(Boolean minimalPutsEnabled)
          Should minimal puts be enabled against the given cache provider?
 void setPassword(String password)
          The password used to access the specified datasource.
 void setQueryCacheEnabled(Boolean queryCacheEnabled)
          Is use of the query cache enabled?
 void setQuerySubstitutions(String querySubstitutions)
          Query substitutions to use.
 void setReflectionOptimizationEnabled(Boolean reflectionOptimizationEnabled)
          Should Hibernate use cglib-based reflection optimizations?
 void setScanForMappingsEnabled(boolean scanForMappingsEnabled)
          Enables scanning of the entire deployment classpath for any potential mapping sources (jars or directories).
 void setSecondLevelCacheEnabled(Boolean secondLevelCacheEnabled)
           
 void setSessionFactoryInterceptor(String sessionFactoryInterceptor)
          The name of an Interceptor impl class to be attached to the managed SessionFactory.
 void setSessionFactoryName(String sessionFactoryName)
          The JNDI namespace where the managed SessionFactory is to be bound.
 void setShowSqlEnabled(Boolean showSqlEnabled)
          Should all SQL be shown (dumped to console and logged)?
 void setSqlCommentsEnabled(Boolean commentsEnabled)
          Should sql comments be used?
 void setStatGenerationEnabled(Boolean statGenerationEnabled)
          Should generation and collection of Hibernate3 statistics be enabled?
 void setStreamsForBinaryEnabled(Boolean streamsForBinaryEnabled)
          Should Hibernate use I/O streaming for handling binary/LOB data?
 void setUsername(String username)
          The username used to access the specified datasource.
 void setUseStructuredCacheEntriesEnabled(Boolean structuredCacheEntriesEnabled)
          Should Hibernate use structured cache entries when putting stuff into the second level cache?
 void startService()
          Configure Hibernate and bind the SessionFactory to JNDI.
 void stopService()
          Close the SessionFactory.
 String toString()
           
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, destroy, destroyService, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 
Methods inherited from interface javax.management.MBeanRegistration
postDeregister, postRegister, preDeregister, preRegister
 

Field Detail

SESSION_FACTORY_CREATE

public static final String SESSION_FACTORY_CREATE
See Also:
Constant Field Values

SESSION_FACTORY_DESTROY

public static final String SESSION_FACTORY_DESTROY
See Also:
Constant Field Values
Constructor Detail

Hibernate

public Hibernate()
Method Detail

createService

protected void createService()
                      throws Exception
Overrides:
createService in class org.jboss.system.ServiceMBeanSupport
Throws:
Exception

startService

public void startService()
                  throws Exception
Configure Hibernate and bind the SessionFactory to JNDI.

Overrides:
startService in class org.jboss.system.ServiceMBeanSupport
Throws:
Exception

stopService

public void stopService()
                 throws Exception
Close the SessionFactory.

Overrides:
stopService in class org.jboss.system.ServiceMBeanSupport
Throws:
Exception

createSchema

public void createSchema()
                  throws Exception
Description copied from interface: HibernateMBean
Export the CREATE DDL to the database

Specified by:
createSchema in interface HibernateMBean
Throws:
Exception

dropSchema

public void dropSchema()
                throws Exception
Description copied from interface: HibernateMBean
Export the DROP DDL to the database

Specified by:
dropSchema in interface HibernateMBean
Throws:
Exception

toString

public String toString()
Overrides:
toString in class Object

rebuildSessionFactory

public void rebuildSessionFactory()
                           throws Exception
Description copied from interface: HibernateMBean
A JMX managed operation to rebuild the managed SessionFactory such that any setting changes made can take effect.

Specified by:
rebuildSessionFactory in interface HibernateMBean
Throws:
Exception

isDirty

public boolean isDirty()
Description copied from interface: HibernateMBean
Is this MBean dirty? Meaning, have any changes been made to it that have not yet been propogated to the managed SessionFactory?

Note : the only way to propogate these changes to the SF is by calling the HibernateMBean.rebuildSessionFactory() managed operation.

Specified by:
isDirty in interface HibernateMBean
Returns:

isSessionFactoryRunning

public boolean isSessionFactoryRunning()
Description copied from interface: HibernateMBean
Does this MBean instance have a currently running managed SessionFactory?

Specified by:
isSessionFactoryRunning in interface HibernateMBean
Returns:

getVersion

public String getVersion()
Description copied from interface: HibernateMBean
The version Hibernate for the managed SessionFactory.

Specified by:
getVersion in interface HibernateMBean
Returns:

getInstance

public org.hibernate.SessionFactory getInstance()
Description copied from interface: HibernateMBean
Exposes the internally managed session factory via a read-only JMX managed attribute.

Specified by:
getInstance in interface HibernateMBean
Returns:
The managed session factory.

getHarUrl

public URL getHarUrl()
Description copied from interface: HibernateMBean
The url to the har deployment, if MBean is operating in har deployment mode.

Specified by:
getHarUrl in interface HibernateMBean
Returns:
The url of the har containing this MBean, or null if not part of a har deployment.

getStatisticsServiceName

public javax.management.ObjectName getStatisticsServiceName()
Description copied from interface: HibernateMBean
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.

Specified by:
getStatisticsServiceName in interface HibernateMBean
Returns:
The service name of the stats mbean, or null if stats not enabled.

getRunningSince

public Date getRunningSince()
Description copied from interface: HibernateMBean
The date and time since which the currently managed SessionFactory has been running.

Specified by:
getRunningSince in interface HibernateMBean
Returns:
The date and time the current SessionFactory was started.

getSessionFactoryName

public String getSessionFactoryName()
Description copied from interface: HibernateMBean
The JNDI namespace where the managed SessionFactory is to be bound.

Specified by:
getSessionFactoryName in interface HibernateMBean
Returns:
The current setting value.

setSessionFactoryName

public void setSessionFactoryName(String sessionFactoryName)
Description copied from interface: HibernateMBean
The JNDI namespace where the managed SessionFactory is to be bound.

Specified by:
setSessionFactoryName in interface HibernateMBean
Parameters:
sessionFactoryName - The new JNDI namespace to use.

getDatasourceName

public String getDatasourceName()
Description copied from interface: HibernateMBean
The JNDI namespace of the DataSource which should be used by the managed SessionFactory.

Specified by:
getDatasourceName in interface HibernateMBean
Returns:
The current setting value.
See Also:
Environment.DATASOURCE

setDatasourceName

public void setDatasourceName(String datasourceName)
Description copied from interface: HibernateMBean
The JNDI namespace of the DataSource which should be used by the managed SessionFactory.

Specified by:
setDatasourceName in interface HibernateMBean
Parameters:
datasourceName - The new DataSource JNDI name to use.

getUsername

public String getUsername()
Description copied from interface: HibernateMBean
The username used to access the specified datasource.

Specified by:
getUsername in interface HibernateMBean
Returns:
The current setting value.
See Also:
Environment.USER

setUsername

public void setUsername(String username)
Description copied from interface: HibernateMBean
The username used to access the specified datasource.

Specified by:
setUsername in interface HibernateMBean
Parameters:
username - The new username value.

setPassword

public void setPassword(String password)
Description copied from interface: HibernateMBean
The password used to access the specified datasource.

Specified by:
setPassword in interface HibernateMBean
Parameters:
password - The new password value.

getDefaultSchema

public String getDefaultSchema()
Description copied from interface: HibernateMBean
The default database schema to use within the database being mapped.

Used for databases which support the concept of schemas instead of catalogs.

Specified by:
getDefaultSchema in interface HibernateMBean
Returns:
The current setting value.
See Also:
HibernateMBean.getDefaultCatalog(), Environment.DEFAULT_SCHEMA

setDefaultSchema

public void setDefaultSchema(String defaultSchema)
Description copied from interface: HibernateMBean
The default database schema to use within the database being mapped.

Specified by:
setDefaultSchema in interface HibernateMBean
Parameters:
defaultSchema - The new default schema name to use.

getDefaultCatalog

public String getDefaultCatalog()
Description copied from interface: HibernateMBean
The default database catalog to use within the database being mapped.

Used for databases which support the concept of catalogs instead of schemas.

Specified by:
getDefaultCatalog in interface HibernateMBean
Returns:
The current setting value.
See Also:
HibernateMBean.getDefaultSchema(), Environment.DEFAULT_CATALOG

setDefaultCatalog

public void setDefaultCatalog(String defaultCatalog)
Description copied from interface: HibernateMBean
The default database catalog to use within the database being mapped.

Specified by:
setDefaultCatalog in interface HibernateMBean
Parameters:
defaultCatalog - The new default catalog name.

getHbm2ddlAuto

public String getHbm2ddlAuto()
Description copied from interface: HibernateMBean
The form, if any, of schema generation which should be used.

Specified by:
getHbm2ddlAuto in interface HibernateMBean
Returns:
The current setting value.
See Also:
Environment.HBM2DDL_AUTO

setHbm2ddlAuto

public void setHbm2ddlAuto(String hbm2ddlAuto)
Description copied from interface: HibernateMBean
The form, if any, of schema generation which should be used.

Specified by:
setHbm2ddlAuto in interface HibernateMBean
Parameters:
hbm2ddlAuto - The new hbm2ddl setting; valid values are: update, create, create-drop

getDialect

public String getDialect()
Description copied from interface: HibernateMBean
The name of the dialect class to use for communicating with the database.

Specified by:
getDialect in interface HibernateMBean
Returns:
The current setting value.
See Also:
Environment.DIALECT

setDialect

public void setDialect(String dialect)
Description copied from interface: HibernateMBean
The name of the dialect class to use for communicating with the database.

Specified by:
setDialect in interface HibernateMBean
Parameters:
dialect - The new dialect class name to use.

getMaxFetchDepth

public Integer getMaxFetchDepth()
Description copied from interface: HibernateMBean
The maximum outer join fetch depth.

Specified by:
getMaxFetchDepth in interface HibernateMBean
Returns:
The current setting value
See Also:
Environment.MAX_FETCH_DEPTH

setMaxFetchDepth

public void setMaxFetchDepth(Integer maxFetchDepth)
Description copied from interface: HibernateMBean
The maximum outer join fetch depth.

Specified by:
setMaxFetchDepth in interface HibernateMBean
Parameters:
maxFetchDepth - The new max fetch depth value

getJdbcBatchSize

public Integer getJdbcBatchSize()
Description copied from interface: HibernateMBean
The JDBC batch update batch size.

Specified by:
getJdbcBatchSize in interface HibernateMBean
Returns:
The current setting value
See Also:
Environment.STATEMENT_BATCH_SIZE

setJdbcBatchSize

public void setJdbcBatchSize(Integer jdbcBatchSize)
Description copied from interface: HibernateMBean
The JDBC batch update batch size.

Specified by:
setJdbcBatchSize in interface HibernateMBean
Parameters:
jdbcBatchSize - The new value for the number of statements to batch together.

getJdbcFetchSize

public Integer getJdbcFetchSize()
Description copied from interface: HibernateMBean
The JDBC fetch size.

Specified by:
getJdbcFetchSize in interface HibernateMBean
Returns:
The current setting value
See Also:
Environment.STATEMENT_FETCH_SIZE

setJdbcFetchSize

public void setJdbcFetchSize(Integer jdbcFetchSize)
Description copied from interface: HibernateMBean
The JDBC fetch size.

Specified by:
setJdbcFetchSize in interface HibernateMBean
Parameters:
jdbcFetchSize - The new value for the number of rows to fetch from server at a time.

getJdbcScrollableResultSetEnabled

public Boolean getJdbcScrollableResultSetEnabled()
Description copied from interface: HibernateMBean
Are scrollable result sets enabled?

Specified by:
getJdbcScrollableResultSetEnabled in interface HibernateMBean
Returns:
The current setting value
See Also:
Environment.USE_SCROLLABLE_RESULTSET

setJdbcScrollableResultSetEnabled

public void setJdbcScrollableResultSetEnabled(Boolean jdbcScrollableResultSetEnabled)
Description copied from interface: HibernateMBean
Are scrollable result sets enabled?

Specified by:
setJdbcScrollableResultSetEnabled in interface HibernateMBean
Parameters:
jdbcScrollableResultSetEnabled - The new value.

getGetGeneratedKeysEnabled

public Boolean getGetGeneratedKeysEnabled()
Description copied from interface: HibernateMBean
Is the use of JDBC3 getGeneratedKeys() enabled?

Specified by:
getGetGeneratedKeysEnabled in interface HibernateMBean
Returns:
The current setting value
See Also:
Environment.USE_GET_GENERATED_KEYS

setGetGeneratedKeysEnabled

public void setGetGeneratedKeysEnabled(Boolean getGeneratedKeysEnabled)
Description copied from interface: HibernateMBean
Is the use of JDBC3 getGeneratedKeys() enabled?

Specified by:
setGetGeneratedKeysEnabled in interface HibernateMBean
Parameters:
getGeneratedKeysEnabled - The new value.

getQuerySubstitutions

public String getQuerySubstitutions()
Description copied from interface: HibernateMBean
Query substitutions to use.

Specified by:
getQuerySubstitutions in interface HibernateMBean
Returns:
The current setting value
See Also:
Environment.QUERY_SUBSTITUTIONS

setQuerySubstitutions

public void setQuerySubstitutions(String querySubstitutions)
Description copied from interface: HibernateMBean
Query substitutions to use.

Specified by:
setQuerySubstitutions in interface HibernateMBean
Parameters:
querySubstitutions - The new query substitutions to use

getSecondLevelCacheEnabled

public Boolean getSecondLevelCacheEnabled()
Specified by:
getSecondLevelCacheEnabled in interface HibernateMBean

setSecondLevelCacheEnabled

public void setSecondLevelCacheEnabled(Boolean secondLevelCacheEnabled)
Specified by:
setSecondLevelCacheEnabled in interface HibernateMBean

getQueryCacheEnabled

public Boolean getQueryCacheEnabled()
Description copied from interface: HibernateMBean
Is use of the query cache enabled?

Specified by:
getQueryCacheEnabled in interface HibernateMBean
Returns:
The current setting value
See Also:
Environment.USE_QUERY_CACHE

setQueryCacheEnabled

public void setQueryCacheEnabled(Boolean queryCacheEnabled)
Description copied from interface: HibernateMBean
Is use of the query cache enabled?

Specified by:
setQueryCacheEnabled in interface HibernateMBean
Parameters:
queryCacheEnabled - The new value of whether or not to enable.

getCacheProviderClass

public String getCacheProviderClass()
Description copied from interface: HibernateMBean
The name of the CacheProvider implementation class to use for second level caching.

Specified by:
getCacheProviderClass in interface HibernateMBean
Returns:
The current setting value
See Also:
Environment.CACHE_PROVIDER

setCacheProviderClass

public void setCacheProviderClass(String cacheProviderClass)
Description copied from interface: HibernateMBean
The name of the CacheProvider implementation class to use for second level caching.

Specified by:
setCacheProviderClass in interface HibernateMBean
Parameters:
cacheProviderClass - The new provider impl class name.

getCacheRegionPrefix

public String getCacheRegionPrefix()
Description copied from interface: HibernateMBean
The prefix to use for this session factory within the second level cache.

Specified by:
getCacheRegionPrefix in interface HibernateMBean
Returns:
The current setting value
See Also:
Environment.CACHE_NAMESPACE

setCacheRegionPrefix

public void setCacheRegionPrefix(String cacheRegionPrefix)
Description copied from interface: HibernateMBean
The prefix to use for this session factory within the second level cache.

Specified by:
setCacheRegionPrefix in interface HibernateMBean
Parameters:
cacheRegionPrefix - The new prefix value.

getMinimalPutsEnabled

public Boolean getMinimalPutsEnabled()
Description copied from interface: HibernateMBean
Should minimal puts be enabled against the given cache provider?

Specified by:
getMinimalPutsEnabled in interface HibernateMBean
Returns:
The current setting value
See Also:
Environment.USE_MINIMAL_PUTS

setMinimalPutsEnabled

public void setMinimalPutsEnabled(Boolean minimalPutsEnabled)
Description copied from interface: HibernateMBean
Should minimal puts be enabled against the given cache provider?

Specified by:
setMinimalPutsEnabled in interface HibernateMBean

getUseStructuredCacheEntriesEnabled

public Boolean getUseStructuredCacheEntriesEnabled()
Description copied from interface: HibernateMBean
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.

Specified by:
getUseStructuredCacheEntriesEnabled in interface HibernateMBean
Returns:
See Also:
Environment.USE_STRUCTURED_CACHE

setUseStructuredCacheEntriesEnabled

public void setUseStructuredCacheEntriesEnabled(Boolean structuredCacheEntriesEnabled)
Description copied from interface: HibernateMBean
Should Hibernate use structured cache entries when putting stuff into the second level cache?

Specified by:
setUseStructuredCacheEntriesEnabled in interface HibernateMBean

getShowSqlEnabled

public Boolean getShowSqlEnabled()
Description copied from interface: HibernateMBean
Should all SQL be shown (dumped to console and logged)?

Specified by:
getShowSqlEnabled in interface HibernateMBean
Returns:
The current setting value
See Also:
Environment.SHOW_SQL

setShowSqlEnabled

public void setShowSqlEnabled(Boolean showSqlEnabled)
Description copied from interface: HibernateMBean
Should all SQL be shown (dumped to console and logged)?

Specified by:
setShowSqlEnabled in interface HibernateMBean

getSqlCommentsEnabled

public Boolean getSqlCommentsEnabled()
Description copied from interface: HibernateMBean
Should sql comments be used?

Specified by:
getSqlCommentsEnabled in interface HibernateMBean
Returns:
See Also:
Environment.USE_SQL_COMMENTS

setSqlCommentsEnabled

public void setSqlCommentsEnabled(Boolean commentsEnabled)
Description copied from interface: HibernateMBean
Should sql comments be used?

Specified by:
setSqlCommentsEnabled in interface HibernateMBean

getSessionFactoryInterceptor

public String getSessionFactoryInterceptor()
Description copied from interface: HibernateMBean
The name of an Interceptor impl class to be attached to the managed SessionFactory.

Specified by:
getSessionFactoryInterceptor in interface HibernateMBean
Returns:

setSessionFactoryInterceptor

public void setSessionFactoryInterceptor(String sessionFactoryInterceptor)
Description copied from interface: HibernateMBean
The name of an Interceptor impl class to be attached to the managed SessionFactory.

Specified by:
setSessionFactoryInterceptor in interface HibernateMBean

getListenerInjector

public String getListenerInjector()
Description copied from interface: HibernateMBean
The ListenerInjector implementor class to use.

Specified by:
getListenerInjector in interface HibernateMBean
Returns:

setListenerInjector

public void setListenerInjector(String listenerInjector)
Description copied from interface: HibernateMBean
The ListenerInjector implementor class to use.

Specified by:
setListenerInjector in interface HibernateMBean

getDeployedTreeCacheObjectName

public javax.management.ObjectName getDeployedTreeCacheObjectName()
Description copied from interface: HibernateMBean
The JMX name of a TreeCache MBean to be used as the second level cache.

Note : only used when HibernateMBean.getCacheProviderClass() == DeployedTreeCacheProvider

Specified by:
getDeployedTreeCacheObjectName in interface HibernateMBean
Returns:
The current setting

setDeployedTreeCacheObjectName

public void setDeployedTreeCacheObjectName(javax.management.ObjectName deployedTreeCacheObjectName)
Description copied from interface: HibernateMBean
The JMX name of a TreeCache MBean to be used as the second level cache.

Specified by:
setDeployedTreeCacheObjectName in interface HibernateMBean
Parameters:
deployedTreeCacheObjectName - The new mbean object name.

getBatchVersionedDataEnabled

public Boolean getBatchVersionedDataEnabled()
Description copied from interface: HibernateMBean
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.

Specified by:
getBatchVersionedDataEnabled in interface HibernateMBean
Returns:
The current setting value
See Also:
Environment.BATCH_VERSIONED_DATA

setBatchVersionedDataEnabled

public void setBatchVersionedDataEnabled(Boolean batchVersionedDataEnabled)
Description copied from interface: HibernateMBean
Should Hibernate allow JDBC batch-updating of versioned entities?

Specified by:
setBatchVersionedDataEnabled in interface HibernateMBean

getStreamsForBinaryEnabled

public Boolean getStreamsForBinaryEnabled()
Description copied from interface: HibernateMBean
Should Hibernate use I/O streaming for handling binary/LOB data?

Specified by:
getStreamsForBinaryEnabled in interface HibernateMBean
Returns:
See Also:
Environment.USE_STREAMS_FOR_BINARY

setStreamsForBinaryEnabled

public void setStreamsForBinaryEnabled(Boolean streamsForBinaryEnabled)
Description copied from interface: HibernateMBean
Should Hibernate use I/O streaming for handling binary/LOB data?

Specified by:
setStreamsForBinaryEnabled in interface HibernateMBean

getReflectionOptimizationEnabled

public Boolean getReflectionOptimizationEnabled()
Description copied from interface: HibernateMBean
Should Hibernate use cglib-based reflection optimizations?

Note : this may or may not improve performance based on the JVM you are using.

Specified by:
getReflectionOptimizationEnabled in interface HibernateMBean
Returns:
See Also:
Environment.USE_REFLECTION_OPTIMIZER

setReflectionOptimizationEnabled

public void setReflectionOptimizationEnabled(Boolean reflectionOptimizationEnabled)
Description copied from interface: HibernateMBean
Should Hibernate use cglib-based reflection optimizations?

Specified by:
setReflectionOptimizationEnabled in interface HibernateMBean

getStatGenerationEnabled

public Boolean getStatGenerationEnabled()
Description copied from interface: HibernateMBean
Should generation and collection of Hibernate3 statistics be enabled?

Specified by:
getStatGenerationEnabled in interface HibernateMBean
Returns:
See Also:
Environment.GENERATE_STATISTICS

setStatGenerationEnabled

public void setStatGenerationEnabled(Boolean statGenerationEnabled)
Description copied from interface: HibernateMBean
Should generation and collection of Hibernate3 statistics be enabled?

Specified by:
setStatGenerationEnabled in interface HibernateMBean

isScanForMappingsEnabled

public boolean isScanForMappingsEnabled()
Description copied from interface: HibernateMBean
Enables scanning of the entire deployment classpath for any potential mapping sources (jars or directories).

Only used in the case of har deployments.

Specified by:
isScanForMappingsEnabled in interface HibernateMBean
Returns:

setScanForMappingsEnabled

public void setScanForMappingsEnabled(boolean scanForMappingsEnabled)
Description copied from interface: HibernateMBean
Enables scanning of the entire deployment classpath for any potential mapping sources (jars or directories).

Only used in the case of har deployments.

Specified by:
setScanForMappingsEnabled in interface HibernateMBean


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.