Skip Headers
Oracle® Containers for J2EE Deployment Guide
10g Release 3 (10.1.3)
Part No. B14431-01
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

1 Getting Started

This chapter provides an introduction to deploying J2EE-compliant applications and standalone modules into OC4J. It includes the following topics:

Understanding Deployment in OC4J

As a J2EE 1.4 -compliant container, OC4J provides a J2EE-compliant infrastructure for deploying, undeploying and redeploying J2EE-compliant applications and modules.

A number of deployment options are provided with OC4J. See "Options for Deploying into OC4J" for an overview of these tools.

Valid Components for Deployment

Components that can be deployed into an OC4J instance include:

  • A Web application packaged as a Web Application Archive (WAR) file

  • Standalone modules packaged as Java Archive files (JARs) containing Web Services, Enterprise JavaBeans (EJB JAR), application clients (CAR) or resource adapters (RAR)

  • A complete J2EE application packaged as an Enterprise Archive (EAR) file, which may contain zero of more of the archives listed above

All J2EE-compliant archive files deployed into OC4J must be packaged in accordance with the guidelines specified in the J2EE 1.4 specification. This includes packaging the J2EE standard deployment descriptors required for each type of component, such as J2EE Application Descriptor (application.xml) for applications and the J2EE Web Descriptor (web.xml) for Web modules.

See the ÒApplication Assembly and DeploymentÓ chapter of the Java 2 Platform Enterprise Edition Specification, version 1.4 for details.

Support for the J2EE Application Deployment API (JSR-88) in OC4J

The OC4J deployment infrastructure implements the functionality outlined in the J2EE Application Deployment API (JSR-88), which defines a standard API for configuring and deploying J2EE applications and modules into a J2EE-compatible environment.

Specifically, the JSR-88 compliant features in OC4J provide the ability to:

  • Start an application immediately upon deployment, making it available to clients

  • Stop an application, making it unavailable to clients

  • Undeploy an application or module

  • Redeploy an application or module, essentially updating the currently installed application with an updated version

  • Create a deployment plan containing the aggregated OC4J-specific configuration data needed to deploy a component into OC4J. See Chapter 8, "Working With Deployment Plans", for details on the JSR-88 implementation in OC4J.

ÒHot DeploymentÓ in OC4J

The term hot deployment refers to the process of deploying archive files - EARs, WARs, JARs, etc. - and their associated XML descriptor files on a production application server without shutting down or re-starting (bouncing) the server.

Hot deployment or redeployment of an application or standalone module into OC4J is generally supported as long as no changes are made during the deployment process to existing data source, JMS or RMI configuration files, and the structure of an Enterprise JavaBean replacing an existing EJB has not changed.

In addition, libraries at the container level cannot be deployed in this manner. If an application is dependent upon a newer library, OC4J must be restarted.

See "Redeploying an Application" for details on redeploying applications to an OC4J instance.

Options for Deploying into OC4J

You have a number of options for deploying applications into OC4J, including utilities packaged with OC4J.

Most of these options allow you to deploy an application to a "group" of instances within an Oracle Application Server cluster. A group is defined as a loosely syncronized set of like-named OC4J instances within the same cluster topology. For example, all instances named home within a cluster would collectively form a group across which an application can be deployed.

Application Server Control Console User Interface

The Oracle Enterprise Manager 10g Application Server Control Console provides a Web-based user interface for completing deployment-related tasks, including:

  • Deploying, undeploying and redeploying standalone modules (WARs, CARs, etc.) into the selected OC4J instance

  • Creating and editing re-usable deployment plans

  • Setting application-specific security and application clustering configurations

  • Importing shared libraries for use by the application, as well as modifying the list of inherited libraries

  • Deploying to a specific OC4J instance or to a group of instances within an Oracle Application Server cluster

Because it provides such robust functionality, Application Server Control Console should be your first choice for performing deployment-related tasks.

See Chapter 9, "Deploying with Application Server Control Console" for details.

OC4J Ant Tasks

OC4J includes a set of Ant tasks for executing deployment tasks on an OPMN-managed OC4J instance, a standalone OC4J server or across all OC4J instances within a cluster. These tasks provide another option for scripting the deployment process.

Specifically, you can:

  • Deploy, undeploy or redeploy an application (EAR), a standalone Web module (WAR) or a standalone resource adapter (RAR) to a specific OC4J instance or to a group of instances within a cluster

  • Incrementally update a deployed EJB module with modified classes

  • Stop or start a specific application, on a specific OC4J instance or cluster-wide

See Chapter 10, "Deploying with the OC4J Ant Tasks" for an overview of the deployment-specific Ant tasks and guidelines for integrating the tasks into your application build process.

admin_client.jar Command Line Utility

The admin_client.jar tool provided with OC4J can be used to execute deployment tasks to an OPMN-managed OC4J instance, to a standalone OC4J server or across all OC4J instances within a cluster. Specifically, you can:

  • Deploy, undeploy or redeploy an application (EAR), a standalone Web module (WAR) or a standalone resource adapter (RAR) to a specific OC4J instance or to a group of instances within a cluster

  • Incrementally update a deployed EJB module with modified classes

  • Stop or start a specific application, on a specific OC4J instance or cluster-wide

See Chapter 11, "Deploying with the admin_client.jar Utility" for instructions on using this tool.

admin.jar Command Line Utility

The admin.jar command-line utility provided with OC4J can be used to deploy applications to a standalone OC4J server only. It cannot be used to deploy applications to an OPMN-managed OC4J instance.

  • Deploy, undeploy and redeploy a J2EE application packaged within an EAR file

  • Deploy, undeploy and redeploy a standalone resource adapter packaged within an EAR file

  • Update an EJB module within a deployed application

Note that deployment of a standalone Web module packaged in a WAR file is not supported.

See Chapter 12, "Deploying to Standalone OC4J with admin.jar" for instructions on deploying applications with this tool.

Oracle JDeveloper

Oracle JDeveloper 10g is a J2EE integrated development environment with end-to-end support for developing, debugging, and deploying e-business applications and Web services.

JDeveloper allows you to build J2EE applications and Web services from scratch, or jump-start the process by beginning with a J2EE framework. Whichever approach you prefer, JDeveloper offers a full suite of productivity tools to support your work from start to finish.

JDeveloper provides the ability to deploy a J2EE application into an OC4J instance directly from within the project structure. It also allows a deployment plan to be created and optionally saved as an XML file.

See the online help provided with JDeveloper for instructions on deploying applications.