|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.util.ExternalSessionFactoryConfig
org.hibernate.jmx.HibernateService
public class HibernateService
Implementation of HibernateServiceMBean. Creates a
SessionFactory and binds it to the specified JNDI name.
All mapping documents are loaded as resources by the MBean.
HibernateServiceMBean,
SessionFactory| Constructor Summary | |
|---|---|
HibernateService()
|
|
| Method Summary | |
|---|---|
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 |
protected Map |
getExtraProperties()
|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HibernateService()
| Method Detail |
|---|
public void start()
throws HibernateException
HibernateServiceMBean
start in interface HibernateServiceMBeanHibernateExceptionpublic void stop()
HibernateServiceMBean
stop in interface HibernateServiceMBeanprotected Map getExtraProperties()
getExtraProperties in class ExternalSessionFactoryConfigpublic String getTransactionStrategy()
HibernateServiceMBean
getTransactionStrategy in interface HibernateServiceMBeanTransactionFactorypublic void setTransactionStrategy(String txnStrategy)
HibernateServiceMBean
setTransactionStrategy in interface HibernateServiceMBeantxnStrategy - the class nameTransactionFactorypublic String getUserTransactionName()
HibernateServiceMBean
getUserTransactionName in interface HibernateServiceMBeanJTATransactionpublic void setUserTransactionName(String utName)
HibernateServiceMBean
setUserTransactionName in interface HibernateServiceMBeanutName - the JNDI nameJTATransactionpublic String getTransactionManagerLookupStrategy()
HibernateServiceMBean
getTransactionManagerLookupStrategy in interface HibernateServiceMBeanTransactionManagerLookuppublic void setTransactionManagerLookupStrategy(String lkpStrategy)
HibernateServiceMBean
setTransactionManagerLookupStrategy in interface HibernateServiceMBeanlkpStrategy - the class nameTransactionManagerLookuppublic String getPropertyList()
HibernateServiceMBean
getPropertyList in interface HibernateServiceMBeanpublic String getProperty(String property)
HibernateServiceMBean
getProperty in interface HibernateServiceMBeanproperty - the property name
public void setProperty(String property,
String value)
HibernateServiceMBean
setProperty in interface HibernateServiceMBeanproperty - the property namevalue - the property valuepublic void dropSchema()
HibernateServiceMBean
dropSchema in interface HibernateServiceMBeanpublic void createSchema()
HibernateServiceMBean
createSchema in interface HibernateServiceMBeanpublic String getName()
public String getDatasource()
HibernateServiceMBean
getDatasource in interface HibernateServiceMBeanpublic void setDatasource(String datasource)
HibernateServiceMBean
setDatasource in interface HibernateServiceMBeanpublic String getJndiName()
HibernateServiceMBean
getJndiName in interface HibernateServiceMBeanpublic void setJndiName(String jndiName)
HibernateServiceMBean
setJndiName in interface HibernateServiceMBeanpublic String getUserName()
HibernateServiceMBean
getUserName in interface HibernateServiceMBeanpublic void setUserName(String userName)
HibernateServiceMBean
setUserName in interface HibernateServiceMBeanpublic String getPassword()
HibernateServiceMBean
getPassword in interface HibernateServiceMBeanpublic void setPassword(String password)
HibernateServiceMBean
setPassword in interface HibernateServiceMBeanpublic void setFlushBeforeCompletionEnabled(String enabled)
HibernateServiceMBean
setFlushBeforeCompletionEnabled in interface HibernateServiceMBeanpublic String getFlushBeforeCompletionEnabled()
HibernateServiceMBean
getFlushBeforeCompletionEnabled in interface HibernateServiceMBeanpublic void setAutoCloseSessionEnabled(String enabled)
HibernateServiceMBean
setAutoCloseSessionEnabled in interface HibernateServiceMBeanpublic String getAutoCloseSessionEnabled()
HibernateServiceMBean
getAutoCloseSessionEnabled in interface HibernateServiceMBeanpublic Properties getProperties()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||