Top Description Methods
org.hibernate.jmx

public Interface HibernateServiceMBean

Known Direct Implementers
org.hibernate.jmx.HibernateService
Imports
org.hibernate.HibernateException

Hibernate JMX Management API
Author
John Urberg, Gavin King
See Also
HibernateService

Method Summary

Modifier and TypeMethod and Description
public void
addMapResource(String mapResource)

Add a mapping file

public void
createSchema()

Export the CREATE DDL to the database

public void
dropSchema()

Export the DROP DDL to the database

public String
getAutoCloseSessionEnabled()

Is automatic Session closing enabled?

public String
getBatchVersionedDataEnabled()

Is JDBC batch update for versioned entities enabled?

public String
getCacheProviderClass()

Get the second-level cache provider class name

public String
getCacheProviderConfig()

For cache providers which support this setting, get the provider's specific configuration resource.

public String
getCacheRegionPrefix()

Get the cache region prefix

public String
getCommentsEnabled()

Are SQL comments enabled?

public String

Returns:

String
getDatasource
()

The JNDI name of the datasource to use in this SessionFactory

public String
getDefaultCatalog()

Get the default catalog

public String
getDefaultSchema()

Get the default schema

public String

Returns:

String
getDialect
()

The JNDI name of the dialect class to use in this SessionFactory

public String
getFlushBeforeCompletionEnabled()

Is automatic Session flusing enabled?

public String
getGetGeneratedKeysEnabled()

Is use of JDBC3 getGeneratedKeys() enabled?

public String
getJdbcBatchSize()

Get the maximum JDBC batch size

public String
getJdbcFetchSize()

Get the JDBC fetch size

public String
getJdbcScrollableResultSetEnabled()

Is use of scrollable resultsets enabled?

public String

Returns:

String
getJndiName
()

The JNDI name to bind to the SessionFactory

public String

Returns:

String
getMapResources
()

The Hibernate mapping files (might be overridden by subclasses that want to specify the mapping files by some other mechanism)

public String
getMaximumFetchDepth()

Get the maximum outer join fetch depth

public String
getMinimalPutsEnabled()

Is the second-level cache optimized for miminal puts?

public String

Returns:

String
getPassword
()

Log into the database with this password

public String

Returns:

the property value
getProperty
(String
the property name
property
)

Get a property

public String

Returns:

a list of property names and values
getPropertyList
()

Display the properties

public String
getQueryCacheEnabled()

Is the query cache enabled?

public String
getQuerySubstitutions()

Get the query language substitutions

public String
getSecondLevelCacheEnabled()

Is the second-level cache enabled?

public String
getShowSqlEnabled()

Is SQL logging enabled?

public String

Returns:

the class name
getTransactionManagerLookupStrategy
()

Get the strategy for obtaining the JTA TransactionManager

public String

Returns:

the class name
getTransactionStrategy
()

The fully qualified class name of the Hibernate TransactionFactory implementation

public String

Returns:

String
getUserName
()

Log into the database with this name

public String

Returns:

the JNDI name
getUserTransactionName
()

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

public void
setAutoCloseSessionEnabled(String enabled)

Enable automatic closing of Session when JTA transaction ends.

public void
setBatchVersionedDataEnabled(String enabled)

Enable or disable the use of batch updates for versioned entities

public void
setCacheProviderClass(String providerClassName)

Set the second-level cache provider class name

public void
setCacheProviderConfig(String cacheProviderConfig)

For cache providers which support this setting, specify the provider's specific configuration resource.

public void
setCacheRegionPrefix(String prefix)

Set the cache region prefix

public void
setCommentsEnabled(String enabled)

Enable or disable the inclusion of comments in generated SQL

public void
setDatasource(String datasource)

Set the JNDI name of the datasource to use in this SessionFactory

public void
setDefaultCatalog(String catalog)

Set the default catalog

public void
setDefaultSchema(String schema)

Set the default schema

public void
setDialect(String
fully qualified class name of Dialect subclass
dialect
)

The name of the dialect class to use in this SessionFactory

public void
setFlushBeforeCompletionEnabled(String enabled)

Enable automatic flushing of the Session when JTA transaction ends.

public void
setGetGeneratedKeysEnabled(String enabled)

Enable or disable the use getGeneratedKeys()

public void
setJdbcBatchSize(String batchSize)

Set the maximum JDBC batch size

public void
setJdbcFetchSize(String fetchSize)

Set the JDBC fetch size

public void
setJdbcScrollableResultSetEnabled(String enabled)

Enable or disable the use of scrollable resultsets

public void
setJndiName(String jndiName)

The JNDI name to bind to the SessionFactory

public void
setMapResources(String mappingFiles)

Specify the Hibernate mapping files

public void
setMaximumFetchDepth(String fetchDepth)

Set the maximum outer join fetch depth

public void
setMinimalPutsEnabled(String enabled)

Enable or disable optimization of second-level cache for minimal puts

public void
setPassword(String password)

Log into the database with this password

public void
setProperty(String
the property name
property
,
String
the property value
value
)

Set a property

public void
setQueryCacheEnabled(String enabled)

Enable or disable the query cache

public void
setQuerySubstitutions(String querySubstitutions)

Set the query language substitutions

public void
setSecondLevelCacheEnabled(String enabled)

Enable or disable the second-level cache

public void
setShowSqlEnabled(String showSql)

Enable logging of SQL to console

public void
setTransactionManagerLookupStrategy(String
the class name
lkpStrategy
)

Set the strategy for obtaining the JTA TransactionManager

public void
setTransactionStrategy(String
the class name
txnStrategy
)

Set the fully qualified class name of the Hibernate TransactionFactory implementation

public void
setUserName(String userName)

Log into the database with this name

public void
setUserTransactionName(String
the JNDI name
utName
)

Set the JNDI name of the JTA UserTransaction object (used only by JTATransaction).

public void
start()

Create the SessionFactory and bind to the jndi name on startup

public void
stop()

Unbind the SessionFactory or stub from JNDI

Method Detail

addMapResourceback to summary
public void addMapResource(String mapResource)

Add a mapping file

createSchemaback to summary
public void createSchema() throws HibernateException

Export the CREATE DDL to the database

dropSchemaback to summary
public void dropSchema() throws HibernateException

Export the DROP DDL to the database

getAutoCloseSessionEnabledback to summary
public String getAutoCloseSessionEnabled()

Is automatic Session closing enabled?

getBatchVersionedDataEnabledback to summary
public String getBatchVersionedDataEnabled()

Is JDBC batch update for versioned entities enabled?

getCacheProviderClassback to summary
public String getCacheProviderClass()

Get the second-level cache provider class name

getCacheProviderConfigback to summary
public String getCacheProviderConfig()

For cache providers which support this setting, get the provider's specific configuration resource.

getCacheRegionPrefixback to summary
public String getCacheRegionPrefix()

Get the cache region prefix

getCommentsEnabledback to summary
public String getCommentsEnabled()

Are SQL comments enabled?

getDatasourceback to summary
public String getDatasource()

The JNDI name of the datasource to use in this SessionFactory

Returns:String

String

getDefaultCatalogback to summary
public String getDefaultCatalog()

Get the default catalog

getDefaultSchemaback to summary
public String getDefaultSchema()

Get the default schema

getDialectback to summary
public String getDialect()

The JNDI name of the dialect class to use in this SessionFactory

Returns:String

String

getFlushBeforeCompletionEnabledback to summary
public String getFlushBeforeCompletionEnabled()

Is automatic Session flusing enabled?

getGetGeneratedKeysEnabledback to summary
public String getGetGeneratedKeysEnabled()

Is use of JDBC3 getGeneratedKeys() enabled?

getJdbcBatchSizeback to summary
public String getJdbcBatchSize()

Get the maximum JDBC batch size

getJdbcFetchSizeback to summary
public String getJdbcFetchSize()

Get the JDBC fetch size

getJdbcScrollableResultSetEnabledback to summary
public String getJdbcScrollableResultSetEnabled()

Is use of scrollable resultsets enabled?

getJndiNameback to summary
public String getJndiName()

The JNDI name to bind to the SessionFactory

Returns:String

String

getMapResourcesback to summary
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

String

getMaximumFetchDepthback to summary
public String getMaximumFetchDepth()

Get the maximum outer join fetch depth

getMinimalPutsEnabledback to summary
public String getMinimalPutsEnabled()

Is the second-level cache optimized for miminal puts?

getPasswordback to summary
public String getPassword()

Log into the database with this password

Returns:String

String

getPropertyback to summary
public String getProperty(String property)

Get a property

Parameters
property:String

the property name

Returns:String

the property value

getPropertyListback to summary
public String getPropertyList()

Display the properties

Returns:String

a list of property names and values

getQueryCacheEnabledback to summary
public String getQueryCacheEnabled()

Is the query cache enabled?

getQuerySubstitutionsback to summary
public String getQuerySubstitutions()

Get the query language substitutions

getSecondLevelCacheEnabledback to summary
public String getSecondLevelCacheEnabled()

Is the second-level cache enabled?

getShowSqlEnabledback to summary
public String getShowSqlEnabled()

Is SQL logging enabled?

getTransactionManagerLookupStrategyback to summary
public String getTransactionManagerLookupStrategy()

Get the strategy for obtaining the JTA TransactionManager

Returns:String

the class name

See Also
org.hibernate.transaction.TransactionManagerLookup
getTransactionStrategyback to summary
public String getTransactionStrategy()

The fully qualified class name of the Hibernate TransactionFactory implementation

Returns:String

the class name

See Also
org.hibernate.transaction.TransactionFactory
getUserNameback to summary
public String getUserName()

Log into the database with this name

Returns:String

String

getUserTransactionNameback to summary
public String getUserTransactionName()

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

Returns:String

the JNDI name

See Also
org.hibernate.transaction.JTATransaction
setAutoCloseSessionEnabledback to summary
public void setAutoCloseSessionEnabled(String enabled)

Enable automatic closing of Session when JTA transaction ends.

setBatchVersionedDataEnabledback to summary
public void setBatchVersionedDataEnabled(String enabled)

Enable or disable the use of batch updates for versioned entities

setCacheProviderClassback to summary
public void setCacheProviderClass(String providerClassName)

Set the second-level cache provider class name

setCacheProviderConfigback to summary
public void setCacheProviderConfig(String cacheProviderConfig)

For cache providers which support this setting, specify the provider's specific configuration resource.

setCacheRegionPrefixback to summary
public void setCacheRegionPrefix(String prefix)

Set the cache region prefix

setCommentsEnabledback to summary
public void setCommentsEnabled(String enabled)

Enable or disable the inclusion of comments in generated SQL

setDatasourceback to summary
public void setDatasource(String datasource)

Set the JNDI name of the datasource to use in this SessionFactory

setDefaultCatalogback to summary
public void setDefaultCatalog(String catalog)

Set the default catalog

setDefaultSchemaback to summary
public void setDefaultSchema(String schema)

Set the default schema

setDialectback to summary
public void setDialect(String dialect)

The name of the dialect class to use in this SessionFactory

Parameters
dialect:String

fully qualified class name of Dialect subclass

See Also
org.hibernate.dialect.Dialect
setFlushBeforeCompletionEnabledback to summary
public void setFlushBeforeCompletionEnabled(String enabled)

Enable automatic flushing of the Session when JTA transaction ends.

setGetGeneratedKeysEnabledback to summary
public void setGetGeneratedKeysEnabled(String enabled)

Enable or disable the use getGeneratedKeys()

setJdbcBatchSizeback to summary
public void setJdbcBatchSize(String batchSize)

Set the maximum JDBC batch size

setJdbcFetchSizeback to summary
public void setJdbcFetchSize(String fetchSize)

Set the JDBC fetch size

setJdbcScrollableResultSetEnabledback to summary
public void setJdbcScrollableResultSetEnabled(String enabled)

Enable or disable the use of scrollable resultsets

setJndiNameback to summary
public void setJndiName(String jndiName)

The JNDI name to bind to the SessionFactory

setMapResourcesback to summary
public void setMapResources(String mappingFiles)

Specify the Hibernate mapping files

setMaximumFetchDepthback to summary
public void setMaximumFetchDepth(String fetchDepth)

Set the maximum outer join fetch depth

setMinimalPutsEnabledback to summary
public void setMinimalPutsEnabled(String enabled)

Enable or disable optimization of second-level cache for minimal puts

setPasswordback to summary
public void setPassword(String password)

Log into the database with this password

setPropertyback to summary
public void setProperty(String property, String value)

Set a property

Parameters
property:String

the property name

value:String

the property value

setQueryCacheEnabledback to summary
public void setQueryCacheEnabled(String enabled)

Enable or disable the query cache

setQuerySubstitutionsback to summary
public void setQuerySubstitutions(String querySubstitutions)

Set the query language substitutions

setSecondLevelCacheEnabledback to summary
public void setSecondLevelCacheEnabled(String enabled)

Enable or disable the second-level cache

setShowSqlEnabledback to summary
public void setShowSqlEnabled(String showSql)

Enable logging of SQL to console

setTransactionManagerLookupStrategyback to summary
public void setTransactionManagerLookupStrategy(String lkpStrategy)

Set the strategy for obtaining the JTA TransactionManager

Parameters
lkpStrategy:String

the class name

See Also
org.hibernate.transaction.TransactionManagerLookup
setTransactionStrategyback to summary
public void setTransactionStrategy(String txnStrategy)

Set the fully qualified class name of the Hibernate TransactionFactory implementation

Parameters
txnStrategy:String

the class name

See Also
org.hibernate.transaction.TransactionFactory
setUserNameback to summary
public void setUserName(String userName)

Log into the database with this name

setUserTransactionNameback to summary
public void setUserTransactionName(String utName)

Set the JNDI name of the JTA UserTransaction object (used only by JTATransaction).

Parameters
utName:String

the JNDI name

See Also
org.hibernate.transaction.JTATransaction
startback to summary
public void start() throws HibernateException

Create the SessionFactory and bind to the jndi name on startup

stopback to summary
public void stop()

Unbind the SessionFactory or stub from JNDI