站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 3.2.7 hibernate API Documentation 英文版文档

Hibernate (JBoss Hibernate API) - JBoss 3.2.7 hibernate API Documentation 英文版文档


org.jboss.hibernate.jmx
Class Hibernate

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended byorg.jboss.system.ServiceMBeanSupport
          extended byorg.jboss.hibernate.jmx.Hibernate
All Implemented Interfaces:
HibernateMBean, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class Hibernate
extends org.jboss.system.ServiceMBeanSupport
implements HibernateMBean

A Hibernate service. Configures a SessionFactory instance as an MBean and exposes it through JNDI. Meant to work in conjuction with the HARDeployer.

Version:
$Revision: 1.1.2.10 $
Author:
Alexey Loubyansky, Gavin King, Steve Ebersole, Dimitris Andreadis

Field Summary
static String SESSION_FACTORY_CREATE
          notification type produced when the session factory gets created
static String SESSION_FACTORY_DESTROY
          notification type produced when the session factory gets destroyed
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.hibernate.jmx.HibernateMBean
OBJECT_NAME
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
Hibernate()
           
 
Method Summary
 String getBatchVersionedDataEnabled()
           
 String getCacheProviderClass()
          Get the cache provider class.
 String getCacheRegionPrefix()
           
 String getDatasourceName()
          Get the JNDI datasource name.
 String getDefaultSchema()
          Get the default database schema.
 String getDeployedTreeCacheJndiName()
           
 String getDialect()
          Get the Hibernate SQL dialect.
 String getGetGeneratedKeysEnabled()
          Is the use of JDBC3 getGeneratedKeys() enabled?
 URL getHarUrl()
           
 String getHbm2ddlAuto()
           
 String getJdbcBatchSize()
          Get the JDBC batch update batch size.
 String getJdbcFetchSize()
          Get the JDBC fetch size.
 String getJdbcScrollableResultSetEnabled()
          Are scrollable result sets enabled?
 String getMaxFetchDepth()
          Get the maximum outer join fetch depth.
 String getMinimalPutsEnabled()
           
 String getPassword()
          Get the database password.
 String getQueryCacheEnabled()
          Is the query cache enabled?
 String getQuerySubstitutions()
          Get the query substitutions.
 String getReflectionOptimizationEnabled()
           
 String getSessionFactoryInterceptor()
           
 String getSessionFactoryName()
          Get the SessionFactory JNDI name.
 String getShowSqlEnabled()
          Is SQL being logged to the console?
 String getStreamsForBinaryEnabled()
           
 String getUsername()
          Get the database username.
 boolean isDirty()
           
 boolean isSessionFactoryRunning()
           
 void rebuildSessionFactory()
           
 void setBatchVersionedDataEnabled(String batchVersionedDataEnabled)
           
 void setCacheProviderClass(String cacheProviderClass)
          Set the cache provider class.
 void setCacheRegionPrefix(String cacheRegionPrefix)
           
 void setDatasourceName(String datasourceName)
          Set the JNDI datasource name.
 void setDefaultSchema(String defaultSchema)
          Set the default database schema.
 void setDeployedTreeCacheJndiName(String deployedTreeCacheJndiName)
           
 void setDialect(String dialect)
          Set the Hibernate SQL dialect.
 void setGetGeneratedKeysEnabled(String getGeneratedKeysEnabled)
           
 void setHarUrl(URL harUrl)
           
 void setHbm2ddlAuto(String hbm2ddlAuto)
           
 void setJdbcBatchSize(String jdbcBatchSize)
          Set the JDBC batch update batch size.
 void setJdbcFetchSize(String jdbcFetchSize)
          Set the JDBC fetch size.
 void setJdbcScrollableResultSetEnabled(String jdbcScrollableResultSetEnabled)
           
 void setMaxFetchDepth(String maxFetchDepth)
          Set the maximum outer join fetch depth.
 void setMinimalPutsEnabled(String minimalPutsEnabled)
           
 void setPassword(String password)
          Set the database password.
 void setQueryCacheEnabled(String queryCacheEnabled)
           
 void setQuerySubstitutions(String querySubstitutions)
          Set the query substitutions.
 void setReflectionOptimizationEnabled(String reflectionOptimizationEnabled)
           
 void setSessionFactoryInterceptor(String sessionFactoryInterceptor)
           
 void setSessionFactoryName(String sessionFactoryName)
          Set the SessionFactory JNDI name.
 void setShowSqlEnabled(String showSqlEnabled)
           
 void setStreamsForBinaryEnabled(String streamsForBinaryEnabled)
           
 void setUsername(String username)
          Set the database username.
 void startService()
          Configure Hibernate and bind the SessionFactory to JNDI.
 void stopService()
          Close the SessionFactory.
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, createService, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Field Detail

SESSION_FACTORY_CREATE

public static final String SESSION_FACTORY_CREATE
notification type produced when the session factory gets created

See Also:
Constant Field Values

SESSION_FACTORY_DESTROY

public static final String SESSION_FACTORY_DESTROY
notification type produced when the session factory gets destroyed

See Also:
Constant Field Values
Constructor Detail

Hibernate

public Hibernate()
Method Detail

getSessionFactoryName

public String getSessionFactoryName()
Get the SessionFactory JNDI name.

Specified by:
getSessionFactoryName in interface HibernateMBean

setSessionFactoryName

public void setSessionFactoryName(String sessionFactoryName)
Set the SessionFactory JNDI name.

Specified by:
setSessionFactoryName in interface HibernateMBean

getHarUrl

public URL getHarUrl()
Specified by:
getHarUrl in interface HibernateMBean

setHarUrl

public void setHarUrl(URL harUrl)
Specified by:
setHarUrl in interface HibernateMBean

getDatasourceName

public String getDatasourceName()
Get the JNDI datasource name.

Specified by:
getDatasourceName in interface HibernateMBean

setDatasourceName

public void setDatasourceName(String datasourceName)
Set the JNDI datasource name.

Specified by:
setDatasourceName in interface HibernateMBean

getDefaultSchema

public String getDefaultSchema()
Get the default database schema.

Specified by:
getDefaultSchema in interface HibernateMBean

setDefaultSchema

public void setDefaultSchema(String defaultSchema)
Set the default database schema.

Specified by:
setDefaultSchema in interface HibernateMBean

getHbm2ddlAuto

public String getHbm2ddlAuto()
Specified by:
getHbm2ddlAuto in interface HibernateMBean

setHbm2ddlAuto

public void setHbm2ddlAuto(String hbm2ddlAuto)
Specified by:
setHbm2ddlAuto in interface HibernateMBean

getDialect

public String getDialect()
Get the Hibernate SQL dialect.

Specified by:
getDialect in interface HibernateMBean

setDialect

public void setDialect(String dialect)
Set the Hibernate SQL dialect.

Specified by:
setDialect in interface HibernateMBean

getMaxFetchDepth

public String getMaxFetchDepth()
Get the maximum outer join fetch depth.

Specified by:
getMaxFetchDepth in interface HibernateMBean

setMaxFetchDepth

public void setMaxFetchDepth(String maxFetchDepth)
Set the maximum outer join fetch depth.

Specified by:
setMaxFetchDepth in interface HibernateMBean

getJdbcBatchSize

public String getJdbcBatchSize()
Get the JDBC batch update batch size.

Specified by:
getJdbcBatchSize in interface HibernateMBean

setJdbcBatchSize

public void setJdbcBatchSize(String jdbcBatchSize)
Set the JDBC batch update batch size.

Specified by:
setJdbcBatchSize in interface HibernateMBean

getJdbcFetchSize

public String getJdbcFetchSize()
Get the JDBC fetch size.

Specified by:
getJdbcFetchSize in interface HibernateMBean

setJdbcFetchSize

public void setJdbcFetchSize(String jdbcFetchSize)
Set the JDBC fetch size.

Specified by:
setJdbcFetchSize in interface HibernateMBean

getJdbcScrollableResultSetEnabled

public String getJdbcScrollableResultSetEnabled()
Are scrollable result sets enabled?

Specified by:
getJdbcScrollableResultSetEnabled in interface HibernateMBean

setJdbcScrollableResultSetEnabled

public void setJdbcScrollableResultSetEnabled(String jdbcScrollableResultSetEnabled)
Specified by:
setJdbcScrollableResultSetEnabled in interface HibernateMBean

getGetGeneratedKeysEnabled

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

Specified by:
getGetGeneratedKeysEnabled in interface HibernateMBean

setGetGeneratedKeysEnabled

public void setGetGeneratedKeysEnabled(String getGeneratedKeysEnabled)
Specified by:
setGetGeneratedKeysEnabled in interface HibernateMBean

getQuerySubstitutions

public String getQuerySubstitutions()
Get the query substitutions.

Specified by:
getQuerySubstitutions in interface HibernateMBean

setQuerySubstitutions

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

Specified by:
setQuerySubstitutions in interface HibernateMBean

getQueryCacheEnabled

public String getQueryCacheEnabled()
Is the query cache enabled?

Specified by:
getQueryCacheEnabled in interface HibernateMBean

setQueryCacheEnabled

public void setQueryCacheEnabled(String queryCacheEnabled)
Specified by:
setQueryCacheEnabled in interface HibernateMBean

getCacheProviderClass

public String getCacheProviderClass()
Get the cache provider class.

Specified by:
getCacheProviderClass in interface HibernateMBean

setCacheProviderClass

public void setCacheProviderClass(String cacheProviderClass)
Set the cache provider class.

Specified by:
setCacheProviderClass in interface HibernateMBean

getCacheRegionPrefix

public String getCacheRegionPrefix()
Specified by:
getCacheRegionPrefix in interface HibernateMBean

setCacheRegionPrefix

public void setCacheRegionPrefix(String cacheRegionPrefix)
Specified by:
setCacheRegionPrefix in interface HibernateMBean

getMinimalPutsEnabled

public String getMinimalPutsEnabled()
Specified by:
getMinimalPutsEnabled in interface HibernateMBean

setMinimalPutsEnabled

public void setMinimalPutsEnabled(String minimalPutsEnabled)
Specified by:
setMinimalPutsEnabled in interface HibernateMBean

getShowSqlEnabled

public String getShowSqlEnabled()
Is SQL being logged to the console?

Specified by:
getShowSqlEnabled in interface HibernateMBean

setShowSqlEnabled

public void setShowSqlEnabled(String showSqlEnabled)
Specified by:
setShowSqlEnabled in interface HibernateMBean

getUsername

public String getUsername()
Get the database username.

Specified by:
getUsername in interface HibernateMBean

setUsername

public void setUsername(String username)
Set the database username.

Specified by:
setUsername in interface HibernateMBean

getPassword

public String getPassword()
Get the database password.

Specified by:
getPassword in interface HibernateMBean

setPassword

public void setPassword(String password)
Set the database password.

Specified by:
setPassword in interface HibernateMBean

getSessionFactoryInterceptor

public String getSessionFactoryInterceptor()
Specified by:
getSessionFactoryInterceptor in interface HibernateMBean

setSessionFactoryInterceptor

public void setSessionFactoryInterceptor(String sessionFactoryInterceptor)
Specified by:
setSessionFactoryInterceptor in interface HibernateMBean

isDirty

public boolean isDirty()
Specified by:
isDirty in interface HibernateMBean

isSessionFactoryRunning

public boolean isSessionFactoryRunning()
Specified by:
isSessionFactoryRunning in interface HibernateMBean

getDeployedTreeCacheJndiName

public String getDeployedTreeCacheJndiName()
Specified by:
getDeployedTreeCacheJndiName in interface HibernateMBean

setDeployedTreeCacheJndiName

public void setDeployedTreeCacheJndiName(String deployedTreeCacheJndiName)
Specified by:
setDeployedTreeCacheJndiName in interface HibernateMBean

getBatchVersionedDataEnabled

public String getBatchVersionedDataEnabled()
Specified by:
getBatchVersionedDataEnabled in interface HibernateMBean

setBatchVersionedDataEnabled

public void setBatchVersionedDataEnabled(String batchVersionedDataEnabled)
Specified by:
setBatchVersionedDataEnabled in interface HibernateMBean

getStreamsForBinaryEnabled

public String getStreamsForBinaryEnabled()
Specified by:
getStreamsForBinaryEnabled in interface HibernateMBean

setStreamsForBinaryEnabled

public void setStreamsForBinaryEnabled(String streamsForBinaryEnabled)
Specified by:
setStreamsForBinaryEnabled in interface HibernateMBean

getReflectionOptimizationEnabled

public String getReflectionOptimizationEnabled()
Specified by:
getReflectionOptimizationEnabled in interface HibernateMBean

setReflectionOptimizationEnabled

public void setReflectionOptimizationEnabled(String reflectionOptimizationEnabled)
Specified by:
setReflectionOptimizationEnabled in interface HibernateMBean

rebuildSessionFactory

public void rebuildSessionFactory()
                           throws Exception
Specified by:
rebuildSessionFactory in interface HibernateMBean
Throws:
Exception

startService

public void startService()
                  throws Exception
Configure Hibernate and bind the SessionFactory to JNDI.

Throws:
Exception

stopService

public void stopService()
                 throws Exception
Close the SessionFactory.

Throws:
Exception


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.