background image

Building the timersession Example

<< The timersession Example | Running the timersession Application >>
<< The timersession Example | Running the timersession Application >>

Building the timersession Example

}
}
Note ­
Application Server has a default minimum timeout value of 7000 milliseconds, or 7
seconds. If you need to set the timeout value lower than 7000 milliseconds, change the value of
the minimum-delivery-interval-in-millis element in domain-dir/config/domain.xml.
Due to virtual machine constraints, the lowest practical value for
minimum-delivery-interval-in-millis
is around 10 milliseconds.
Building, Packaging, Deploying, and Running the
timersession
Example
You can build, package, deploy, and run the timersession example using either NetBeans IDE
or Ant.
Building, Packaging, Deploying, and Running the timersession
Example Using NetBeans IDE
Follow these instructions to build, package, and deploy the timersession example to your
Application Server instance using the NetBeans IDE IDE.
1. In NetBeans IDE, select File
Open Project.
2. In the Open Project dialog, navigate to tut-install/javaeetutorial5/examples/ejb/.
3. Select the timersession folder.
4. Select the Open as Main Project and Open Required Projects check boxes.
5. Click Open Project Folder.
6. Select Run
Run Main Project.
This builds and packages the application into timersession.ear, located in
tut-install/javaeetutorial5/examples/ejb/timersession/dist/, deploys this EAR file to
your Application Server instance, and then runs the application client.
You will see the output from the application client in the Output tab:
...
Creating a timer with an interval duration of 3000 ms.
run-timersession-app-client:
run-nb:
BUILD SUCCESSFUL (total time: 16 seconds)
Using the Timer Service
The Java EE 5 Tutorial · September 2007
672