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

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

public class PingServlet2TwoPhase
extends HttpServlet

PingServlet2TwoPhase tests key functionality of a TwoPhase commit In this primitive a servlet calls a Session EJB which begins a global txn The Session EJB then reads a DB row and sends a message to JMS Queue The txn is closed w/ a 2-phase commit

See Also:
Serialized Form

Constructor Summary
PingServlet2TwoPhase()
           
 
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

PingServlet2TwoPhase

public PingServlet2TwoPhase()
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.