本節介紹各個代表性實例的安裝,原英文介紹文檔位於以下路徑:J2EE(J2EE培訓 )1.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) 執行
2) 啟動Server
3) 切換到J2EE1.4 amples\webaPPS\bookstore\bookstore1 rc,運行:
asant deploy
3 運行
在浏覽器鍵入:http://
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
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