HomeOracle Page 5 - Creating, Copying, and Managing OC4J Instances
OC4J Administration Page - Oracle
In this second part of a multi-part series covering the management of OC4J and configuring J2EE applications with Oracle 10g Application Server, we focus in on OC4J instances. This article is excerpted from chapter eight of the Oracle 10g Application Server Exam Guide, written by Sam Alapati (McGraw-Hill; ISBN: 0072262710).
Using the OC4J Administration page, you can perform various OC4J server configuration tasks. You can also access other pages so you can set the directory and file paths for the default application and the configuration file. Under the Instance Properties section, you’ll see a set of links that will take you to the relevant page for configuring the OC4J server, the Web site, and the like. You can edit the key OC4J configuration file (the server.xml XML file) either by using the Server Properties link or by clicking on the Advanced Properties link. Under the Application Defaults section, there are links that enable the configuration of data sources, security, and JMS providers.
Let’s take a brief look at three important links under the Instance Properties section: Server Properties Page, Website Properties, and Advanced Properties.
Server Properties You can view and edit the OC4J server properties from the Server Properties page, as shown in Figure 8-3. You’ll find the following sections in the Server Properties page:
General Contains the name, server root, and configuration file names, which you can’t change after creating the OC4J instance. The default Web module properties field contains the global-web-applications.xml file. The Applications Directory field is the default directory for the EAR files of deployed applications. The deployment directory field lets you specify the default directory for placing modified module deployment descriptors.
Figure 8-3.Server Properties Page
Multiple VM Configuration Helps you configure multiple OC4J Java Virtual Machines.
Ports Enables the configuration of various ports. These ports include Remote Method Invocation (RMI), Java Message Services (JMS), AJP, and RMI-IIOP ports. The JMS, RMI, and RMI-IIOP were explained earlier in this chapter and AJP (Apache Java Protocol) is explained a little later in the chapter. The mod_oc4j module uses the AJP protocol to talk to an OC4J instance.
Command-line options Lets you configure Java executable commands.
Environment variables Helps set the environment for the OC4J instance.
Website Properties The Website Properties home page lets you specify which Web applications are loaded when you start the OC4J instance. The parameters you specify are stored in the configuration file named web-site.xml. The following list gives the two major sections on this page:
Default Web Module This section contains three nonconfigurable fields representing the name of the Web application, the name of the parent J2EE application, and whether the applications should be loaded when you start OC4J. Loading the applications at startup time improves application response time when the application is invoked for the very first time.
URL Mappings for Web Modules This is a table that provides information about all the Web modules contained in the OC4J container. Each module’s name, the URL to which it’s mapped, and whether it should be loaded on OC4J instance startup is specified in this section.
Advanced Properties You can view and edit any OC4J configuration file using the Advanced Properties page, as shown in Figure 8-4. As you can see, the Advanced Properties page contains a list of all the configurable files along with their locations. Click on server.xml (this configuration file is explained in detail later in
Figure 8-4.The OC4J Advanced Properties Page
this chapter), for example, if you wish to edit that file. That will take you to the Edit Server.xml page, which you can edit, thus modifying the configuration of the OC4J instance.
You can configure the following configuration files from the Advanced Properties page:
server.xml
default-web-site.xml
rmi.xml
jms.xml
global-web-application.xml
In addition to the foregoing configuration files, you can edit the following files if you access the Advanced Properties page from an application:
You can edit the application.xml, oc4j-connectors.xml, principals.xml and data-sources.xml files if you access the Advanced Server Properties page from the default application.
You can edit the principals.xml and the orion-application.xml files if you access the Advanced Server Properties page from any deployed application.
All the files mentioned here are discussed later in this chapter.
exam watch: If you want to modify the global definitions of the data-sources.xml and principals.xml files, you must modify them under the default application. If you want to modify them only locally, you must modify them under the deployed application