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 startServer.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 server by entering the following command:
# ./startServer.sh
Ensure that the server has started successfully by checking the file named default_server_stdout.log located in the
/opt/WebSphere/AppServer/logs directory. The message ...open for e-business appears in this file
when the server has started successfully.
- Open a Web browser window and enter the following URL:
http://localhost:9090/admin
- The Login window opens and prompts you to enter a user ID to which your configuration changes
will be saved. Enter a user ID and click Submit. If you do not care to save changes using your user ID,
click Submit without entering an ID and your changes will be saved using the default
user ID
User .
If the user ID you choose is already in use and in session, you are prompted to do one of
the following:
- Force the existing user ID out of session. The configuration file that was
being used by the existing user ID will be saved in a temporary storage area. You will be
prompted to load the saved file; choosing not to do so will delete it from
the temporary storage area.
- Wait for the existing user ID to log out or time out of the session.
- Select a different user ID.
- Ensure that the Default Server is started by doing the following:
- When the console opens, a tree view is displayed. 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 view the information displayed in the right panel.
If the value for the Execution State field
is
STOP , click the drop-down menu and select START .
After the default server is started initially, it will start automatically if it stops or
if you restart the machine.
- Click OK.
- 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 beside the option Enterprise Java Bean.
- Under the heading Transaction Type, click the radio button beside the option None.
- Click Increment.
If the number of hits is displayed, WebSphere Application Server is operating properly.
|
|