|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.struts.webapp.example2.memory.MemoryDatabasePlugIn
public final class MemoryDatabasePlugIn
MemoryDatabasePlugIn initializes and finalizes the persistent storage of User and Subscription information for the Struts Demonstration Application, using an in-memory database backed by an XML file.
IMPLEMENTATION WARNING - If this web application is run from a WAR file, or in another environment where reading and writing of the web application resource is impossible, the initial contents will be copied to a file in the web application temporary directory provided by the container. This is for demonstration purposes only - you should NOT assume that files written here will survive a restart of your servlet container.
Constructor Summary | |
---|---|
MemoryDatabasePlugIn()
|
Method Summary | |
---|---|
void |
destroy()
Gracefully shut down this database, releasing any resources that were allocated at initialization. |
java.lang.String |
getPathname()
|
void |
init(ActionServlet servlet,
ModuleConfig config)
Initialize and load our initial database from persistent storage. |
void |
setPathname(java.lang.String pathname)
|
protected void |
setupCache(ActionServlet servlet,
ModuleConfig config)
Cache commonly required data as servlet context attributes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MemoryDatabasePlugIn()
Method Detail |
---|
public java.lang.String getPathname()
public void setPathname(java.lang.String pathname)
public void destroy()
destroy
in interface PlugIn
public void init(ActionServlet servlet, ModuleConfig config) throws javax.servlet.ServletException
init
in interface PlugIn
servlet
- The ActionServlet for this web applicationconfig
- The ApplicationConfig for our owning module
javax.servlet.ServletException
- if we cannot configure ourselves correctlyprotected void setupCache(ActionServlet servlet, ModuleConfig config)
Cache commonly required data as servlet context attributes.
servlet
- The ActionServlet
instance running
this webappconfig
- The ModuleConfig
for this application module
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |