beautypg.com

Apple WebObjects 3.5: Serving User Manual

Page 26

background image

Administrative Tasks

27

3. Start the application instance you just created. To do so, open a

command-shell window and enter the command line as shown in the
section “Starting Up Applications From the Command Line.” Use the

-n

option (which must be used in conjunction with the

-a

option) to

specify the instance number. Also use the

-browser OFF

option so that the

application does not automatically launch in your web browser. For
example, your command line might look like this:

MyApp -a WODefaultAdaptor -n

instanceNumber

-c -browser OFF

4. In your web browser, enter this URL:

http://localhost/cgi-bin/WebObjects-Recording/MyApp?file=

completePath

where completePath is the directory in which you want to store the
recorded session. The adaptor appends a

.rec

extension to the path you

specify.

5. Using the web browser, run a session of your WebObjects application.

You may want to record what you believe to be a typical session, or you
may want to perform a session that would put a maximum load on your
system. For example, you may want to record a session that performs as
many database fetches as possible.

Important:

During recording, only one user may be accessing the

application. Your session must not include any backtracking to a
previously displayed page. If you backtrack, you’ll get unpredictable
results.

As you run the application, the WebObjects recording adaptor records
each request and response to a separate file in the directory you
specified.

6. When you have finished the session, close the browser window. To

prevent accidental calls to the WebObjects-Recording adaptor, remove
it from your server’s cgi-bin directory.

7. Open a command shell window and enter this command:

WOPlayback -R

completePath

.rec -H

hostname

where completePath

.rec

is the directory that contains the recorded

session and hostname is the name of the host on which you want to run
the recorded session.

The WOPlayback tool plays the recorded session repeatedly until you
explicitly stop it (for example, by pressing Control-C in a command