本节介绍各个代表性实例的安装,原英文介绍文档位于以下路径:j2ee1.4/samples/docs/list.html
duke’s bookstore
1 编译。
切换到j2ee1.4 amples\webapps\bookstore\bookstore1 rc
1) 执行 asant clean.,这是清除
2) 执行 asant core,这是编译
2 启动pointbase数据库,并准备数据
1) 执行<pointbase_install_dir>/tools/serveroption/startserver.bat 脚本
2) 启动server
3) 切换到j2ee1.4 amples\webapps\bookstore\bookstore1 rc,运行:
asant deploy
3 运行
在浏览器键入:http://<host>:<port>/bookstore1/enter
4 生成javadoc
在j2ee1.4 amples\webapps\bookstore\bookstore1 rc下运行:
asant javadocs
stateless sessionbean
location: j2ee1.4 amples/ejb/stateless/simple/src
stateful sessionbean-cartbean
location: d:\devs\j2ee1.4 amples\ejb tateful imple rc
run:
cd <install_dir>/domains/<domain_name>/applications/j2ee-apps/stateful-simple/
run : appclient -client stateful-simpleclient.jar -name cartclient –textauth
cmp customer
location: d:\devs\j2ee1.4 amples\ejb\cmp\cmpcustomer rc
1 在控制台建立jdbc连接资源,名称为:jdbc/cmpcustomer
2 创建连接池:cmpcustomer-pool
run: http://localhost:8080/customer/
storagebin (bmp-simple) application
location: d:\devs\j2ee1.4 amples\ejb\bmp imple rc
how to run:
in: d:\devs\j2ee1.4\domains\domain1\applications\j2ee-apps\bmp-simple
run:
appclient -client bmp-simpleclient.jar -name storagebinclient -textauth
mdb
location: d:\devs\j2ee1.4 amples\ejb\mdb imple rc
定义资源
1 登陆server,在java message service 处点击connection factories,然后选择new
2 输入:
jndi-name: jms/myqcf type: javax.jms.queueconnectionfactory resource: select enabled checkbox
3 点击 destination resources 点 new,输入:
jndi-name: jms/myqueue type: javax.jms.queue resource: select enabled checkbox
4 运行:
in :d:\devs\j2ee1.4\domains\domain1\applications\j2ee-apps\mdb-simple
run
appclient -client mdb-simpleclient.jar -name simplemessageclient –textauth -xml d:\devs\j2ee1.4\domains\domain1\config un-acc.xml
已安装实例和运行路径如下:
name
url
duke’s bookstore
http://localhost:8080/bookstore1/enter
stateless sessionbean
http://localhost:8080/helloworld
stateful
d:\devs\j2ee1.4\domains\domain1\applications\j2ee-apps tateful-simple
appclient -client stateful-simpleclient.jar -name cartclient –textauth
cmp
http://localhost:8080/customer/
bmp
d:\devs\j2ee1.4\domains\domain1\applications\j2ee-apps\bmp-simple
appclient -client bmp-simpleclient.jar -name storagebinclient -textauth
mdb
d:\devs\j2ee1.4\domains\domain1\applications\j2ee-apps\mdb-simple
appclient -client mdb-simpleclient.jar -name simplemessageclient –textauth -xml d:\devs\j2ee1.4\domains\domain1\config un-acc.xml
