public class

HibernateService

extends ExternalSessionFactoryConfig
implements HibernateServiceMBean
java.lang.Object
   ↳ org.hibernate.util.ExternalSessionFactoryConfig
     ↳ org.hibernate.jmx.HibernateService

Class Overview

Implementation of HibernateServiceMBean. Creates a SessionFactory and binds it to the specified JNDI name.

All mapping documents are loaded as resources by the MBean.

Summary

Public Constructors
HibernateService()
Public Methods
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 getDatasource()
The JNDI name of the datasource to use in this SessionFactory
String getFlushBeforeCompletionEnabled()
Is automatic Session flusing enabled?
String getJndiName()
The JNDI name to bind to the SessionFactory
String getName()
String getPassword()
Log into the database with this password
Properties getProperties()
String getProperty(String property)
Get a property
String getPropertyList()
Display the properties
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 setDatasource(String datasource)
Set the JNDI name of the datasource to use in this SessionFactory
void setFlushBeforeCompletionEnabled(String enabled)
Enable automatic flushing of the Session when JTA transaction ends.
void setJndiName(String jndiName)
The JNDI name to bind to the SessionFactory
void setPassword(String password)
Log into the database with this password
void setProperty(String property, String value)
Set a property
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
Protected Methods
Map getExtraProperties()
[Expand]
Inherited Methods
From class org.hibernate.util.ExternalSessionFactoryConfig
From class java.lang.Object
From interface org.hibernate.jmx.HibernateServiceMBean

Public Constructors

public HibernateService ()

Public Methods

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 getDatasource ()

The JNDI name of the datasource to use in this SessionFactory

Returns
  • String

public String getFlushBeforeCompletionEnabled ()

Is automatic Session flusing enabled?

public String getJndiName ()

The JNDI name to bind to the SessionFactory

Returns
  • String

public String getName ()

public String getPassword ()

Log into the database with this password

Returns
  • String

public Properties getProperties ()

public String getProperty (String property)

Get a property

Parameters
property the property name
Returns
  • the property value

public String getPropertyList ()

Display the properties

Returns
  • a list of property names and values

public String getTransactionManagerLookupStrategy ()

Get the strategy for obtaining the JTA TransactionManager

Returns
  • the class name

public String getTransactionStrategy ()

The fully qualified class name of the Hibernate TransactionFactory implementation

Returns
  • the class name

public String getUserName ()

Log into the database with this name

Returns
  • String

public String getUserTransactionName ()

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

Returns
  • the JNDI name

public void setAutoCloseSessionEnabled (String enabled)

Enable automatic closing of Session when JTA transaction ends.

public void setDatasource (String datasource)

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

public void setFlushBeforeCompletionEnabled (String enabled)

Enable automatic flushing of the Session when JTA transaction ends.

public void setJndiName (String jndiName)

The JNDI name to bind to the SessionFactory

public void setPassword (String password)

Log into the database with this password

public void setProperty (String property, String value)

Set a property

Parameters
property the property name
value the property value

public void setTransactionManagerLookupStrategy (String lkpStrategy)

Set the strategy for obtaining the JTA TransactionManager

Parameters
lkpStrategy the class name

public void setTransactionStrategy (String txnStrategy)

Set the fully qualified class name of the Hibernate TransactionFactory implementation

Parameters
txnStrategy the class name

public void setUserName (String userName)

Log into the database with this name

public void setUserTransactionName (String utName)

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

Parameters
utName the JNDI name

public void start ()

Create the SessionFactory and bind to the jndi name on startup

public void stop ()

Unbind the SessionFactory or stub from JNDI

Protected Methods

protected Map getExtraProperties ()