Вы находитесь на странице: 1из 2

WebSphere Application Server Community Edition V2.1.1.

2 Samples
(C) Copyright 2005,2009 IBM Corporation. All rights reserved.
----------------------------------------------------------------------
This sample demonstrates EJB 3.0 Session Bean, JPA and OpenEJB client technologi
es.
This README uses the following aliases to describe directories. These aliases s
hould be replaced with your actual directory paths.
%SAMPLE_HOME% refers to the root directory where WASCE samples are extracted.
%WASCE_HOME% refers to the root directory where the WASCE server is installed
.

BUILD
-----
Refer to %SAMPLE_HOME%/readme.txt for build instructions.

INSTALL
-------
This sample has been pre-built, so you can simply perform the following steps to
install it.
Start the WASCE server if it is not already running.
To use the admin console to create the database:
1. Under Embedded DB -> DB Manager
- Create database named "BankDB"
- Execute the SQL in %SAMPLE_HOME%/applications/bank/db/BankDB.sql
To use the deployer tool to install the application:
1. Execute these commands from a command prompt:
cd %WASCE_HOME%/bin
deploy.[bat|sh] deploy %SAMPLE_HOME%/applications/bank/bank-ear/target/b
ank-ear-2.1.1.2.ear
To use hot deployment to install the application:
1. Copy the EAR file indicated above to %WASCE_HOME%/deploy
To use the admin console to install the application:
1. Under Applications -> Deploy new
- Select the EAR file indicated above as your archive.
- Leave the plan field empty.
- Ensure the checkbox is selected to "start app after install".

RUN
---
1. Open the following link in a web browser:
http://localhost:8080/bank/
Run Client
---
1. Execute these commands from a command prompt:
cd %SAMPLE_HOME%/applications/bank/
java -classpath "%classpath%;%SAMPLE_HOME%/applications/bank/bank-client
/target/bank-client-2.1.1.2.jar;%SAMPLE_HOME%/applications/bank/bank-ejb/target/
bank-ejb-2.1.1.2.jar;%WASCE_HOME%/repository/org/apache/openejb/openejb-client/3
.0/openejb-client-3.0.jar;%WASCE_HOME%/repository/org/apache/geronimo/specs/gero
nimo-ejb_3.0_spec/1.0.1/geronimo-ejb_3.0_spec-1.0.1.jar" org.apache.geronimo.sam
ples.bank.client.BankClient

UNINSTALL
---------
To use the undeployer tool to uninstall the application:
1. Execute these commands from a command prompt:
cd %WASCE_HOME%/bin
deploy.[bat|sh] undeploy org.apache.geronimo.samples/bank-ear/2.1.1.2/ea
r
To use hot undeployment to uninstall the application:
1. Delete the EAR file indicated above from %WASCE_HOME%/deploy
To use the admin console to uninstall the application:
1. Locate your sample's component under Applications -> Application EARs
- Select the "Uninstall" command link.
ABOUT RUN ON NON-DEFAULT SERVER INSTANCE
---------------------------------------------
Alias OFFSET refers to the value of PortOffset configured for the non-default se
rver instance.
If the sample is deployed to a non-default server instance, these changes should
be applied before INSTALL:
1. Open BankClient.java, and change string "ejbd://localhost:4201" to "ejbd://lo
calhost:4201+OFFSET".
2. Rebuild by following %SAMPLE_HOME%/readme.txt.
3. Start non-default server instance and deploy it.

Вам также может понравиться