Class RemoteCacheStartupServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.apache.commons.jcs3.auxiliary.remote.server.RemoteCacheStartupServlet
- All Implemented Interfaces:
Serializable,Servlet,ServletConfig
This servlet can be used to startup the JCS remote cache. It is easy to
deploy the remote server in a tomcat base. This give you an easy way to
monitor its activity.
servlet>
<servlet-name>JCSRemoteCacheStartupServlet</servlet-name>
<servlet-class>
org.apache.commons.jcs3.auxiliary.remote.server.RemoteCacheStartupServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>JCSRemoteCacheStartupServlet</servlet-name>
<url-pattern>/jcs</url-pattern>
</servlet-mapping>
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()shuts the cache down.voidinit()Starts the registry and then tries to bind to it.protected voidservice(HttpServletRequest request, HttpServletResponse response) It just dumps the stats.Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, serviceMethods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
RemoteCacheStartupServlet
public RemoteCacheStartupServlet()
-
-
Method Details
-
init
Starts the registry and then tries to bind to it.Gets the port from a props file. Uses the local host name for the registry host. Tries to start the registry, ignoring failure. Starts the server.
- Overrides:
initin classGenericServlet- Throws:
ServletException
-
service
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException It just dumps the stats.- Overrides:
servicein classHttpServlet- Parameters:
request-response-- Throws:
ServletExceptionIOException
-
destroy
shuts the cache down.- Specified by:
destroyin interfaceServlet- Overrides:
destroyin classGenericServlet
-