com.ibm.websphere.samples.beenthere
Class BeenThereServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.ibm.websphere.samples.beenthere.BeenThereServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class BeenThereServlet
extends javax.servlet.http.HttpServlet

This servlet obtains and displays application execution environment information.

This servlet can display the following information:

Additionally, this serlvet can perform the following actions:

Usage

http://<hostname>/wlm/BeenThere?count=<#>&stats=<true|false>&weights=<true|false>

where the parameters are defined as follows:
count
The number of times the BeenThere EJB is to be executed. The default count is 1.
stats
Specifies if the BeenThere EJB execution statistics should be displayed.
Two possible values are defined: The default value is false.
weights
Specifies if the workload management weight values of the cluster members executing the BeenThere EJB should be displayed.
Two possible values are defined: The default value is false.

Example 1

In the following example, BeenThereServlet executes the BeenThere EJB 10 times and displays the BeenThere EJB execution statistics:

http://<hostname>/wlm/BeenThere?count=10&stats=true

Example 2

In the following example, BeenThereServlet displays workload management weight values of the cluster members executing the BeenThere EJB:

http://<hostname>/wlm/BeenThere?weights=true

See Also:
Serialized Form

Constructor Summary
BeenThereServlet()
           
 
Method Summary
 void destroy()
          Cleans up objects created by the servlet.
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Processes incoming HTTP GET requests.
 void init(javax.servlet.ServletConfig config)
          Initializes the servlet.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeenThereServlet

public BeenThereServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Initializes the servlet.

Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet
Parameters:
config - a servlet configuration
Throws:
javax.servlet.ServletException - if the servlet could not be initialized

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws javax.servlet.ServletException
Processes incoming HTTP GET requests.

Overrides:
doGet in class javax.servlet.http.HttpServlet
Parameters:
request - an object that encapsulates the request to the servlet
response - an object that encapsulates the response from the servlet
Throws:
javax.servlet.ServletException - if the incoming get request could not be processed

destroy

public void destroy()
Cleans up objects created by the servlet.

Specified by:
destroy in interface javax.servlet.Servlet
Overrides:
destroy in class javax.servlet.GenericServlet