The following is the fifth part of a six-part series on Oracle Application Server 10g administration. Each tip is excerpted from the Osborne Oracle Press book, "Oracle Application Server 10g administration handbook," by John Garmany and Don Burleson. Check back frequently for the next installment, or go to the main series page for all installments.
Deploying applications using Enterprise Manager
As already discussed, components are packaged into archives for deployment onto the application server. However, a number of files must be updated before the application server can provide support for a component. Web components are packaged into WAR files that contain all the files needed to support that component. These may include HTML pages, Java Server Pages, servlets, or image files. Enterprise JavaBeans are packaged into JAR files with all their supporting class files. When deploying groups of packages together, they are placed in an EAR (Enterprise Archive) that contains all of the JAR, WAR, and other files needed for that package. An entire application can be packaged into one EAR archive that is deployed to the application server.
Deploying an application to Oracle Application Server 10g requires that a number of support files be updated. For this reason Oracle recommends that you use Oracle Enterprise Manager to deploy your application. Alternately, your developers can deploy components to the application server directly from JDeveloper. You can also deploy your application using the Java admin.jar tool. And finally, you can manually deploy your application and modify the appropriate files, but this is not recommended. Because this book focuses on administration of the Application Server and not on J2EE development, we are not going to discuss the mechanics of packaging a component for deployment. You should receive the application properly packaged from the developers.
Since you have Enterprise Manager (if you are running Application Server 10g), we will discuss using EM to deploy an application. For the purpose of this exercise, we are going to deploy an EAR file from the administrator's computer (running the browser) to the application server using Enterprise Manager. The file we are going to deploy is called petstore.ear, and it was sent to us by the developer ready to deploy. The application is going to be deployed into the OC4J container called OC4J_Demos, which was created when we installed the Application Server. Once you start Enterprise Manager, navigate to the instance where the application will be deployed. If EM is not running, you need to start it.
ORACLE_HOME/bin/emctl start em
At the top of the status page is a link to J2EE Applications. Selecting this link will display a list of current applications installed on all OC4J instances.
Return to the instance status page. For this exercise, we are going to use the OC4J_Demos container. Selecting the OC4J_Demos link displays the OC4J Status page, where you can configure, start, or stop the OC4J container (covered in the next chapter). It also lists the current EAR files deployed inside this container. Enterprise Manager lists two deployed EAR files: FAQApp and transtrace. To deploy the petstore.ear file, select the Deploy Ear File button located in the Applications section.
About the authors
A senior Oracle trainer with Burleson Consulting, John Garmany is also a respected Oracle expert and author and chosen by Oracle Press to write the "officially authorized edition" for the "Oracle Application Server 10g administration handbook." John also serves as a writer for DBAZine, "Oracle Internals" and has authored several popular Oracle books.
Don Burleson is one of the world's top Oracle database experts with more than 20 years of full-time DBA experience. He specializes in creating database architectures for very large online databases and he has worked with some of the world's most powerful and complex systems. Don's professional Web sites include www.dba-oracle.com and www.remote-dba.net.