O'Reilly logo

Oracle Application Server 10g Essentials by Robert Stackowiak, Donald Bales, Rick Greenwald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Application Deployment

Application deployment is the process of making a J2EE application available to end users on an application server. OC4J can deploy a J2EE application in an EAR file or a WAR (Web Application aRchive) file. When deploying a WAR file, OC4J automatically wraps a WAR file in an EAR file. OC4J provides a mapping mechanism so that differences in deployment environments can be resolved during the deployment process. OC4J also supports application development by accessing servlets and EJBs from an operating system directory without requiring OC4J-specific deployment descriptors. The remainder of this section takes a closer look at how OC4J handles application deployment, starting with standard J2EE deployment.

J2EE Deployment

J2EE applications are typically composed of JSPs, servlets, and EJBs. In a well-written J2EE application, each program unit acts as a separate and distinct component. To facilitate the composition of components into a working application, J2EE components have a descriptor file. A descriptor file exposes any configuration parameters, such as database resources, so that they can be specified declaratively—that is, without changing a line of Java code.

EJBs are placed into a Java ARchive (JAR) file that contains the EJB, with any supporting custom classes, and a deployment descriptor file named ejb-jar.xml. There is typically one JAR file for each session or message-driven EJB, whereas a JAR file usually contains multiple entity EJBs because ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required