Setup & Rebuilding of Sun PetStore 1.3.0.1_02 in WebLogic

本文档详细介绍了如何设置J2EE PetStore环境,包括配置WebLogic服务器、设置类路径、编译脚本及部署应用程序等步骤,并强调了数据库驱动的重要性。

Manual for setting up the J2EE PetStore enviroment:

//Run the configuration Wizard of WebLogic
//Set the "EmbeddedLDAP" option in the "config.xml" file: change value of CredentialEncrypted to ""
//Change the "Targets" value of WebServer element to "petstore" if necessary

//Set the class path of "startPetStoreWebLogic.cmd" file
//Add ;C:/Program Files/Java/jdk1.5.0_04/lib/msbase.jar;C:/Program Files/Java/jdk1.5.0_04/lib/mssqlserver.jar;C:/Program Files/Java/jdk1.5.0_04/lib/msutil.jar;

//Open a command window
cd c:/bea/user_projects/domains/petstore
startPetStoreWebLogic.cmd

//Open a new command command
cd c:/bea/user_projects/domains/petstore
setPetStoreEnv.cmd
cd c:/bea/user_projects/domains/petstore/db.setup
ant

//Copy over files from bea folder to petstore src folder

//Change the weblogic.j2ee.home of the build.properties file in petstore src folder

//Compile scripts
cd c:/bea/user_projects/domains/petstore
setPetStoreEnv.cmd
cd c:/petstore1.3.1_02/src
ant

//Copy files
Copy c:/petstore1.3.1_02/src/apps/admin/build/petstoreadmin.ear c:/bea/user_projects/domains/petstore/applications /y
Copy c:/petstore1.3.1_02/src/apps/opc/build/opc.ear c:/bea/user_projects/domains/petstore/applications /y
Copy c:/petstore1.3.1_02/src/apps/petstore/build/petstore.ear c:/bea/user_projects/domains/petstore/applications /y
Copy c:/petstore1.3.1_02/src/apps/supplier/build/supplier.ear c:/bea/user_projects/domains/petstore/applications /y

//Start the server
cd c:/bea/user_projects/domains/petstore
startPetStoreWebLogic.cmd

-------------------------------------------------Combined commands start-------------------------------------
cd c:/bea/user_projects/domains/petstore
setPetStoreEnv.cmd
cd c:/petstore1.3.1_02/src
ant
Copy c:/petstore1.3.1_02/src/apps/admin/build/petstoreadmin.ear c:/bea/user_projects/domains/petstore/applications /y
Copy c:/petstore1.3.1_02/src/apps/opc/build/opc.ear c:/bea/user_projects/domains/petstore/applications /y
Copy c:/petstore1.3.1_02/src/apps/petstore/build/petstore.ear c:/bea/user_projects/domains/petstore/applications /y
Copy c:/petstore1.3.1_02/src/apps/supplier/build/supplier.ear c:/bea/user_projects/domains/petstore/applications /y

cd C:/bea/user_projects/domains/petstore/PetStore/stage

del /f/s/q _appsdir_opc_ear
rd _appsdir_opc_ear/META-INF
rd _appsdir_opc_ear

del /f/s/q _appsdir_petstore_ear
rd _appsdir_petstore_ear/META-INF
rd _appsdir_petstore_ear

del /f/s/q _appsdir_petstoreadmin_ear
rd _appsdir_petstoreadmin_ear/META-INF
rd _appsdir_petstoreadmin_ear

del /f/s/q _appsdir_supplier_ear
rd _appsdir_supplier_ear/META-INF
rd _appsdir_supplier_ear


cd c:/bea/user_projects/domains/petstore
startPetStoreWebLogic.cmd
-------------------------------------------------Combined commands end---------------------------------------


----------------------------------------------------------------------------------------------------------------------
Something must be careful with:
1. It must be totally successful when you first run the server after setup complete, otherwise you have to resetup again;
2. The database access driver is very important:
 First, you must get the correct driver files;
 Second, you must specify the correct class path of the driver files;
 Third, you can specify the classpath either in the OS Environment Variables or in the startPetStoreWeblogic.cmd file.
3. There are something were not on the manual file of BEA:
 a) Sometime you must change the "EmbeddedLDAP" option in the "config.xml" file;
 b) If you renamed your PetStore server, you should change the "Targets" value of WebServer element in the "config.xml" file.

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值