background image

Running the timersession Application

<< Building the timersession Example | Handling Exceptions >>
<< Building the timersession Example | Handling Exceptions >>

Running the timersession Application

The output from the timer is sent to the server.log file located in the
domain-dir/server/logs/ directory. To view this file:
1. Click the Runtime tab.
2. Right-click your Application Server instance and select View Server Log.
Look for the following line at the bottom of server.log:
Timeout occurred
Building, Packaging, and Deploying the timersession Example Using
Ant
Follow these instructions to build, package, and deploy the timersession example to your
Application Server instance using Ant.
1. In a terminal window, go to the
tut-install/javaeetutorial5/examples/ejb/timersession/ directory.
2. To build TimerSessionBean, type the following command:
ant build
This runs the default task, which compiles the source files and packages the application
into an EAR file located at
tut-install/examples/ejb/timersession/dist/timersession.ear.
3. To deploy the application, type the following command:
ant deploy
Running the timersession Application Client Using Ant
To run the application client, perform the following steps.
1. In a terminal window, go to the
tut-install/javaeetutorial5/examples/ejb/timersession/ directory.
2. Type the following command:
ant run
This task first retrieves the client JAR, timersessionClient.jar to the dist directory, and
then runs the client. This is the equivalent of running:
appclient -client TimerSessionAppClient.jar
3. In the terminal window, the client displays these lines:
Creating a timer with an interval duration of 30000 ms.
Using the Timer Service
Chapter 22 · Session Bean Examples
673