站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 3.2.3 正式版 API 英文文档

HibernateServiceMBean (Hibernate API Documentation) - Hibernate 3.2.3 正式版 API 英文文档


org.hibernate.jmx
Interface HibernateServiceMBean

All Known Implementing Classes:
HibernateService

public interface HibernateServiceMBean

Hibernate JMX Management API

Author:
John Urberg, Gavin King
See Also:
HibernateService

Method Summary
 void addMapResource(String mapResource)
          Add a mapping file
 void createSchema()
          Export the CREATE DDL to the database
 void dropSchema()
          Export the DROP DDL to the database
 String getAutoCloseSessionEnabled()
          Is automatic Session closing enabled?
 String getBatchVersionedDataEnabled()
          Is JDBC batch update for versioned entities enabled?
 String getCacheProviderClass()
          Get the second-level cache provider class name
 String getCacheProviderConfig()
          For cache providers which support this setting, get the provider's specific configuration resource.
 String getCacheRegionPrefix()
          Get the cache region prefix
 String getCommentsEnabled()
          Are SQL comments enabled?
 String getDatasource()
          The JNDI name of the datasource to use in this SessionFactory
 String getDefaultCatalog()
          Get the default catalog
 String getDefaultSchema()
          Get the default schema
 String getDialect()
          The JNDI name of the dialect class to use in this SessionFactory
 String getFlushBeforeCompletionEnabled()
          Is automatic Session flusing enabled?
 String getGetGeneratedKeysEnabled()
          Is use of JDBC3 getGeneratedKeys() enabled?
 String getJdbcBatchSize()
          Get the maximum JDBC batch size
 String getJdbcFetchSize()
          Get the JDBC fetch size
 String getJdbcScrollableResultSetEnabled()
          Is use of scrollable resultsets enabled?
 String getJndiName()
          The JNDI name to bind to the SessionFactory
 String getMapResources()
          The Hibernate mapping files (might be overridden by subclasses that want to specify the mapping files by some other mechanism)
 String getMaximumFetchDepth()
          Get the maximum outer join fetch depth
 String getMinimalPutsEnabled()
          Is the second-level cache optimized for miminal puts?
 String getPassword()
          Log into the database with this password
 String getProperty(String property)
          Get a property
 String getPropertyList()
          Display the properties
 String getQueryCacheEnabled()
          Is the query cache enabled?
 String getQuerySubstitutions()
          Get the query language substitutions
 String getSecondLevelCacheEnabled()
          Is the second-level cache enabled?
 String getShowSqlEnabled()
          Is SQL logging enabled?
 String getTransactionManagerLookupStrategy()
          Get the strategy for obtaining the JTA TransactionManager
 String getTransactionStrategy()
          The fully qualified class name of the Hibernate TransactionFactory implementation
 String getUserName()
          Log into the database with this name
 String getUserTransactionName()
          The JNDI name of the JTA UserTransaction object (used only be JTATransaction).
 void setAutoCloseSessionEnabled(String enabled)
          Enable automatic closing of Session when JTA transaction ends.
 void setBatchVersionedDataEnabled(String enabled)
          Enable or disable the use of batch updates for versioned entities
 void setCacheProviderClass(String providerClassName)
          Set the second-level cache provider class name
 void setCacheProviderConfig(String cacheProviderConfig)
          For cache providers which support this setting, specify the provider's specific configuration resource.
 void setCacheRegionPrefix(String prefix)
          Set the cache region prefix
 void setCommentsEnabled(String enabled)
          Enable or disable the inclusion of comments in generated SQL
 void setDatasource(String datasource)
          Set the JNDI name of the datasource to use in this SessionFactory
 void setDefaultCatalog(String catalog)
          Set the default catalog
 void setDefaultSchema(String schema)
          Set the default schema
 void setDialect(String dialect)
          The name of the dialect class to use in this SessionFactory
 void setFlushBeforeCompletionEnabled(String enabled)
          Enable automatic flushing of the Session when JTA transaction ends.
 void setGetGeneratedKeysEnabled(String enabled)
          Enable or disable the use getGeneratedKeys()
 void setJdbcBatchSize(String batchSize)
          Set the maximum JDBC batch size
 void setJdbcFetchSize(String fetchSize)
          Set the JDBC fetch size
 void setJdbcScrollableResultSetEnabled(String enabled)
          Enable or disable the use of scrollable resultsets
 void setJndiName(String jndiName)
          The JNDI name to bind to the SessionFactory
 void setMapResources(String mappingFiles)
          Specify the Hibernate mapping files
 void setMaximumFetchDepth(String fetchDepth)
          Set the maximum outer join fetch depth
 void setMinimalPutsEnabled(String enabled)
          Enable or disable optimization of second-level cache for minimal puts
 void setPassword(String password)
          Log into the database with this password
 void setProperty(String property, String value)
          Set a property
 void setQueryCacheEnabled(String enabled)
          Enable or disable the query cache
 void setQuerySubstitutions(String querySubstitutions)
          Set the query language substitutions
 void setSecondLevelCacheEnabled(String enabled)
          Enable or disable the second-level cache
 void setShowSqlEnabled(String showSql)
          Enable logging of SQL to console
 void setTransactionManagerLookupStrategy(String lkpStrategy)
          Set the strategy for obtaining the JTA TransactionManager
 void setTransactionStrategy(String txnStrategy)
          Set the fully qualified class name of the Hibernate TransactionFactory implementation
 void setUserName(String userName)
          Log into the database with this name
 void setUserTransactionName(String utName)
          Set the JNDI name of the JTA UserTransaction object (used only by JTATransaction).
 void start()
          Create the SessionFactory and bind to the jndi name on startup
 void stop()
          Unbind the SessionFactory or stub from JNDI
 

Method Detail

getMapResources

public 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

public void setMapResources(String mappingFiles)
Specify the Hibernate mapping files

Parameters:
mappingFiles -

addMapResource

public void addMapResource(String mapResource)
Add a mapping file

Parameters:
mapResource -

setProperty

public void setProperty(String property,
                        String value)
Set a property

Parameters:
property - the property name
value - the property value

getProperty

public String getProperty(String property)
Get a property

Parameters:
property - the property name
Returns:
the property value

getPropertyList

public String getPropertyList()
Display the properties

Returns:
a list of property names and values

getDatasource

public String getDatasource()
The JNDI name of the datasource to use in this SessionFactory

Returns:
String

setDatasource

public void setDatasource(String datasource)
Set the JNDI name of the datasource to use in this SessionFactory

Parameters:
datasource -

getUserName

public String getUserName()
Log into the database with this name

Returns:
String

setUserName

public void setUserName(String userName)
Log into the database with this name

Parameters:
userName -

getPassword

public String getPassword()
Log into the database with this password

Returns:
String

setPassword

public void setPassword(String password)
Log into the database with this password

Parameters:
password -

getDialect

public String getDialect()
The JNDI name of the dialect class to use in this SessionFactory

Returns:
String

setDialect

public void setDialect(String dialect)
The name of the dialect class to use in this SessionFactory

Parameters:
dialect - fully qualified class name of Dialect subclass
See Also:
Dialect

getJndiName

public String getJndiName()
The JNDI name to bind to the SessionFactory

Returns:
String

setJndiName

public void setJndiName(String jndiName)
The JNDI name to bind to the SessionFactory

Parameters:
jndiName -

getTransactionStrategy

public String getTransactionStrategy()
The fully qualified class name of the Hibernate TransactionFactory implementation

Returns:
the class name
See Also:
TransactionFactory

setTransactionStrategy

public void setTransactionStrategy(String txnStrategy)
Set the fully qualified class name of the Hibernate TransactionFactory implementation

Parameters:
txnStrategy - the class name
See Also:
TransactionFactory

getUserTransactionName

public String getUserTransactionName()
The JNDI name of the JTA UserTransaction object (used only be JTATransaction).

Returns:
the JNDI name
See Also:
JTATransaction

setUserTransactionName

public void setUserTransactionName(String utName)
Set the JNDI name of the JTA UserTransaction object (used only by JTATransaction).

Parameters:
utName - the JNDI name
See Also:
JTATransaction

getTransactionManagerLookupStrategy

public String getTransactionManagerLookupStrategy()
Get the strategy for obtaining the JTA TransactionManager

Returns:
the class name
See Also:
TransactionManagerLookup

setTransactionManagerLookupStrategy

public void setTransactionManagerLookupStrategy(String lkpStrategy)
Set the strategy for obtaining the JTA TransactionManager

Parameters:
lkpStrategy - the class name
See Also:
TransactionManagerLookup

getShowSqlEnabled

public String getShowSqlEnabled()
Is SQL logging enabled?


setShowSqlEnabled

public void setShowSqlEnabled(String showSql)
Enable logging of SQL to console


getMaximumFetchDepth

public String getMaximumFetchDepth()
Get the maximum outer join fetch depth


setMaximumFetchDepth

public void setMaximumFetchDepth(String fetchDepth)
Set the maximum outer join fetch depth


getJdbcBatchSize

public String getJdbcBatchSize()
Get the maximum JDBC batch size


setJdbcBatchSize

public void setJdbcBatchSize(String batchSize)
Set the maximum JDBC batch size


getJdbcFetchSize

public String getJdbcFetchSize()
Get the JDBC fetch size


setJdbcFetchSize

public void setJdbcFetchSize(String fetchSize)
Set the JDBC fetch size


getQuerySubstitutions

public String getQuerySubstitutions()
Get the query language substitutions


setQuerySubstitutions

public void setQuerySubstitutions(String querySubstitutions)
Set the query language substitutions


getDefaultSchema

public String getDefaultSchema()
Get the default schema


setDefaultSchema

public void setDefaultSchema(String schema)
Set the default schema


getDefaultCatalog

public String getDefaultCatalog()
Get the default catalog


setDefaultCatalog

public void setDefaultCatalog(String catalog)
Set the default catalog


getJdbcScrollableResultSetEnabled

public String getJdbcScrollableResultSetEnabled()
Is use of scrollable resultsets enabled?


setJdbcScrollableResultSetEnabled

public void setJdbcScrollableResultSetEnabled(String enabled)
Enable or disable the use of scrollable resultsets


getGetGeneratedKeysEnabled

public String getGetGeneratedKeysEnabled()
Is use of JDBC3 getGeneratedKeys() enabled?


setGetGeneratedKeysEnabled

public void setGetGeneratedKeysEnabled(String enabled)
Enable or disable the use getGeneratedKeys()


getCacheProviderClass

public String getCacheProviderClass()
Get the second-level cache provider class name


setCacheProviderClass

public void setCacheProviderClass(String providerClassName)
Set the second-level cache provider class name


getCacheProviderConfig

public String getCacheProviderConfig()
For cache providers which support this setting, get the provider's specific configuration resource.


setCacheProviderConfig

public void setCacheProviderConfig(String cacheProviderConfig)
For cache providers which support this setting, specify the provider's specific configuration resource.


getQueryCacheEnabled

public String getQueryCacheEnabled()
Is the query cache enabled?


setQueryCacheEnabled

public void setQueryCacheEnabled(String enabled)
Enable or disable the query cache


getSecondLevelCacheEnabled

public String getSecondLevelCacheEnabled()
Is the second-level cache enabled?


setSecondLevelCacheEnabled

public void setSecondLevelCacheEnabled(String enabled)
Enable or disable the second-level cache


getCacheRegionPrefix

public String getCacheRegionPrefix()
Get the cache region prefix


setCacheRegionPrefix

public void setCacheRegionPrefix(String prefix)
Set the cache region prefix


getMinimalPutsEnabled

public String getMinimalPutsEnabled()
Is the second-level cache optimized for miminal puts?


setMinimalPutsEnabled

public void setMinimalPutsEnabled(String enabled)
Enable or disable optimization of second-level cache for minimal puts


getCommentsEnabled

public String getCommentsEnabled()
Are SQL comments enabled?


setCommentsEnabled

public void setCommentsEnabled(String enabled)
Enable or disable the inclusion of comments in generated SQL


getBatchVersionedDataEnabled

public String getBatchVersionedDataEnabled()
Is JDBC batch update for versioned entities enabled?


setBatchVersionedDataEnabled

public void setBatchVersionedDataEnabled(String enabled)
Enable or disable the use of batch updates for versioned entities


setFlushBeforeCompletionEnabled

public void setFlushBeforeCompletionEnabled(String enabled)
Enable automatic flushing of the Session when JTA transaction ends.


getFlushBeforeCompletionEnabled

public String getFlushBeforeCompletionEnabled()
Is automatic Session flusing enabled?


setAutoCloseSessionEnabled

public void setAutoCloseSessionEnabled(String enabled)
Enable automatic closing of Session when JTA transaction ends.


getAutoCloseSessionEnabled

public String getAutoCloseSessionEnabled()
Is automatic Session closing enabled?


createSchema

public void createSchema()
                  throws HibernateException
Export the CREATE DDL to the database

Throws:
HibernateException

dropSchema

public void dropSchema()
                throws HibernateException
Export the DROP DDL to the database

Throws:
HibernateException

start

public void start()
           throws HibernateException
Create the SessionFactory and bind to the jndi name on startup

Throws:
HibernateException

stop

public void stop()
Unbind the SessionFactory or stub from JNDI