Package org.hibernate.jmx
Class HibernateService
java.lang.Object
org.hibernate.util.ExternalSessionFactoryConfig
org.hibernate.jmx.HibernateService
- All Implemented Interfaces:
HibernateServiceMBean
Implementation of HibernateServiceMBean. Creates a
SessionFactory and binds it to the specified JNDI name.
All mapping documents are loaded as resources by the MBean.
All mapping documents are loaded as resources by the MBean.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidExport the CREATE DDL to the databasevoidExport the DROP DDL to the databaseIs automatic Session closing enabled?The JNDI name of the datasource to use in this SessionFactoryprotected MapIs automatic Session flusing enabled?The JNDI name to bind to the SessionFactorygetName()Log into the database with this passwordgetProperty(String property) Get a propertyDisplay the propertiesGet 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.voidsetDatasource(String datasource) Set the JNDI name of the datasource to use in this SessionFactoryvoidsetFlushBeforeCompletionEnabled(String enabled) Enable automatic flushing of the Session when JTA transaction ends.voidsetJndiName(String jndiName) The JNDI name to bind to the SessionFactoryvoidsetPassword(String password) Log into the database with this passwordvoidsetProperty(String property, String value) Set a propertyvoidsetTransactionManagerLookupStrategy(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 JNDIMethods inherited from class org.hibernate.util.ExternalSessionFactoryConfig
addAdditionalProperty, addAll, addMapResource, buildConfiguration, buildProperties, getBatchVersionedDataEnabled, getCacheProviderClass, getCacheProviderConfig, getCacheRegionPrefix, getCommentsEnabled, getCustomListeners, getDefaultCatalog, getDefaultSchema, getDialect, getExcludedPropertyNames, getGetGeneratedKeysEnabled, getJdbcBatchSize, getJdbcFetchSize, getJdbcScrollableResultSetEnabled, getMapResources, getMaximumFetchDepth, getMinimalPutsEnabled, getQueryCacheEnabled, getQuerySubstitutions, getReflectionOptimizationEnabled, getSecondLevelCacheEnabled, getShowSqlEnabled, getStreamsForBinaryEnabled, setBatchVersionedDataEnabled, setCacheProviderClass, setCacheProviderConfig, setCacheRegionPrefix, setCommentsEnabled, setCustomListener, setCustomListeners, setCustomListenersAsString, setDefaultCatalog, setDefaultSchema, setDialect, setGetGeneratedKeysEnabled, setJdbcBatchSize, setJdbcFetchSize, setJdbcScrollableResultSetEnabled, setMapResources, setMaximumFetchDepth, setMinimalPutsEnabled, setQueryCacheEnabled, setQuerySubstitutions, setReflectionOptimizationEnabled, setSecondLevelCacheEnabled, setShowSqlEnabled, setStreamsForBinaryEnabledMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.jmx.HibernateServiceMBean
addMapResource, getBatchVersionedDataEnabled, getCacheProviderClass, getCacheProviderConfig, getCacheRegionPrefix, getCommentsEnabled, getDefaultCatalog, getDefaultSchema, getDialect, getGetGeneratedKeysEnabled, getJdbcBatchSize, getJdbcFetchSize, getJdbcScrollableResultSetEnabled, getMapResources, getMaximumFetchDepth, getMinimalPutsEnabled, getQueryCacheEnabled, getQuerySubstitutions, getSecondLevelCacheEnabled, getShowSqlEnabled, setBatchVersionedDataEnabled, setCacheProviderClass, setCacheProviderConfig, setCacheRegionPrefix, setCommentsEnabled, setDefaultCatalog, setDefaultSchema, setDialect, setGetGeneratedKeysEnabled, setJdbcBatchSize, setJdbcFetchSize, setJdbcScrollableResultSetEnabled, setMapResources, setMaximumFetchDepth, setMinimalPutsEnabled, setQueryCacheEnabled, setQuerySubstitutions, setSecondLevelCacheEnabled, setShowSqlEnabled
-
Constructor Details
-
HibernateService
public HibernateService()
-
-
Method Details
-
start
Description copied from interface:HibernateServiceMBeanCreate the SessionFactory and bind to the jndi name on startup- Specified by:
startin interfaceHibernateServiceMBean- Throws:
HibernateException
-
stop
public void stop()Description copied from interface:HibernateServiceMBeanUnbind the SessionFactory or stub from JNDI- Specified by:
stopin interfaceHibernateServiceMBean
-
getExtraProperties
- Overrides:
getExtraPropertiesin classExternalSessionFactoryConfig
-
getTransactionStrategy
Description copied from interface:HibernateServiceMBeanThe fully qualified class name of the Hibernate TransactionFactory implementation- Specified by:
getTransactionStrategyin interfaceHibernateServiceMBean- Returns:
- the class name
- See Also:
-
setTransactionStrategy
Description copied from interface:HibernateServiceMBeanSet the fully qualified class name of the Hibernate TransactionFactory implementation- Specified by:
setTransactionStrategyin interfaceHibernateServiceMBean- Parameters:
txnStrategy- the class name- See Also:
-
getUserTransactionName
Description copied from interface:HibernateServiceMBeanThe JNDI name of the JTA UserTransaction object (used only be JTATransaction).- Specified by:
getUserTransactionNamein interfaceHibernateServiceMBean- Returns:
- the JNDI name
- See Also:
-
setUserTransactionName
Description copied from interface:HibernateServiceMBeanSet the JNDI name of the JTA UserTransaction object (used only by JTATransaction).- Specified by:
setUserTransactionNamein interfaceHibernateServiceMBean- Parameters:
utName- the JNDI name- See Also:
-
getTransactionManagerLookupStrategy
Description copied from interface:HibernateServiceMBeanGet the strategy for obtaining the JTA TransactionManager- Specified by:
getTransactionManagerLookupStrategyin interfaceHibernateServiceMBean- Returns:
- the class name
- See Also:
-
setTransactionManagerLookupStrategy
Description copied from interface:HibernateServiceMBeanSet the strategy for obtaining the JTA TransactionManager- Specified by:
setTransactionManagerLookupStrategyin interfaceHibernateServiceMBean- Parameters:
lkpStrategy- the class name- See Also:
-
getPropertyList
Description copied from interface:HibernateServiceMBeanDisplay the properties- Specified by:
getPropertyListin interfaceHibernateServiceMBean- Returns:
- a list of property names and values
-
getProperty
Description copied from interface:HibernateServiceMBeanGet a property- Specified by:
getPropertyin interfaceHibernateServiceMBean- Parameters:
property- the property name- Returns:
- the property value
-
setProperty
Description copied from interface:HibernateServiceMBeanSet a property- Specified by:
setPropertyin interfaceHibernateServiceMBean- Parameters:
property- the property namevalue- the property value
-
dropSchema
public void dropSchema()Description copied from interface:HibernateServiceMBeanExport the DROP DDL to the database- Specified by:
dropSchemain interfaceHibernateServiceMBean
-
createSchema
public void createSchema()Description copied from interface:HibernateServiceMBeanExport the CREATE DDL to the database- Specified by:
createSchemain interfaceHibernateServiceMBean
-
getName
-
getDatasource
Description copied from interface:HibernateServiceMBeanThe JNDI name of the datasource to use in this SessionFactory- Specified by:
getDatasourcein interfaceHibernateServiceMBean- Returns:
- String
-
setDatasource
Description copied from interface:HibernateServiceMBeanSet the JNDI name of the datasource to use in this SessionFactory- Specified by:
setDatasourcein interfaceHibernateServiceMBean- Parameters:
datasource-
-
getJndiName
Description copied from interface:HibernateServiceMBeanThe JNDI name to bind to the SessionFactory- Specified by:
getJndiNamein interfaceHibernateServiceMBean- Returns:
- String
-
setJndiName
Description copied from interface:HibernateServiceMBeanThe JNDI name to bind to the SessionFactory- Specified by:
setJndiNamein interfaceHibernateServiceMBean- Parameters:
jndiName-
-
getUserName
Description copied from interface:HibernateServiceMBeanLog into the database with this name- Specified by:
getUserNamein interfaceHibernateServiceMBean- Returns:
- String
-
setUserName
Description copied from interface:HibernateServiceMBeanLog into the database with this name- Specified by:
setUserNamein interfaceHibernateServiceMBean- Parameters:
userName-
-
getPassword
Description copied from interface:HibernateServiceMBeanLog into the database with this password- Specified by:
getPasswordin interfaceHibernateServiceMBean- Returns:
- String
-
setPassword
Description copied from interface:HibernateServiceMBeanLog into the database with this password- Specified by:
setPasswordin interfaceHibernateServiceMBean- Parameters:
password-
-
setFlushBeforeCompletionEnabled
Description copied from interface:HibernateServiceMBeanEnable automatic flushing of the Session when JTA transaction ends.- Specified by:
setFlushBeforeCompletionEnabledin interfaceHibernateServiceMBean
-
getFlushBeforeCompletionEnabled
Description copied from interface:HibernateServiceMBeanIs automatic Session flusing enabled?- Specified by:
getFlushBeforeCompletionEnabledin interfaceHibernateServiceMBean
-
setAutoCloseSessionEnabled
Description copied from interface:HibernateServiceMBeanEnable automatic closing of Session when JTA transaction ends.- Specified by:
setAutoCloseSessionEnabledin interfaceHibernateServiceMBean
-
getAutoCloseSessionEnabled
Description copied from interface:HibernateServiceMBeanIs automatic Session closing enabled?- Specified by:
getAutoCloseSessionEnabledin interfaceHibernateServiceMBean
-
getProperties
-