org.apache.geronimo.samples.daytrader.web.prims
Class PingServlet2Session2JDBC

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.apache.geronimo.samples.daytrader.web.prims.PingServlet2Session2JDBC
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class PingServlet2Session2JDBC
extends HttpServlet

PingServlet2Session2JDBC tests key functionality of a servlet call to a stateless SessionEJB, and then to a Entity EJB representing data in a database. This servlet makes use of the Stateless Session EJB Trade, and then uses TradeConfig to generate a random stock symbol. The stocks price is looked up using the Quote Entity EJB.

See Also:
Serialized Form

Constructor Summary
PingServlet2Session2JDBC()
           
 
Method Summary
 void doGet(HttpServletRequest req, HttpServletResponse res)
          this is the main method of the servlet that will service all get requests.
 void doPost(HttpServletRequest req, HttpServletResponse res)
          forwards post requests to the doGet method Creation date: (11/6/2000 10:52:39 AM)
 String getServletInfo()
          returns a string of information about the servlet
 void init(ServletConfig config)
          called when the class is loaded to initialize the servlet
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PingServlet2Session2JDBC

public PingServlet2Session2JDBC()
Method Detail

doPost

public void doPost(HttpServletRequest req,
                   HttpServletResponse res)
            throws ServletException,
                   IOException
forwards post requests to the doGet method Creation date: (11/6/2000 10:52:39 AM)

Overrides:
doPost in class HttpServlet
Parameters:
res - javax.servlet.http.HttpServletRequest
res2 - javax.servlet.http.HttpServletResponse
Throws:
ServletException
IOException

doGet

public void doGet(HttpServletRequest req,
                  HttpServletResponse res)
           throws IOException,
                  ServletException
this is the main method of the servlet that will service all get requests.

Overrides:
doGet in class HttpServlet
Parameters:
request - HttpServletRequest
responce - HttpServletResponce
Throws:
IOException
ServletException

getServletInfo

public String getServletInfo()
returns a string of information about the servlet

Specified by:
getServletInfo in interface Servlet
Overrides:
getServletInfo in class GenericServlet
Returns:
info String: contains info about the servlet

init

public void init(ServletConfig config)
          throws ServletException
called when the class is loaded to initialize the servlet

Specified by:
init in interface Servlet
Overrides:
init in class GenericServlet
Parameters:
config - ServletConfig:
Throws:
ServletException


Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.