|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ch.ledcom.hephaistos.dao.HibernatePlugIn
Implements the PlugIn
interface to configure the Hibernate
data persistence library. A configured
net.sf.hibernate.SessionFactory
is stored in the
ServletContext
of the web application unless the property
storedInServletContext
is set to false
.
<plugin class="net.sf.hibernate.plugins.struts.HibernatePlugIn"> <set-property name="configFilePath"" value="path-to-config-file"/> <set-property name="storedInServletContext"" value="true-or-false"/> </plugin>
Field Summary | |
static java.lang.String |
SESSION_FACTORY_KEY
the key under which the SessionFactory instance is stored
in the ServletContext . |
Constructor Summary | |
HibernatePlugIn()
|
Method Summary | |
void |
destroy()
Destroys the SessionFactory instance. |
void |
init(org.apache.struts.action.ActionServlet servlet,
org.apache.struts.config.ModuleConfig config)
Initializes the SessionFactory . |
void |
setConfigFilePath(java.lang.String configFilePath)
Setter for property configFilePath. |
void |
setStoredInServletContext(java.lang.String storedInServletContext)
Setter for property storedInServletContext. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String SESSION_FACTORY_KEY
SessionFactory
instance is stored
in the ServletContext
.
Constructor Detail |
public HibernatePlugIn()
Method Detail |
public void destroy()
SessionFactory
instance.
destroy
in interface org.apache.struts.action.PlugIn
public void init(org.apache.struts.action.ActionServlet servlet, org.apache.struts.config.ModuleConfig config) throws javax.servlet.ServletException
SessionFactory
.
init
in interface org.apache.struts.action.PlugIn
servlet
- the ActionServlet
instance under which the
plugin will run.config
- the ModuleConfig
for the module under which
the plugin will run.
javax.servlet.ServletException
public void setConfigFilePath(java.lang.String configFilePath)
configFilePath
- New value of property configFilePath.public void setStoredInServletContext(java.lang.String storedInServletContext)
storedInServletContext
- New value of property storedInServletContext.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |