Petstore Demo
来源:百度文库 编辑:神马文学网 时间:2024/04/25 07:11:28
Run 2001 J2EETMDeployathon Online!
With Oracle9iAS Containers for J2EETM 1.0.2.2
IntroductionStep1:Download and Install JavaTM 2 SDK,Standard EditionStep2:Download OC4J
Step3: Installand Configure OC4J
Step4: Downloadthe Java Pet Store Application
Step5: Installand Configure the Java Pet Store Application
Step6: Runthe Java Pet Store Application with an Oracle Database
Notes
Support
Step 1:Download and InstallJava 2 SDK, Standard Edition
Oracle9iAS Containersfor J2EE1.0.2.2, requires Java 2 SDK, Standard Edition v1.3.0_02 or v1.2.2_07for moredetails, check certificationmatrix . If Java 2, Standard Edition v1.3.0_02 or v1.2.2_07 is notalreadyinstalled on your platform, you need to install it now, from http://java.sun.com/j2se.Step 2: DownloadOracle9iASContainers for J2EE (OC4J)
Download the latestOC4J from OC4Jdownload page on OTNStep 3: Installand ConfigureOC4J
To install the serverand setthe administrative password:- unzip oc4j.zip
- change to
directory ( /home) - java -jar orion.jar -install
- follow the instructions provided by the installation program.
Step 4: Downloadthe JavaPet Store Application
You can download thelatestJava Pet Store Application (version 1.1.2) from the JavaTM Pet Store 1.1.2 Release pageStep 5: Installand Configurethe Java Pet Store Application
- Set the environment variable JAVA_HOME to the base directory where you installed the Java 2 SDK. For example, set JAVA_HOME to ~/jdk1.3.0_02 or ~/jdk1.2.2_07
- Configure OC4J DataSource for an Oracle database
- Copy PetStore_data_source into
/config/data-sources.xml - or alternatively add PetStore_data_Sources entries to
/config/data_sources.xml - Create user estoreuser with password estore
- Grant connect, resource and create session privileges to estoreuser
- Unzip the downloaded application in a directory of your choice (
)
- Configure the PetStore Application to work with an Oracle database
- Change to the directory that contains the expanded PetStore application (
) - In order to enable Data Access Objects to work against an Oracle database instead of Cloudspace (the default), in
/src/components/customer/src/customer_ejb.xml, replace OrderDAOCS with OrderDAOOracle - In order to work around a PetStore Application bug which faults PetStore errorpage to throw a "PrintWriter class Not Found Exception", add the following statement to
/src/petstore/src/docroot/errorpage.jsp
- <%@ page import ="java.io.*" isErrorPage="true" %>
- Update the Application Server Type
- in
/src/petstore/src/docroot/WEB-INF/web.xml
- Rebuild the Application to integrate configuration changes
- J2EE_HOME is not used, but checked in build.sh, we suggest to set it to any valid directory path
- Replace the content of
/src/petstore/src/build.xml with oc4j_build.xml - Copy application.xml into
/src/petstore/src/ - Copy manifest.mf into
/src/petstore/src/ - Change to
/src/petstore/src/ - Invoke build.sh (Unix) or build.bat (Windows)
In order to remove J2EE R.I. dependencies in
- Deploy the PetStore Application on OC4J Server
- Copy petstore.ear from the
/src/petstore/build/ into /applications/ - In
/config/server.xml, uncomment application entries and add the petstore entry as follows: - In
/config/default-web-site.xml, uncomment web-app entries and add the petstore entry as follows:
- Start the server
- To start the server:
or
java -jar orion.jar -config
Step 6: Run the Java Pet Store Application
- Open your Web browser.
- Specify the URL: http://localhost:8888/pestore
- Follow the instructions provided by the petstore application to load java Pet Store database tables
Notes
- You do not have to access the Java Pet Store application to check that the Oracle9iAS Containers for J2EE server is running. Simply point your browser to http://hostname:port, where hostname is the host on which the OC4J server is running, and port is the default port number to which the OC4J server is listening. For example, point to: http://localhost:8888
- The instructions for deploying PetStore in step 5 assume local deployment, in order to deploy to a remote OC4J instance use the fololowing command:
- To shut down OC4J, gracefully, issue the following command, from
directory:
java -jar admin.jar ormi://localhost
% java -jar admin.jar ormi://localhost/
If it does not shut down the container, force a rapid shut down by passing the force argument, as follows:
% java -jar admin.jar ormi://localhost/
For the unlikely situation where none of these work, kill OC4J process(es) with your operating system command
- Note: OC4J release 1.0.2.2 is pre-configured with thin JDBC driver for Oracle8.0, Oracle8i databases; to run OC4J against an Oracle9i database, replace classes12.jar in
/lib/ with the one shipped with Oracle9i DB
- You can run the PetStore with OC4J using a database other than Oracle8i. If you would like to use another database with OC4J, please check the "Using Merant Drivers" section in Using OC4J
Support
- For questions related to running the Deployathon on Oracle9iAS Containers for J2EE, Please see the Oracle9iAS J2EE.
- The J2EEblueprints interest list is the place to get answers to generic questions about the Deployathon. To join the interest list, send an email to listserv@java.sun.com. Specify subscribe j2eeblueprints-interest yourlastname yourfirstname in the body of the email.
Petstore Demo
ASSESSv2 DEMO
Vapour(demo)
Petstore 初探-5 分钟运行 PetStore - Glassfish - Forward Everyday
ASSESSv2 DEMO 发展建议
USB3.0 demo board
feedsky 2.0终于发布了 - demo@virushuo
Don‘t make the Demo look Done
软件版本Beta,RC,Demo,Build,GA
走了很多弯路终于运行出了petstore - 企业应用 - Java - JavaEye论坛
重构的gogocn.com首页DEMO w3cn.org
lucene自带的两个demo的运行测试方法
FreeBSD连载:FreeBSD使用大全目录 wokeyi cms demo site
Demo and Test Setup Guide - OFBiz Project Adm...
软件版本号详解 beta版、demo版……
软件版本号解 beta版、demo版……
行计算简介和多核CPU编程Demo
编程艺术品与4KB大小的地形Code Demo
行计算简介和多核CPU编程Demo--Mountain Notebook
行计算简介和多核CPU编程Demo--Mountain Notebook
An ICA page-papers,code,demo,links (Tony Bell)
demo:vb.net 打开记事本、beep、msgbox、取程序路径
大富翁论坛-富翁笔记-请教MemoryStream的使用方法 (DEMO)
demo@virushuo: Google百度和谷歌的那些事