|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HibernateMBean
Describes a Hibernate service MBean. Configures a
SessionFactory
instance and exposes it through JNDI.
The SessionFactory is built through either
Field Summary |
---|
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 |
Method Summary | |
---|---|
void |
createSchema()
Export the CREATE DDL to the database |
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 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 scanForMappings)
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 structuredEntriesEnabled)
Should Hibernate use structured cache entries when putting stuff into the second level cache? |
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 |
Method Detail |
---|
URL getHarUrl()
boolean isScanForMappingsEnabled()
void setScanForMappingsEnabled(boolean scanForMappings)
scanForMappings
- String getSessionFactoryName()
SessionFactory
is to be bound.
void setSessionFactoryName(String sessionFactoryName)
SessionFactory
is to be bound.
sessionFactoryName
- The new JNDI namespace to use.javax.management.ObjectName getDeployedTreeCacheObjectName()
TreeCache
MBean to be used as the second level cache.
Note : only used when getCacheProviderClass()
== DeployedTreeCacheProvider
void setDeployedTreeCacheObjectName(javax.management.ObjectName deployedTreeCacheObjectName)
TreeCache
MBean to be used as the second level cache.
deployedTreeCacheObjectName
- The new mbean object name.javax.management.ObjectName getStatisticsServiceName()
String getDialect()
Environment.DIALECT
void setDialect(String dialect)
dialect
- The new dialect class name to use.String getHbm2ddlAuto()
Environment.HBM2DDL_AUTO
void setHbm2ddlAuto(String hbm2ddlAuto)
hbm2ddlAuto
- The new hbm2ddl setting; valid values are: update, create, create-dropString getDatasourceName()
DataSource
which should be used by the managed SessionFactory
.
Environment.DATASOURCE
void setDatasourceName(String datasourceName)
DataSource
which should be used by the managed SessionFactory
.
datasourceName
- The new DataSource JNDI name to use.String getUsername()
Environment.USER
void setUsername(String username)
username
- The new username value.void setPassword(String password)
password
- The new password value.Boolean getSqlCommentsEnabled()
Environment.USE_SQL_COMMENTS
void setSqlCommentsEnabled(Boolean commentsEnabled)
commentsEnabled
- String getDefaultSchema()
getDefaultCatalog()
,
Environment.DEFAULT_SCHEMA
void setDefaultSchema(String defaultSchema)
defaultSchema
- The new default schema name to use.String getDefaultCatalog()
getDefaultSchema()
,
Environment.DEFAULT_CATALOG
void setDefaultCatalog(String defaultCatalog)
defaultCatalog
- The new default catalog name.Integer getMaxFetchDepth()
Environment.MAX_FETCH_DEPTH
void setMaxFetchDepth(Integer maxFetchDepth)
maxFetchDepth
- The new max fetch depth valueInteger getJdbcBatchSize()
Environment.STATEMENT_BATCH_SIZE
void setJdbcBatchSize(Integer jdbcBatchSize)
jdbcBatchSize
- The new value for the number of statements to batch together.Integer getJdbcFetchSize()
Environment.STATEMENT_FETCH_SIZE
void setJdbcFetchSize(Integer jdbcFetchSize)
jdbcFetchSize
- The new value for the number of rows to fetch from server at a time.Boolean getJdbcScrollableResultSetEnabled()
Environment.USE_SCROLLABLE_RESULTSET
void setJdbcScrollableResultSetEnabled(Boolean jdbcScrollableResultSetEnabled)
jdbcScrollableResultSetEnabled
- The new value.Boolean getGetGeneratedKeysEnabled()
Environment.USE_GET_GENERATED_KEYS
void setGetGeneratedKeysEnabled(Boolean getGeneratedKeysEnabled)
getGeneratedKeysEnabled
- The new value.Boolean getBatchVersionedDataEnabled()
Environment.BATCH_VERSIONED_DATA
void setBatchVersionedDataEnabled(Boolean batchVersionedDataEnabled)
batchVersionedDataEnabled
- Boolean getStreamsForBinaryEnabled()
Environment.USE_STREAMS_FOR_BINARY
void setStreamsForBinaryEnabled(Boolean streamsForBinaryEnabled)
streamsForBinaryEnabled
- String getQuerySubstitutions()
Environment.QUERY_SUBSTITUTIONS
void setQuerySubstitutions(String querySubstitutions)
querySubstitutions
- The new query substitutions to useString getCacheProviderClass()
CacheProvider
implementation class to use for second level caching.
Environment.CACHE_PROVIDER
void setCacheProviderClass(String cacheProviderClass)
CacheProvider
implementation class to use for second level caching.
cacheProviderClass
- The new provider impl class name.String getCacheRegionPrefix()
Environment.CACHE_NAMESPACE
void setCacheRegionPrefix(String cacheRegionPrefix)
cacheRegionPrefix
- The new prefix value.Boolean getMinimalPutsEnabled()
Environment.USE_MINIMAL_PUTS
void setMinimalPutsEnabled(Boolean minimalPutsEnabled)
minimalPutsEnabled
- Boolean getUseStructuredCacheEntriesEnabled()
Environment.USE_STRUCTURED_CACHE
void setUseStructuredCacheEntriesEnabled(Boolean structuredEntriesEnabled)
structuredEntriesEnabled
- Boolean getSecondLevelCacheEnabled()
void setSecondLevelCacheEnabled(Boolean secondLevelCacheEnabled)
Boolean getQueryCacheEnabled()
Environment.USE_QUERY_CACHE
void setQueryCacheEnabled(Boolean queryCacheEnabled)
queryCacheEnabled
- The new value of whether or not to enable.Boolean getShowSqlEnabled()
Environment.SHOW_SQL
void setShowSqlEnabled(Boolean showSqlEnabled)
showSqlEnabled
- Boolean getReflectionOptimizationEnabled()
Environment.USE_REFLECTION_OPTIMIZER
void setReflectionOptimizationEnabled(Boolean reflectionOptimizationEnabled)
reflectionOptimizationEnabled
- Boolean getStatGenerationEnabled()
Environment.GENERATE_STATISTICS
void setStatGenerationEnabled(Boolean statGenerationEnabled)
statGenerationEnabled
- String getSessionFactoryInterceptor()
Interceptor
impl class to be attached to the managed SessionFactory
.
void setSessionFactoryInterceptor(String sessionFactoryInterceptor)
Interceptor
impl class to be attached to the managed SessionFactory
.
sessionFactoryInterceptor
- String getListenerInjector()
ListenerInjector
implementor class to use.
void setListenerInjector(String listenerInjector)
ListenerInjector
implementor class to use.
listenerInjector
- boolean isDirty()
SessionFactory
?
Note : the only way to propogate these changes to the SF is by calling the rebuildSessionFactory()
managed
operation.
boolean isSessionFactoryRunning()
SessionFactory
?
String getVersion()
SessionFactory
.
org.hibernate.SessionFactory getInstance()
Date getRunningSince()
SessionFactory
has been running.
SessionFactory
was started.void createSchema() throws Exception
Exception
void dropSchema() throws Exception
Exception
void rebuildSessionFactory() throws Exception
SessionFactory
such that any setting changes
made can take effect.
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |