Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following table describe the Web container related set of primitives. Those primitives that can be set to run multiple times are highlighted.

Primitive

Description

PingHtml

PingHtml is the most basic operation providing access to a simple "Hello World" page of static HTML.

Explicit GC

Invoke Garbage Collection on AppServer. Reports heap statistics after the GC has completed.

PingServlet

PingServlet tests fundamental dynamic HTML creation through server side servlet processing.

PingServletWriter

PingServletWriter extends PingServlet by using a PrintWriter for formatted output vs. the output stream used by PingServlet.

PingServlet2Include

PingServlet2Include tests response inclusion. Servlet 1 includes the response of Servlet 2.

PingServlet2Servlet

PingServlet2Servlet tests request dispatching. Servlet 1, the controller, creates a new JavaBean object forwards the request with the JavaBean added to Servlet 2. Servlet 2 obtains access to the JavaBean through the Servlet request object and provides dynamic HTML output based on the JavaBean data.

PingJSP

PingJSP tests a direct call to JavaServer Page providing server-side dynamic HTML through JSP scripting.

PingJSPEL

PingJSPEL tests a direct call to JavaServer Page providing server-side dynamic HTML through JSP scripting and the usage of the new JSP 2.0 Expression Language.

PingServlet2JSP

PingServlet2JSP tests a commonly used design pattern, where a request is issued to servlet providing server side control processing. The servlet creates a JavaBean object with dynamically set attributes and forwards the bean to the JSP through a RequestDispatcher The JSP obtains access to the JavaBean and provides formatted display with dynamic HTML output based on the JavaBean data.

PingHTTPSession1

PingHTTPSession1 - SessionID tests fundamental HTTP session function by creating a unique session ID for each individual user. The ID is stored in the users session and is accessed and displayed on each user request.

PingHTTPSession2

PingHTTPSession2 session create/destroy further extends the previous test by invalidating the HTTP Session on every 5th user access. This results in testing HTTPSession create and destroy.

PingHTTPSession3

PingHTTPSession3 large session object tests the servers ability to manage and persist large HTTPSession data objects. The servlet creates a large custom java object. The class contains multiple data fields and results in 2048 bytes of data. This large session object is retrieved and stored to the session on each user request.

PingJDBCRead

PingJDBCRead tests fundamental servlet to JDBC access to a database performing a single-row read using a prepared SQL statment.

PingJDBCWrite

PingJDBCRead tests fundamental servlet to JDBC access to a database performing a single-row write using a prepared SQL statment.

PingServlet2JNDI

PingServlet2JNDI tests the fundamental J2EE operation of a servlet allocating a JNDI context and performing a JNDI lookup of a JDBC DataSource.

...

The following table describe the EJB container related set of primitives. Those primitives that can be set to run multiple times are highlighted.

Primitive

Description

PingServlet2SessionEJB

PingServlet2SessionEJB tests key function of a servlet call to a stateless SessionEJB. The SessionEJB performs a simple calculation and returns the result.

PingServlet2EntityEJBLocal
PingServlet2EntityEJBRemote

PingServlet2EntityEJB tests key function of a servlet call to an EJB 2.0 Container Managed Entity. In this test the EJB entity represents a single row in the database table. The Local version uses the EJB Local interface while the Remote version uses the Remote EJB interface.
(Note: PingServlet2EntityEJBLocal will fail in a multi-tier setup where the Trade Web and EJB apps are seperated.)

PingServlet2Session2Entity

This tests the full servlet to Session EJB to Entity EJB path to retrieve a single row from the database.

PingServlet2Session2
EntityCollection

This test extends the previous EJB Entity test by calling a Session EJB which uses a finder method on the Entity that returns a collection of Entity objects. Each object is displayed by the servlet

PingServlet2Session2CMROne2One

This test drives an Entity EJB to get another Entity EJB's data through an EJB 2.0 CMR One to One relationship

PingServlet2Session2CMROne2Many

This test drives an Entity EJB to get another Entity EJB's data through an EJB 2.0 CMR One to Many relationship

PingServlet2Session2JDBC

This tests the full servlet to Session EJB to JDBC path to retrieve a single row from the database.

PingServlet2Session2
JDBCCollection

This test extends the previous JDBC test by calling a Session EJB to JDBC path which returns multiple rows from the database.

PingServlet2MDBQueue

PingServlet2MDBQueue drives messages to a Queue based Message Driven EJB (MDB).Each request to the servlet posts a message to the Queue. The MDB receives the message asynchronously and prints message delivery statistics on each 100th message.
Note: Not intended for performance testing.

PingServlet2MDBTopic

PingServlet2MDBTopic drives messages to a Topic based Publish/Subscribe Message Driven EJB (MDB).Each request to the servlet posts a message to the Topic. The TradeStreamMDB receives the message asynchronously and prints message delivery statistics on each 100th message. Other subscribers to the Topic will also receive the messages.
Note: Not intended for performance testing.

PingServlet2TwoPhase

PingServlet2TwoPhase drives a Session EJB which invokes an Entity EJB with findByPrimaryKey (DB Access) followed by posting a message to an MDB through a JMS Queue (Message access). These operations are wrapped in a global 2-phase transaction and commit.

...

DayTrader Max Users
Trade Max Quotes

By default the DayTrader database is populated with 50 users (uid:0 - uid:49) and 100 quotes (s:0 - s:99).

Primitive Iteration

By default the DayTrader primitives are execute one operation per web request. Change this value to repeat operations multiple times per web request.

Publish Quote Updates

Publish quote price changes to a JMS topic. Needed for running the #Streamer application client.

Enable long run support

Enable long run support by disabling the show all orders query performed on the Account page.

Enable operation trace
Enable full trace

Enable DayTrader processing trace messages.

Running Primitives

So far we saw what primitives are available, which of those can be set to run multiple iterations and how to configure the application runtime parameters.

  • Point your browser to http://localhost:8080/daytraderImage Added
  • Click on Configuration.
  • Click on Configure DayTrader run-time parameters.
  • Select EJB from Run-Time Mode.
  • Seclect JSP-Images from WebInterface.
  • Set Primitive Iteration to 100.
  • Click on Update Config.
  • Click on Primitives.
  • Click on PingServlet2EntityEJBLocal.

With these settings, every time you hit PingServlet2EntityEJBLocal or refresh the page that primitive will get executed 100 times. When doing performance analysis, being able to "play" with these parameters is very valuable. This helps you track down execution times of these very specific functions. When used combined with a load simulation tool, the different configurations will assist you with the fine tuning of the server based on the specific needs of your environment.

Gone trading !!!

We just saw how to run singular functions/operations via the available primitives. The very same settings you configured for running those primitives also affect the GUI for trading simulation.

Click on Trading & Portfolios, accept the default user and password and click on Login. You should now be able to begin trading!

Image RemovedImage Added

Launching the application clients

...