程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> JAVA編程 >> 關於JAVA >> J2EE tutorial 實例安裝

J2EE tutorial 實例安裝

編輯:關於JAVA

本節介紹各個代表性實例的安裝,原英文介紹文檔位於以下路徑: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) 執行/tools/serveroption/startserver.bat 腳本

2) 啟動Server

3) 切換到J2EE1.4 amples\webaPPS\bookstore\bookstore1 rc,運行:

asant deploy

3 運行

在浏覽器鍵入:http://:/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 /domains//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

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved