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

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


net.sf.hibernate.jmx
Interface HibernateServiceMBean

All Known Implementing Classes:
HibernateService

public interface HibernateServiceMBean

Hibernate JMX Management API

Author:
John Urberg
See Also:
HibernateService

Method Summary
 void addMapResource(String mapResource)
          Add a mapping file
 void createSchema()
          Export create DDL to the database
 void dropSchema()
          Export drop DDL to the database
 boolean getBatchUpdateVersionedEnabled()
          Are JDBC batch updates enabled for versioned entities?
 String getCacheProvider()
          Get the cache provider class
 String getCacheRegionPrefix()
          Get the second-level cache region prefix;
 String getDatasource()
          The JNDI name of the datasource to use in this SessionFactory
 String getDefaultSchema()
          Get the default schema name
 String getDialect()
          The JNDI name of the dialect class to use in this SessionFactory
 Boolean getGetGeneratedKeysEnabled()
          Is use of JDBC3 getGeneratedKeys() enabled?
 Integer getJdbcBatchSize()
          Get the JDBC batch size
 Integer getJdbcFetchSize()
          Get the JDBC fetch size
 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)
 Integer getMaximumFetchDepth()
          Get the max outer join fetch depth
 boolean getMinimalPutsEnabled()
          Is second-level cache optimized for minimal puts?
 String getPassword()
          Log into the database with this password
 String getProperty(String property)
          Get a property
 String getPropertyList()
          Display the properties
 boolean getQueryCacheEnabled()
          Is the query cache enabled?
 String getQuerySubstitutions()
          Get the query substitutions string
 Boolean getScrollableResultSetsEnabled()
          Is use of scrollable resultsets enabled?
 boolean getShowSql()
          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 setBatchUpdateVersioned(boolean enabled)
          Enabled/disable JDBC batch updates for versioned entities
 void setCacheProvider(String cacheProvider)
          Set the cache provider class
 void setCacheRegionPrefix(String cacheRegionPrefix)
          Set a prefix for all second-level cache regions.
 void setDatasource(String datasource)
          Set the JNDI name of the datasource to use in this SessionFactory
 void setDefaultSchema(String schema)
          Set the default schema name
 void setDialect(String dialect)
          The name of the dialect class to use in this SessionFactory
 void setGetGeneratedKeysEnabled(Boolean enabled)
          Enable/disable use of JDBC3 getGeneratedKeys()
 void setJdbcBatchSize(Integer depth)
          Set the JDBC batch size
 void setJdbcFetchSize(Integer depth)
          Set the JDBC fetch size
 void setJndiName(String jndiName)
          The JNDI name to bind to the SessionFactory
 void setMapResources(String mappingFiles)
          Specify the Hibernate mapping files
 void setMaximumFetchDepth(Integer depth)
          Set the max outer join fetch depth
 void setMinimalPutsEnabled(boolean enabled)
          Optimize 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(boolean enabled)
          Enable/disable the query cache
 void setQuerySubstitutions(String substitutions)
          Set the query substitutions string
 void setScrollableResultSetsEnabled(Boolean enabled)
          Enable/disable use of scrollable resultsets
 void setShowSql(boolean 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

setMaximumFetchDepth

public void setMaximumFetchDepth(Integer depth)
Set the max outer join fetch depth


getMaximumFetchDepth

public Integer getMaximumFetchDepth()
Get the max outer join fetch depth


setJdbcFetchSize

public void setJdbcFetchSize(Integer depth)
Set the JDBC fetch size


getJdbcFetchSize

public Integer getJdbcFetchSize()
Get the JDBC fetch size


setJdbcBatchSize

public void setJdbcBatchSize(Integer depth)
Set the JDBC batch size


getJdbcBatchSize

public Integer getJdbcBatchSize()
Get the JDBC batch size


setCacheProvider

public void setCacheProvider(String cacheProvider)
Set the cache provider class


getCacheProvider

public String getCacheProvider()
Get the cache provider class


setQuerySubstitutions

public void setQuerySubstitutions(String substitutions)
Set the query substitutions string


getQuerySubstitutions

public String getQuerySubstitutions()
Get the query substitutions string


setDefaultSchema

public void setDefaultSchema(String schema)
Set the default schema name


getDefaultSchema

public String getDefaultSchema()
Get the default schema name


setCacheRegionPrefix

public void setCacheRegionPrefix(String cacheRegionPrefix)
Set a prefix for all second-level cache regions.


getCacheRegionPrefix

public String getCacheRegionPrefix()
Get the second-level cache region prefix;


getShowSql

public boolean getShowSql()
Is SQL logging enabled?


setShowSql

public void setShowSql(boolean showSql)
Enable logging of SQL to console


getQueryCacheEnabled

public boolean getQueryCacheEnabled()
Is the query cache enabled?


setQueryCacheEnabled

public void setQueryCacheEnabled(boolean enabled)
Enable/disable the query cache


getScrollableResultSetsEnabled

public Boolean getScrollableResultSetsEnabled()
Is use of scrollable resultsets enabled?


setScrollableResultSetsEnabled

public void setScrollableResultSetsEnabled(Boolean enabled)
Enable/disable use of scrollable resultsets


getGetGeneratedKeysEnabled

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


setGetGeneratedKeysEnabled

public void setGetGeneratedKeysEnabled(Boolean enabled)
Enable/disable use of JDBC3 getGeneratedKeys()


getMinimalPutsEnabled

public boolean getMinimalPutsEnabled()
Is second-level cache optimized for minimal puts?


setMinimalPutsEnabled

public void setMinimalPutsEnabled(boolean enabled)
Optimize second-level cache for minimal puts


getBatchUpdateVersionedEnabled

public boolean getBatchUpdateVersionedEnabled()
Are JDBC batch updates enabled for versioned entities?


setBatchUpdateVersioned

public void setBatchUpdateVersioned(boolean enabled)
Enabled/disable JDBC batch updates for versioned entities


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


createSchema

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

Throws:
HibernateException

dropSchema

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

Throws:
HibernateException