4.3 Typical application flow

 < Day Day Up > 



4.3 Typical application flow

Figure 4-3 shows the typical application flow for Web browser clients using either JDBC (from a servlet) or EJB to access application databases in DB2.

click to expand
Figure 4-3: Application flow

Below we review the above figure:

  1. A Web client requests a URL in the browser (input page).

  2. The request is routed to the Web server over the Internet.

  3. The Web server immediately passes the request to the WebSphere plug-in. All requests go to the WebSphere plug-in first.

  4. The WebSphere plug-in examines the URL, verifies the list of host name aliases from which it will accept traffic based on the virtual host information, and chooses a server to handle the request.

  5. A stream is created. A stream is a connection to the Web container. It is possible to maintain a connection (stream) over a number of requests. The Web container receives the request and, based on the URL, dispatches it to the proper servlet.

  6. If the servlet class is not loaded, the dynamic class loader loads the servlet. Servlet init(), then doGet() or doPost().

  7. JNDI is now used for lookup of either datasources or EJBs required by the servlet.

  8. Depending upon whether a datasource is specified or an EJB is requested, the JNDI will direct the servlet:

    • To the corresponding database, and get a connection from its connection pool in the case of a datasource

    • To the corresponding EJB container, which then instantiates the EJB, when an EJB is requested

  9. If the EJB requested involves an SQL transaction, it will go back to the JNDI to look up the datasource.

  10. The SQL statement will be executed and the data retrieved will be sent back:

    • To the servlet

    • To the EJB

  11. Data beans are created and handed off to JSPs in the case of EJBs.

  12. Servlet sends data to JSPs.

  13. The JSP generates the HTML that is sent back through the WebSphere plug-in to the Web server.

  14. The Web server sends the output page (output html) to the browser.



 < Day Day Up > 



DB2 UDB V8 and WebSphere V5. Performance Tuning and Operations Guide2004
DB2 UDB V8 and WebSphere V5. Performance Tuning and Operations Guide2004
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 90

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net