Package org.hibernate.jmx
Interface HibernateServiceMBean
- All Known Implementing Classes:
HibernateService
public interface HibernateServiceMBean
Hibernate JMX Management API
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddMapResource(String mapResource) Add a mapping filevoidExport the CREATE DDL to the databasevoidExport the DROP DDL to the databaseIs automatic Session closing enabled?Is JDBC batch update for versioned entities enabled?Get the second-level cache provider class nameFor cache providers which support this setting, get the provider's specific configuration resource.Get the cache region prefixAre SQL comments enabled?The JNDI name of the datasource to use in this SessionFactoryGet the default catalogGet the default schemaThe JNDI name of the dialect class to use in this SessionFactoryIs automatic Session flusing enabled?Is use of JDBC3 getGeneratedKeys() enabled?Get the maximum JDBC batch sizeGet the JDBC fetch sizeIs use of scrollable resultsets enabled?The JNDI name to bind to the SessionFactoryThe Hibernate mapping files (might be overridden by subclasses that want to specify the mapping files by some other mechanism)Get the maximum outer join fetch depthIs the second-level cache optimized for miminal puts?Log into the database with this passwordgetProperty(String property) Get a propertyDisplay the propertiesIs the query cache enabled?Get the query language substitutionsIs the second-level cache enabled?Is SQL logging enabled?Get the strategy for obtaining the JTA TransactionManagerThe fully qualified class name of the Hibernate TransactionFactory implementationLog into the database with this nameThe JNDI name of the JTA UserTransaction object (used only be JTATransaction).voidsetAutoCloseSessionEnabled(String enabled) Enable automatic closing of Session when JTA transaction ends.voidsetBatchVersionedDataEnabled(String enabled) Enable or disable the use of batch updates for versioned entitiesvoidsetCacheProviderClass(String providerClassName) Set the second-level cache provider class namevoidsetCacheProviderConfig(String cacheProviderConfig) For cache providers which support this setting, specify the provider's specific configuration resource.voidsetCacheRegionPrefix(String prefix) Set the cache region prefixvoidsetCommentsEnabled(String enabled) Enable or disable the inclusion of comments in generated SQLvoidsetDatasource(String datasource) Set the JNDI name of the datasource to use in this SessionFactoryvoidsetDefaultCatalog(String catalog) Set the default catalogvoidsetDefaultSchema(String schema) Set the default schemavoidsetDialect(String dialect) The name of the dialect class to use in this SessionFactoryvoidsetFlushBeforeCompletionEnabled(String enabled) Enable automatic flushing of the Session when JTA transaction ends.voidsetGetGeneratedKeysEnabled(String enabled) Enable or disable the use getGeneratedKeys()voidsetJdbcBatchSize(String batchSize) Set the maximum JDBC batch sizevoidsetJdbcFetchSize(String fetchSize) Set the JDBC fetch sizevoidsetJdbcScrollableResultSetEnabled(String enabled) Enable or disable the use of scrollable resultsetsvoidsetJndiName(String jndiName) The JNDI name to bind to the SessionFactoryvoidsetMapResources(String mappingFiles) Specify the Hibernate mapping filesvoidsetMaximumFetchDepth(String fetchDepth) Set the maximum outer join fetch depthvoidsetMinimalPutsEnabled(String enabled) Enable or disable optimization of second-level cache for minimal putsvoidsetPassword(String password) Log into the database with this passwordvoidsetProperty(String property, String value) Set a propertyvoidsetQueryCacheEnabled(String enabled) Enable or disable the query cachevoidsetQuerySubstitutions(String querySubstitutions) Set the query language substitutionsvoidsetSecondLevelCacheEnabled(String enabled) Enable or disable the second-level cachevoidsetShowSqlEnabled(String showSql) Enable logging of SQL to consolevoidsetTransactionManagerLookupStrategy(String lkpStrategy) Set the strategy for obtaining the JTA TransactionManagervoidsetTransactionStrategy(String txnStrategy) Set the fully qualified class name of the Hibernate TransactionFactory implementationvoidsetUserName(String userName) Log into the database with this namevoidsetUserTransactionName(String utName) Set the JNDI name of the JTA UserTransaction object (used only by JTATransaction).voidstart()Create the SessionFactory and bind to the jndi name on startupvoidstop()Unbind the SessionFactory or stub from JNDI
-
Method Details
-
getMapResources
String getMapResources()The Hibernate mapping files (might be overridden by subclasses that want to specify the mapping files by some other mechanism)- Returns:
- String
-
setMapResources
Specify the Hibernate mapping files- Parameters:
mappingFiles-
-
addMapResource
Add a mapping file- Parameters:
mapResource-
-
setProperty
Set a property- Parameters:
property- the property namevalue- the property value
-
getProperty
Get a property- Parameters:
property- the property name- Returns:
- the property value
-
getPropertyList
String getPropertyList()Display the properties- Returns:
- a list of property names and values
-
getDatasource
String getDatasource()The JNDI name of the datasource to use in this SessionFactory- Returns:
- String
-
setDatasource
Set the JNDI name of the datasource to use in this SessionFactory- Parameters:
datasource-
-
getUserName
String getUserName()Log into the database with this name- Returns:
- String
-
setUserName
Log into the database with this name- Parameters:
userName-
-
getPassword
String getPassword()Log into the database with this password- Returns:
- String
-
setPassword
Log into the database with this password- Parameters:
password-
-
getDialect
String getDialect()The JNDI name of the dialect class to use in this SessionFactory- Returns:
- String
-
setDialect
The name of the dialect class to use in this SessionFactory- Parameters:
dialect- fully qualified class name of Dialect subclass- See Also:
-
getJndiName
String getJndiName()The JNDI name to bind to the SessionFactory- Returns:
- String
-
setJndiName
The JNDI name to bind to the SessionFactory- Parameters:
jndiName-
-
getTransactionStrategy
String getTransactionStrategy()The fully qualified class name of the Hibernate TransactionFactory implementation- Returns:
- the class name
- See Also:
-
setTransactionStrategy
Set the fully qualified class name of the Hibernate TransactionFactory implementation- Parameters:
txnStrategy- the class name- See Also:
-
getUserTransactionName
String getUserTransactionName()The JNDI name of the JTA UserTransaction object (used only be JTATransaction).- Returns:
- the JNDI name
- See Also:
-
setUserTransactionName
Set the JNDI name of the JTA UserTransaction object (used only by JTATransaction).- Parameters:
utName- the JNDI name- See Also:
-
getTransactionManagerLookupStrategy
String getTransactionManagerLookupStrategy()Get the strategy for obtaining the JTA TransactionManager- Returns:
- the class name
- See Also:
-
setTransactionManagerLookupStrategy
Set the strategy for obtaining the JTA TransactionManager- Parameters:
lkpStrategy- the class name- See Also:
-
getShowSqlEnabled
String getShowSqlEnabled()Is SQL logging enabled? -
setShowSqlEnabled
Enable logging of SQL to console -
getMaximumFetchDepth
String getMaximumFetchDepth()Get the maximum outer join fetch depth -
setMaximumFetchDepth
Set the maximum outer join fetch depth -
getJdbcBatchSize
String getJdbcBatchSize()Get the maximum JDBC batch size -
setJdbcBatchSize
Set the maximum JDBC batch size -
getJdbcFetchSize
String getJdbcFetchSize()Get the JDBC fetch size -
setJdbcFetchSize
Set the JDBC fetch size -
getQuerySubstitutions
String getQuerySubstitutions()Get the query language substitutions -
setQuerySubstitutions
Set the query language substitutions -
getDefaultSchema
String getDefaultSchema()Get the default schema -
setDefaultSchema
Set the default schema -
getDefaultCatalog
String getDefaultCatalog()Get the default catalog -
setDefaultCatalog
Set the default catalog -
getJdbcScrollableResultSetEnabled
String getJdbcScrollableResultSetEnabled()Is use of scrollable resultsets enabled? -
setJdbcScrollableResultSetEnabled
Enable or disable the use of scrollable resultsets -
getGetGeneratedKeysEnabled
String getGetGeneratedKeysEnabled()Is use of JDBC3 getGeneratedKeys() enabled? -
setGetGeneratedKeysEnabled
Enable or disable the use getGeneratedKeys() -
getCacheProviderClass
String getCacheProviderClass()Get the second-level cache provider class name -
setCacheProviderClass
Set the second-level cache provider class name -
getCacheProviderConfig
String getCacheProviderConfig()For cache providers which support this setting, get the provider's specific configuration resource. -
setCacheProviderConfig
For cache providers which support this setting, specify the provider's specific configuration resource. -
getQueryCacheEnabled
String getQueryCacheEnabled()Is the query cache enabled? -
setQueryCacheEnabled
Enable or disable the query cache -
getSecondLevelCacheEnabled
String getSecondLevelCacheEnabled()Is the second-level cache enabled? -
setSecondLevelCacheEnabled
Enable or disable the second-level cache -
getCacheRegionPrefix
String getCacheRegionPrefix()Get the cache region prefix -
setCacheRegionPrefix
Set the cache region prefix -
getMinimalPutsEnabled
String getMinimalPutsEnabled()Is the second-level cache optimized for miminal puts? -
setMinimalPutsEnabled
Enable or disable optimization of second-level cache for minimal puts -
getCommentsEnabled
String getCommentsEnabled()Are SQL comments enabled? -
setCommentsEnabled
Enable or disable the inclusion of comments in generated SQL -
getBatchVersionedDataEnabled
String getBatchVersionedDataEnabled()Is JDBC batch update for versioned entities enabled? -
setBatchVersionedDataEnabled
Enable or disable the use of batch updates for versioned entities -
setFlushBeforeCompletionEnabled
Enable automatic flushing of the Session when JTA transaction ends. -
getFlushBeforeCompletionEnabled
String getFlushBeforeCompletionEnabled()Is automatic Session flusing enabled? -
setAutoCloseSessionEnabled
Enable automatic closing of Session when JTA transaction ends. -
getAutoCloseSessionEnabled
String getAutoCloseSessionEnabled()Is automatic Session closing enabled? -
createSchema
Export the CREATE DDL to the database- Throws:
HibernateException
-
dropSchema
Export the DROP DDL to the database- Throws:
HibernateException
-
start
Create the SessionFactory and bind to the jndi name on startup- Throws:
HibernateException
-
stop
void stop()Unbind the SessionFactory or stub from JNDI
-