Skip Headers

Oracle9iAS Containers for J2EE User's Guide
Release 2 (9.0.2)

Part Number A95880-01
Go To Documentation Library
Go To Product List
Solution Area
Go To Table Of Contents
Go To Index

Go to previous page Go to next page

Configuration and Deployment

This chapter demonstrates how to configure and execute OC4J as simply and quickly as possible. You installed OC4J with the Oracle9iAS installation.

Within OC4J, you can execute servlets, JSP pages, EJBs, and SQLJ. As an example of deploying an application to OC4J, this chapter describes how to configure the familiar Pet Store demo.

This chapter includes the following topics:

OC4J Installation

OC4J is a lightweight container that is J2EE-compliant. It is configured with powerful and practical defaults and is ready to execute after installation. OC4J is installed with Oracle9iAS; therefore, see the Oracle9i Application Server Installation Guide for details on OC4J installation.

Using OC4J in an Enterprise or Standalone Environment

OC4J is installed within Oracle9iAS with the goal of managing J2EE enterprise systems. Oracle9iAS can manage multiple clustered OC4J processes. Oracle9iAS, which includes OC4J, is managed and configured through the Oracle Enterprise Manager, which can manage and configure your OC4J processes across multiple application server instances and hosts. Thus, you cannot locally manage your OC4J process using the admin.jar tool or by hand editing a single OC4J process' configuration files. This undermines the enterprise management provided by the Enterprise Manager.

You can still execute OC4J as you have in the past. For those who want a single OC4J instance for development environments or simple business needs, you can download OC4J in standalone mode--complete with documentation.

This following sections discusses both management options in the following sections:

Also, the following section describes how to understand the OC4J documentation set:

Managing Multiple OC4J Instances in an Enterprise Environment

You manage Oracle9iAS, including OC4J, using Enterprise Manager within an enterprise system. This includes clustering, high availability, load balancing, and failover.

You configure each OC4J instance and its properties--within the context of an application server instance--using Enterprise Manager. After configuration, you start, manage, and control all OC4J instances through Enterprise Manager. You can group several OC4J processes in a cluster. You must use either the Enterprise Manager management tool or its command-line tools for starting, stopping, restarting, configuring, and deploying applications.


You cannot use the OC4J standalone tool--admin.jar--for managing OC4J instances created in an application server instance.

You can modify the XML files locally. If you do so, you must notify Enterprise Manager that these files have been hand edited through the Distributed Configuration Managment (DCM) component tool--dcmctl. The following is the command that you execute after hand editing an XML file:

dcmctl updateconfig -ct oc4j

DCM controls and manages configuration for Oracle9iAS instances and its Oracle HTTP Server and OC4J components. For more information on DCM, see Appendix A, "DCM Command-Line Utility (dcmctl)".

This book discusses how to start, stop, manage, and configure OC4J in an enterprise environment.

Managing a Single OC4J Instance

You can still use a single OC4J--outside of the Oracle9iAS environment. After downloading OC4J in from OTN, you can start, manage, and control all OC4J instances through oc4j.jar and the admin.jar command-line tool. You configure either through the admin.jar command or by modifying the XML files by hand.

Any standalone OC4J process is not managed by Enterprise Manager and cannot be used within an Oracle9iAS enterprise environment. Typically, you would use standalone for development or for a simple single OC4J instance Web solution.

Download the OC4J Standalone User's Guide for information on how to start, stop, configure, and manage your standalone process.

OC4J Documentation Set Assumptions

Aside from this book, the rest of the OC4J documentation set was written with a standalone mindset. These other books may refer to modifying XML files by hand and to using admin.jar for managing the instance. This book provides a good overview and familiarization of the Enterprise Manager configuration pages. It also guides you to understand the relationship of each Enterprise Manager page to its XML counterpart. Use the familiarity of the Enterprise Manager when reading the other OC4J books. You should be able to look at an XML representation and match it to the relevant Enterprise Manager field names.

Also, the Distributed Configuration Management (DCM) utility, dcmctl, provides a command-line alternative to using Enterprise Manager for some management tasks. The dcmctl tool uses the same distributed architecture and synchronization features as Enterprise Manager, thereby providing identical functionality in a format that is ideal for scripting and automation.

The following functions can be managed through DCM:

For other DCM commands that relate to OC4J, see Appendix A, "DCM Command-Line Utility (dcmctl)".

OC4J Communication

For HTTP applications, OC4J is preconfigured to execute behind the Oracle HTTP Server (OHS). You use the Oracle HTTP Server as a front-end listener and OC4J as the back-end J2EE application server.

However, for RMI-based applications--such as EJB and JMS--clients should send their requests directly to OC4J. See "Understanding and Configuring OC4J Listeners" for directions.

HTTP Communication

For all incoming HTTP communication within the application server environment, you use the OHS as a front-end listener and OC4J as the back-end J2EE application server. Figure 2-1 illustrates this as follows:

  1. A browser accesses the OHS listener for all HTTP requests. The Oracle HTTP Server is an Apache server. The default port number is 7777.

  2. OHS, through the mod_oc4j module, passes the request to the OC4J server. The connection between the OHS and OC4J uses the Apache JServ Protocol (AJP) on a port number negotiated during OC4J startup. AJP is faster than HTTP, through the use of binary formats and efficient processing of message headers.

Figure 2-1 HTTP Application Listener

Text description of config3.gif follows

Text description of the illustration config3.gif

The mod_oc4j module is preconfigured to direct all incoming HTTP requests under the j2ee/ Web context to OC4J. This is to separate incoming requests for JServ from those directed to OC4J. Thus, if you want to use the default routing, you can deploy your Web application into a servlet context that includes as its prefix j2ee/. However, any URL mapping you provide in the deployment wizard is automatically added to the mod_oc4j module. See "Configuring Oracle HTTP Server With Another Web Context" for information on what is added to mod_oc4j for you during deployment. For additional information on the mod_oc4j module, see the Oracle HTTP Server Administration Guide.


In Oracle9iAS version, the default OC4J Web site did not use the Oracle HTTP Server as a front-end, and it listened using the HTTP protocol on port 8888.


For optimum performance, run OC4J with the JDK that is installed with Oracle9iAS Release 2, which is JDK 1.3.x.

It is not necessary to add anything to your CLASSPATH to run OC4J, because it loads the Java JAR and class files directly from the installation directory, from the lib/ subdirectory, and from the deployed application EAR files.

Starting and Stopping the Oracle Enterprise Manager Web Site

To use the Oracle Enterprise Manager Home Pages, you must start the Oracle Enterprise Manager Web site. The Web site is automatically started after you install the application server. You must start it manually after each system reboot, or create a script to automatically start it during system boot.

If you need to start or stop the Management Server, use the commands shown in Table 2-1.

Table 2-1 Starting and Stopping Enterprise Manager
If you want to... Enter the command...

Start the Enterprise Manager Web Site

emctl start

Stop the Enterprise Manager Web Site

emctl stop

Verify the status of the Enterprise Manager Web Site

emctl status

The emctl command is available in the ORACLE_HOME/bin directory after you install Oracle9iAS.


If you have more than one Oracle home installed on your host computer, the Oracle home you installed first contains the active Oracle Enterprise Manager. The emctl command associated with the first Oracle home starts and stops the Web site on this host. To locate the active Oracle Enterprise Manager, view the contents of the file /var/opt/oracle/emtab.

You can also verify the Enterprise Manager Web Site is started by pointing your browser to the Web site URL. For example:


Creating or Deleting an OC4J Instance

A default OC4J instance is installed with the name of OC4J_home. You can create additional instances, each with a unique name within this application server instance.

To create a new OC4J instance, do the following:

  1. Navigate to the application server instance where you want the new OC4J instance to reside.

  2. Click Create OC4J Instance. This brings up a page that requests a name for the new instance. Provide a name in the field.

  3. Click Create.

A new OC4J instance is created with the name you provided. This OC4J instance shows up on the application server instance page in the Component section.

To delete an OC4J instance, select the radio button next to the OC4J instance you wish to delete, then click Delete.

OC4J Home Page

Most of the configuration and management of your OC4J instance occurs off its OC4J Home Page. When you create an OC4J instance off of the Oracle9iAS Instance Home Page, it creates an OC4J Home Page for configuration and management of your OC4J instance. Each OC4J instance has its own OC4J Home Page.

To navigate to an OC4J Home Page, do the following:

  1. Navigate to the application server instance where the OC4J instance resides.

  2. Select the OC4J instance by clicking on its name. This brings up the OC4J Home Page for that OC4J instance.

The OC4J Home Page consists of the following three sections:

To navigate to the OC4J instance home page, start Enterprise Manager and navigate to the application server instance page. From this page, select any configured OC4J instance or create a new instance.

General and Status

Figure 2-2 shows the General and Status sections of the OC4J Home Page. In this section, you can view metrics on your OC4J instance and its applications. In addition, you can start, stop, and restart all OC4J processes configured to this instance.

Figure 2-2 OC4J General Information

Text description of home.gif follows.

Text description of the illustration home.gif

Deployed Applications

Figure 2-3 shows the Deployed Applications section. In this section, you can deploy applications using the Deploy EAR file or Deploy WAR file buttons. After deployment, you can modify configuration for each application. See "Configuring the Pet Store Web Application Demo" or "Deploying Applications" for more information.

Figure 2-3 Deployed Applications

Text description of home_dep.gif follows.

Text description of the illustration home_dep.gif


Figure 2-4 shows the Administration section. This section enables you to modify the global configuration values. This includes configuration of OC4J services, such as RMI, JMS, and Web sites. In addition, you can configure data sources and security values that can be used by all deployed applications in this OC4J instance.

Figure 2-4 Administration Section

Text description of home_adm.gif follows.

Text description of the illustration home_adm.gif

Starting and Stopping OC4J

OC4J is installed with a default configuration that includes a default Web site and a default application. Therefore, you can start OC4J immediately without any additional configuration.

From the Oracle Enterprise Manager Web site, you can start, stop, and restart OC4J on one of two pages:

OC4J automatically detects changes made to deployed applications and reloads these applications automatically. Therefore, you do not need to restart the server when redeploying an application. However, you may have to restart OC4J if you modify fields in the RMI, data sources, or security configuration.

You can also start, stop, and restart using the DCM control command. See Appendix A, "DCM Command-Line Utility (dcmctl)" for directions.

Testing the Default Configuration

Start OC4J with the defaults through Enterprise Manager as follows:

  1. From the Oracle9iAS Instance Page, start either the whole Oracle9iAS instance or--at least--the Oracle HTTP Server and OC4J components. To start, click the Start All button for the Oracle9iAS instance or select the components and click the Start button.

  2. Test OC4J by specifying the following from a Web browser:


    Substitute the name of the host where the OHS is installed for <ohs_host>. This command displays index.html.

  3. Test a servlet deployed in OC4J during installation by specifying the following in a Web browser:


    This command returns a "Hello World" page. The HelloWorldServlet is automatically deployed with the OC4J installation.


    The examples and URLs in this guide use port 7777, which is the default port for the OHS Web listener. If you change the default port number of the OHS, then specify the new port number after the hostname, as follows:


Creating the Development Directory

When developing your application, Oracle recommends that you use consistent and meaningful naming conventions. As an example, you could develop your application as modules within a directory named after your application. All the subdirectories under this directory could be consistent with the structure for creating JAR, WAR, and EAR archives. Thus, when you have to archive the source, it is already in the required archive format. Figure 2-5 demonstrates this structure.

Figure 2-5 Development Application Directory Structure

Text description of config2.gif follows

Text description of the illustration config2.gif

Consider the following points regarding Figure 2-5:

Configuring the Pet Store Web Application Demo

This section describes how to configure and deploy Pet Store, which is a J2EE demo application from Sun Microsystems. All OC4J server configuration and modifications to the Pet Store application configuration have been performed for you. You can execute the Pet Store demo with minimal effort to see how OC4J works.


Displays of the screens for each step of the deployment wizard are shown in "Deploying Applications".

Downloading An OC4J-Ready Pet Store Demo

Download the Pet Store application from OTN in the file, which downloads version 1.1.2 of the Pet Store demo. This ZIP file contains an annotated version of this application, along with preconfigured OC4J XML files.

You must have a working Oracle database and an OC4J installation. You should use this installation for demonstration purposes only and not in a production environment. In this simplified version, we have pre-built the Pet Store demo using the Oracle database (instead of the default Cloudscape) and edited the configuration files to make the setup easy.

  1. Download the Pet Store application in from OTN. This ZIP file contains an annotated version of this application, along with preconfigured OC4J XML files.

  2. Unzip the file, which contains the following:

    1. steps.html--Steps on how to deploy the Pet store demo in standalone mode. This HTML file does not contain directions on how to deploy using the Oracle Enterprise Manager. The steps in this manual instruct you on how to deploy using Enterprise Manager.

    2. petstore.ear--The Pet Store demo is contained in petstore.ear.

    3. server XML configuration files are provided for you in file.

  3. Unzip the file to retrieve the server.xml, default-web-site.xml, and data-sources.xml files.

  4. Edit the data-sources.xml to point to your database by replacing the host, port, and sid in the url attribute for the database in this file, as follows:

  5. Create in your database the user estoreuser, and grant this user privileges to connect as SYSDBA to your database. You can create the user and grant privileges through the following command:

    SQL> grant connect, resource to estoreuser identified by estore; 
  6. Navigate to the OC4J Home Page on the Oracle Enterprise Manager Web site.

  7. Select default under the Default Application section. The default application is the automatic parent of each application and it holds global configuration for all deployed applications, such as the data sources used. You are going to add the data sources that Petstore uses in the default application.

  8. Add data sources. On the default application screen, scroll down to the Administration section and select Advanced Properties from the Properties column.

    Since the data sources are provided in a data-sources.xml file, add these data sources using the XML editor within Enterprise Manager. Select data-sources.xml in the filename column. This brings up a screen with XML in a text window. Merge in the data sources from the data-sources.xml that was provided within the of the Petstore download into this window. Do not overwrite other data sources already configured in this file. When finished, click the Apply button.


    Because you were provided the data-sources.xml file, you can add/modify this file directly through Advanced Properties. If you do not have the XML file, you can add the configuration details through the Data Sources option under the Resources column.

  9. Return to the OC4J Home Page and scroll to the Applications section. Click on the Deploy EAR File button. This starts the application deployment wizard.

  10. Read the Introduction to the deployment wizard. Click the Next button.

  11. Provide the EAR file and the name of your application in the Select Application page. Click the Browse button to find the petstore.ear file that you downloaded to your system. Type "petstore" in the application name field. Click the Next button.

  12. Provide the URL mappings for the servlet context on all Web modules in the Petstore application. The Petstore demo contains a single Web module, which should be mapped to the /estore servlet context. Type "/estore" in the URL mapping field and click the Next button.

  13. At this point, the Petstore demo does not need any additional configuration through the wizard. You can jump to the Summary page by clicking Finish.

  14. Read the summary of the Petstore application deployment. Click the Deploy button to complete the application deployment.

  15. On the OC4J Home Page, select "petstore" in the Name column of the Applications section. This shows the configuration and all deployed modules of the Petstore demo application. If the OC4J server is started, the application is automatically started.

  16. Execute the Pet Store application in your browser by accessing the OHS, where the default port is 7777.


    The Pet Store splash screen appears. Follow the instructions provided by the Pet Store application to load the Java Pet Store database tables.

Explanation of the Changes to the Pet Store Demo

You may be curious as to what is the difference between the 1.1.2 Pet Store demo available off of the Sun Microsystems site and the modified one we have provided. This section will discuss the modifications we made.

Although the development of J2EE applications is standardized and portable, the XML configuration files are not. You may have to configure multiple XML files before deploying any application to OC4J. The configuration necessary depends on the services that your application uses. For example, if your application uses a database, you must configure its DataSource object.

For basic applications, such as Pet Store, you normally deploy the application using the wizard and configure any DataSource necessary for this application. Before deployment, you must create a manifest for the application within the application.xml file. This can be included in addition to or in replacement of a MANIFEST.MF file. This file must be properly configured and included within the J2EE EAR file that is to be deployed.

Simple applications--including the Pet Store application--require the following basic steps:

Basic Step Pet Store Step Description Pet Store
  1. Create or obtain the application.

Create the J2EE application or obtain it from another party.


  1. Make any necessary server environment changes.

Set the JAVA_HOME variable.


  1. Modify any application XML configuration files.

The Pet Store application should have the appropriate header in the web.xml configuration file.


  1. Update the application manifest file.

Place the application.xml file in the appropriate directory.


  1. Build an EAR file including the application--if one does not already exist.

Use ANT to build an EAR file.


  1. Deploy application EAR file.

On the OC4J Home Page of Enterprise Manager, clicking the Deploy EAR File button starts a deployment wizard.


  1. Configure the database used.

Add the data source to either the global
or local data source configuration.


The following steps describe what modifications to make to deploy the Pet Store application into OC4J.

  1. We asked you to download the Pet Store demo from the Oracle OTN site. You could download it from the Sun Microsystems site and make these modifications yourself.

  2. Make any necessary server environment changes. You must set the JAVA_HOME variable to the base directory of the Java 2 SDK.

  3. Modify the errorpage.jsp to import the appropriate IO package. Add <%@ page import ="*" isErrorPage="true" %> to the jps1.1.2/src/petstore/src/docroot/errorpage.jsp file.

    This command prevents the Pet Store error page from throwing a "PrintWriter class not found exception".

  4. Modify any deployment descriptors in the application as necessary.

    1. Modify the web.xml configuration file to contain the correct header. In jps1.1.2/src/petstore/src/docroot/WEB-INF/web.xml, replace "Java 2 Enterprise Edition Reference Implementation" with "Oracle9iAS Containers for J2EE".

      This step, which is optional, updates the application server type of OC4J.

    2. Change the database type in the EJB deployment descriptor provided with the Pet Store application. This step enables data-access objects to work with an Oracle database instead of a Cloudscape database, which is the configured database type in the Pet Store application.

      In jps1.1.2/src/components/customer/src/customer_ejb.xml, replace OrderDAOCS with OrderDAOOracle.

  5. Update the application manifest file. For the Pet Store application, you must create an application.xml to act as the manifest file for the Pet Store demo and place it into the jps1.1.2/src/petstore/src/ directory. OC4J uses the application.xml file as the manifest file. See the application.xml file that was downloaded in the from OTN.

  6. Build an EAR file including the application. After modifying the key XML files within this application, rebuild the Pet Store application to integrate these configuration changes.

    1. Modify the contents of /src/petstore/src/build.xml to build the EAR file with the OC4J modifications.

    2. Execute jps1.1.2/src/petstore/src/build.bat in a DOS shell.

      You can also double-click on the build.bat file in Windows Explorer to execute this file. The build.bat file uses ANT. To learn more about the ANT file, go to the following Jakarta site:
  7. Configure an Oracle database in the OC4J DataSource definition.

    1. Copy the data source object definition from the data-sources.xml file contained in the into the Enterprise Manager data source configuration.

    2. Connect as SYS in SQL*Plus to add the estoreuser and grant it privileges by executing the following SQL command:

      grant connect, resource, create session to estoreuser
      identified by estore
  8. Deploy the application using the deployment wizard off the OC4J Home Page.

  9. Start both the OHS and the OC4J server.

    For instructions on configuring and starting the OHS, see the Oracle HTTP Server Administration Guide.

  10. Open your Web browser and then specify the following URL:


The Pet Store splash screen appears. Follow the instructions provided by the Pet Store application to load the Java Pet Store database tables.

Deploying Applications

This section describes how to deploy a J2EE application to the OC4J server. When you deploy an application using the deployment wizard, the application is deployed to the OC4J instance and any Web application is bound to a URL context so that you can access the application from OC4J.

To deploy your application, drill down to the OC4J Home Page and scroll to the Deployed Applications section. Figure 2-3 shows this section.


You can also deploy simple applications with the dcmctl command. See Appendix A, "DCM Command-Line Utility (dcmctl)" for directions.

Basic Deployment

Your J2EE application can contain the following modules:

Archive the JAR and WAR files that belong to an enterprise Java application into an EAR file for deployment to OC4J. The J2EE specifications define the layout for an EAR file.

The internal layout of an EAR file should be as follows:

Figure 2-6 Archive Directory Format

Text description of configa.gif follows

Text description of the illustration configa.gif

Archive these files using the JAR command in the <appname> directory, as follows:

% jar cvfM <appname>.EAR .

Note that the application.xml file acts as a manifest file.

Both of these buttons start an eight-step application deployment wizard, which guides you through deploying an application. In the case of the WAR file, the application.xml file is created for the Web application. Whereas, you must create the application.xml file within the EAR file. Thus, deploying a WAR file is an easier method for deploying a Web application.


You must still provide configuration for J2EE services, such as data source and security configuration.

Figure 2-7 shows the eight steps required for application deployment:

Figure 2-7 Deployment Wizard Steps

Text description of buttons.gif follows.

Text description of the illustration buttons.gif


The first page is an introduction to these steps. It reminds you to provide an EAR file with any OC4J-specific XML configuration files, if necessary. It also outlines some of the other steps in the deployment process.

Click the Next button to go to the next step in the wizard deployment process.

Select Application

Figure 2-8 shows the second page, which enables you to browse your system for the EAR file to be deployed. In addition, provide a name to be identified with this application. The application name is user-created and will be the identifier for the application in the OC4J Home page.

Figure 2-8 Designate EAR File

Text description of first.gif follows.

Text description of the illustration first.gif

When the application is deployed, the information in this step enables the following:

  1. Copies the EAR file to the /applications directory.

  2. Creates a new entry in server.xml for the application, as follows:

    <application name=<app_name> path=<path_EARfile> auto-start="true" 


    • The name variable is the name of the application you provided.

    • The path indicates the directory and filename where the EAR file is deployed.

    • The auto-start variable indicates if this application should be automatically restarted each time OC4J is restarted.

    For a description of the elements in server.xml, see "Elements in the server.xml File".

Click the Next button to go to the next step in the wizard deployment process.

Provide The URL Mappings For All Web Modules

Map any Web modules in your application to a specific URL for its servlet context. All OC4J servlet contexts must be prefixed with a slash "/". When you try to access any Web applications, you provide the host, port, and Web context.

For all Web modules, your URL mapping for this module includes the URL you bind in this screen. Thus, for the URL http://<host>:<port>/url_name, provide /url_name in the URL mapping screen of the wizard.

Text description of config5.gif follows

Text description of the illustration config5.gif

Click the Next button to go to the next step in the wizard deployment process.

Provide Any Resource Reference Mappings

Map any references resources in your application, such as data sources or mail queues, to physical entities currently present on the OC4J container. Note that if you need a specific resource, you must have already added this to the OC4J container before you deploy your application in order for you to match them in this step.

For most applications, the resource reference you must designate is the data source JNDI name. This screen does not configure the data source information, it only designates an already configured data source or a data source that you will be configuring later. Designate the JNDI location name of the data source that the application will be using.

Text description of config7.gif follows

Text description of the illustration config7.gif

Click the Next button to go to the next step in the wizard deployment process.

Specify Any User Manager

You can specify what User Manager to use for security. For complete security, we recommend that you choose the JAZN XML User Manager.

Figure 2-9 User Manager Choices

Text description of fourth.gif follows.

Text description of the illustration fourth.gif

As Figure 2-9 demonstrates, you must already have your User Manager set up and configured. Most of the entries requires an XML file that designates the security roles, users, and groups for your security mappings.

For more information on security and User Managers, see both the Chapter 8, "Security" and the Security chapters in the Oracle9iAS Containers for J2EE Services Guide.

Provide Any Security Role Mappings

Map any security roles defined in your application to existing users and groups. If you have defined a security role within your application, you can map this role to a security group or role. You do not define security groups and users in this screen. Users and groups are obtained from your user manager.

Text description of config8.gif follows

Text description of the illustration config8.gif

Click the Next button to go to the next step in the wizard deployment process.

For more information on security roles, see both the Chapter 8, "Security", the Security chapters in the Oracle9iAS Containers for J2EE Services Guide and the Oracle9iAS Containers for J2EE Enterprise JavaBeans Developer's Guide and Reference.

Publish Web Services

Publish any Web services defined in your application. This feature requires the UDDI registry. Web services are not installed with a core install.

If you have defined any Web services, they are shown in the following screen:

Text description of config10.gif follows

Text description of the illustration config10.gif

If you want to publish these Web services, then click on the Publish button. This leads you through the process of publishing your Web services. When finished, it brings you back to this screen.

Click the Next button to go to the next step in the wizard deployment process.

Summary of Deployment

At this point, you will receive a summary of your application deployment modules and configuration, as follows:

Text description of config11.gif follows

Text description of the illustration config11.gif

In order to deploy this application, click on the Deploy button. A message will be displayed that tells you that your application deployed. It may also mention if you did or did not publish any Web services.

Post-Deployment Application Modifications

You can modify any fields and add additional configuration by returning to the OC4J Home page, select the application name in the Applications section. This brings you to a screen with the details of the deployed application.

From within this screen, you can view the Web and EJB modules. In addition, you can add and modify application-specific properties, resources, and security options in the Administration section. It is in this Administration section, that you can add application-specific data sources or security groups or users mentioned in the deployment wizard.

Recovering From Deployment Errors

If the deployment process is interrupted for any reason, you may need to clean up the temp directory, which by default is /var/tmp, on your system. The deployment wizard uses 20 MB in swap space of the temp directory for storing information during the deployment process. At completion, the deployment wizard cleans up the temp directory of its additional files. However, if the wizard is interrupted, it may not have the time or opportunity to clean up the temp directory. Thus, you must clean up any additional deployment files from this directory yourself. If you do not, this directory may fill up, which will disable any further deployment. If you receive an Out of Memory error, check for space available in the temp directory.

To change the temp directory, set the command-line option for the OC4J process to<new_tmp_dir>. You can set this command-line option in the Server Properties page. Drill down to the OC4J Home Page. Scroll down to the Administration Section. Select the Server Properties page. On this page, Scroll down to the Command Line Options section and add the variable definition to the OC4J Options line. All new OC4J processes will start with this property.

Undeploying Web Applications

You can remove a J2EE Web application from the OC4J Web server by selecting the application in the Applications section of the OC4J Home Page (see Figure 2-3) and clicking the Undeploy button. This command removes the deployed J2EE application and results in the following:

Go to previous page Go to next page
Copyright © 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Go To Product List
Solution Area
Go To Table Of Contents
Go To Index