The Feature Pack for EJB 3.0 provides a
sample application that you can install onto an application server that has
been enabled with the Feature Pack for EJB 3.0.
Before you begin
Install the Feature Pack for EJB 3.0 and create
an application server that is enabled with an EJB 3.0 profile. The enabled
server is the deployment target onto which you install the EJB 3.0 Sample.
About this task
Installing the
Feature Pack for EJB 3.0 adds
a sample application to the
app_server_root/samples/lib/EJB3SampleApplications directory of your product installation.
This topic describes how to install
and start the EJB3CounterSample.ear enterprise application
using an administrative console. You must install the enterprise archive (EAR)
file onto an enabled server before you can start the application and test
it in a Web browser.
Procedure
- Click in the console navigation tree.
- On the Preparing for application installation page, specify to
install EJB3CounterSample.ear.
- Click Local file system or Remote
file system and specify the full path name of the EJB3CounterSample.ear file.
app_server_root/samples/lib/EJB3SampleApplications/EJB3CounterSample.ear
- Select Prompt me only when additional information
is required.
- Click Next.
- Click Next on each panel until you reach
the Summary panel.
Do not go directly from Step 1 to the Summary
panel. You must click Next on each panel that has mandatory
settings to enter values for those settings. Simply click Next to
enter the default values. You optionally can change the values to suit your
environment.
- On the Summary panel, verify the cell, node, and server onto which
the application modules will install, and then click Finish.
- Examine the application installation progress messages.
If
the application installs successfully, the message Application EJB3CounterSample
installed successfully is displayed. Click Save.
After the configuration changes are saved, you can see the name of the application
in the list of deployed applications on the Enterprise Applications page accessed
by clicking in the console navigation tree.
If
the application does not install successfully, read the messages to identify
why the installation failed. Correct problems with the server or application
and try installing the application again.
Results
The EJB3CounterSample application is in the
list of deployed applications on the Enterprise Applications page.
What to do next
After the application installs successfully, do the following:
- Start the application.
On the Enterprise Applications page, select the
check box beside EJB3CounterSample, and then click Start.
- Test the application. Point your Web browser at:
http://localhost:9080/ejb3sample/counter
If
the localhost address does not load, substitute the host
name (IP address) for the machine for localhost; for
example, http://9.22.33.44:9080/ejb3sample/counter.
If
you have another WebSphere® Application Server installation
on your machine, the server port number is likely not 9080.
See the Ports table in the administrative console to find the WC_defaulthost server
port number. Click . The Ports table lists the important ports:
Port name |
Description |
WC_adminhost |
Port used to open an unsecure administrative console
in the URL http://host_name:administrative_port/ibm/console |
WC_adminhost_secure |
Port used to open a secure administrative console in
the URL http://host_name:administrative_port/ibm/console |
WC_defaulthost |
Port used to test running applications in the URL http://host_name:server_port/servlet_name |
WC_defaulthost_secure |
Port used to securely test running applications in the
URL http://host_name:server_port/servlet_name |
For detailed information on the EJB 3.0 Samples, refer to the readme
file provided with the feature pack.