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. You can use scripting to install and start the sample
application in a single node and single server environment.
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.
Avoid trouble: You
can only use the following procedure in a single node and single server environment.
If your environment contains multiple nodes or servers, use the administrative
console to install and start the sample application.
gotcha
About this task
Installing the Feature Pack for EJB 3.0 adds a sample file 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
the wsadmin tool. 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
- Open a command prompt.
- Navigate to the app_server_root/bin directory.
- Run the script to install and start the sample application.
Use the following command to install and start the sample application
using the wsadmin tool:
wsadmin -lang jython -f app_server_root/samples/src/EJB3SampleApplications/EJB3Counter/installEJB3CounterSample.py
Results
If the script successfully installs and starts the application, the
script returns the following message:
ADMA5013I: Application EJB3CounterSample installed successfully.
What to do next
Launch the wsadmin tool and verify that the application is installed
on your application server. The following Jython command lists all applications
that are installed in your environment:
AdminApp.list()
For
detailed information on the EJB 3.0 Samples, refer to the readme file provided
with the feature pack.