You can build, package, deploy, and run the timersession example by using either NetBeans IDE or Ant.
In NetBeans IDE, select File->Open Project.
In the Open Project dialog, navigate to:
tut-install/examples/ejb/ |
Select the timersession folder.
Select the Open as Main Project check box.
Click Open Project.
Select Run->Run Main Project.
This builds and packages the application into timersession.war, located in tut-install/examples/ejb/timersession/dist/, deploys this WAR file to your GlassFish Server instance, and then runs the web client.
In a terminal window, go to:
tut-install/examples/ejb/timersession/ |
Type the following command:
ant build |
This runs the default task, which compiles the source files and packages the application into a WAR file located at tut-install/examples/ejb/timersession/dist/timersession.war.
To deploy the application, type the following command:
ant deploy |
Open a web browser to http://localhost:8080/timersession.
Click the Set Timer button to set a programmatic timer.
Wait for a while and click the browser’s Refresh button.
You will see the date and time of the last programmatic and automatic timeouts.
To see the messages that are logged when a timeout occurs, open the server.log file located in domain-dir/server/logs/.