|
OpenNMS API 1.2.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opennms.web.ServletInitializer
Encapsulates all initialization and configuration needed by the OpenNMS servlets and JSPs.
| Field Summary | |
protected static DbConnectionFactory |
factory
A reference to the factory we set in Vaultduring
initso we can destroy it in destroy. |
| Constructor Summary | |
private |
ServletInitializer()
Private, empty constructor so that this class cannot be instantiated outside of itself. |
| Method Summary | |
static void |
destroy(javax.servlet.ServletContext context)
Releases all shared resources on the first invocation of this method. |
static java.lang.String |
getHomeDir()
Deprecated. Use Vault.getHomeDirinstead. |
static void |
init(javax.servlet.ServletContext context)
Initialize servlet and JSP configuration on the first invocation of this method. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static DbConnectionFactory factory
Vaultduring
initso we can destroy it in destroy.
Maybe there's a better way to do this then storing a reference? Should we
just add a method to Vault?
This reference also serves as a flag to determine whether or not this class has been initialized yet. If it is null, the class has not yet been initialized.
| Constructor Detail |
private ServletInitializer()
| Method Detail |
public static void init(javax.servlet.ServletContext context)
throws javax.servlet.ServletException
Call this method in the init method of your servlet or
JSP. It will read the servlet initialization parameters from the
ServletConfig and ServletContext and
OpenNMS configuration files.
If this method finds the property opennms.db.poolman in
the ServletContext, it will create an instance of the
classname specified there to use as the DbConnectionManager.
context - the ServletContext instance in which your
servlet is running
javax.servlet.ServletException
public static void destroy(javax.servlet.ServletContext context)
throws javax.servlet.ServletException
Call this method in the destroy method of your servlet or
JSP.
context - the ServletContext instance in which your
servlet is running
javax.servlet.ServletExceptionpublic static java.lang.String getHomeDir()
Vault.getHomeDirinstead.
|
OpenNMS API 1.2.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||