Testing with an enterprise bean
This article describes how to test your WebSphere Application Server installation by using an enterprise bean and
the Increment sample. These instructions assume that you have installed and tested your WebSphere Application Server system.
Perform the following steps:
- Ensure that you are logged into the host machine with superuser (root) privileges.
- Navigate to the directory containing the startupServer.sh script
(located by default in the /opt/WebSphere/AppServer/bin directory) by using the cd command, as follows:
# cd /opt/WebSphere/AppServer/bin
- Start the WebSphere Administrative Server by running the script startupServer.sh, as follows:
# ./startupServer.sh
Ensure that the server has started successfully by checking the file named tracefile located in the
/opt/WebSphere/AppServer/logs directory. Use the tail command to check the file, as follows:
# tail -f tracefile
The message ...open for e-business appears in this file
when the server has started successfully.
- Navigate to the directory containing the adminclient.sh script
(located by default in the /opt/WebSphere/AppServer/bin directory) by using the cd command, as follows:
# cd /opt/WebSphere/AppServer/bin
- Start the administrative console by running the script adminclient.sh, as follows:
# ./adminclient.sh
- When the console displays the message
Console Ready , administer
the application server by doing the following:
- When the administrative console opens, a tree view is displayed.
Click the plus sign (+) next to the WebSphere Administrative Domain entry to expand
the view.
- Click the plus sign (+) next to the Nodes entry to expand the view.
- Identify the name of your host machine and expand the view of that entry.
- Click the plus sign (+) next to the Application Servers entry to expand the view.
- Select the Default Server entry and click the Start icon on the toolbar. An information
window opens stating that the server has started. Click OK to close this window.
After the default server is started initially, it will start automatically
if it stops or if you restart the machine. Even if the
administrative server fails, the application server continues to run.
- Ensure that the Web Server is running. If the Web server
is not running, start it.
- Start a Web browser and specify the following URL:
http://machine_name/webapp/examples/HitCount
In this command, machine_name represents the name of the machine on which WebSphere Application Server is running.
When the Web page opens, several selection options are displayed.
- Under the heading Generate hit count using, click the radio button for the option Enterprise Java Bean.
- Under the heading Transaction Type, click the radio button for the option None.
- Click Increment.
If the number of hits is displayed, WebSphere Application Server is operating properly.
|
|