|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.portal.jems.as.system.AbstractJBossService
org.jboss.portal.jems.hibernate.SessionFactoryBinder
public class SessionFactoryBinder
Configures and binds the hibernate session factory.
Field Summary | |
---|---|
protected org.hibernate.cfg.Configuration |
config
The hibernate configuration object. |
protected java.lang.String |
jndiName
|
Fields inherited from class org.jboss.system.ServiceMBeanSupport |
---|
log, server, SERVICE_CONTROLLER_SIG, serviceName |
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 | |
---|---|
SessionFactoryBinder()
|
Method Summary | |
---|---|
void |
createContent()
|
void |
createSchema()
|
protected void |
createService()
During this step the hibernate configuration is created. |
protected void |
createSessionFactory()
Create the session factory. |
void |
destroySchema()
|
protected void |
destroyService()
During this step the hibernate config is unreferenced. |
protected void |
destroySessionFactory()
Close the session factory if it is not null. |
int |
doCheck()
|
org.hibernate.cfg.Configuration |
getConfig()
|
java.lang.String |
getConfigLocation()
|
java.net.URL |
getConfigURL()
|
java.lang.String |
getDialectName()
|
boolean |
getDoChecking()
|
java.lang.String |
getJNDIName()
|
org.hibernate.SessionFactory |
getSessionFactory()
|
java.lang.String |
getSetupLocation()
|
LoaderResource |
getSetupResource()
|
void |
setConfigLocation(java.lang.String configLocation)
|
void |
setDoChecking(boolean doChecking)
|
void |
setJNDIName(java.lang.String jndiName)
|
void |
setSetupLocation(java.lang.String setupLocation)
|
protected void |
startService()
During this step the session factory is created and the content creation is triggered. |
protected void |
stopService()
During this step the session factory is destroyed. |
void |
updateSchema()
|
Methods inherited from class org.jboss.portal.jems.as.system.AbstractJBossService |
---|
create, destroy, getState, getStateString, start, stop |
Methods inherited from class org.jboss.system.ServiceMBeanSupport |
---|
getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister |
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
---|
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.hibernate.cfg.Configuration config
protected java.lang.String jndiName
Constructor Detail |
---|
public SessionFactoryBinder()
Method Detail |
---|
public boolean getDoChecking()
public void setDoChecking(boolean doChecking)
public java.lang.String getConfigLocation()
public void setConfigLocation(java.lang.String configLocation)
public java.lang.String getSetupLocation()
public void setSetupLocation(java.lang.String setupLocation)
public java.net.URL getConfigURL()
public LoaderResource getSetupResource()
public org.hibernate.cfg.Configuration getConfig()
getConfig
in interface HibernateProvider
public org.hibernate.SessionFactory getSessionFactory()
getSessionFactory
in interface HibernateProvider
public java.lang.String getDialectName()
public java.lang.String getJNDIName()
public void setJNDIName(java.lang.String jndiName)
protected void createService() throws java.lang.Exception
createService
in class org.jboss.system.ServiceMBeanSupport
java.lang.Exception
protected void startService() throws java.lang.Exception
startService
in class org.jboss.system.ServiceMBeanSupport
java.lang.Exception
protected void stopService() throws java.lang.Exception
stopService
in class org.jboss.system.ServiceMBeanSupport
java.lang.Exception
protected void destroyService() throws java.lang.Exception
destroyService
in class org.jboss.system.ServiceMBeanSupport
java.lang.Exception
public int doCheck()
public void createSchema()
public void destroySchema()
public void createContent()
public void updateSchema()
protected void createSessionFactory() throws java.lang.Exception
java.lang.Exception
protected void destroySessionFactory()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |