Skip Headers
Oracle® Containers for J2EE Configuration and Administration Guide
10g Release 3 (10.1.3)
Part No. B14432-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
 

3 Tools for Administering OC4J

This chapter provides an overview of the administrative capabilities provided with OC4J. It includes the following sections:

Oracle Enterprise Manager 10g Application Server Control Console

The Oracle Enterprise Manager 10g Application Server Control Console is a JMX-compliant, Web-based user interface for deploying, configuring and monitoring applications within OC4J, as well as managing the OC4J server instance and the Web services used by your applications. This section covers the following topics:

See the online Help provided with Application Server Control Console for detailed instructions on using this interface.


Note:

The current release of Application Server Control Console does not provide management support for either OPMN or Oracle HTTP Server. Use the OPMN command-line tool, opmnctl, to start, stop and manage instances of these components.

Accessing Application Server Control Console in Standalone OC4J

The Application Server Control Console is installed and configured automatically when you install the OC4J software. It is started by default when OC4J is started.

The console is accessed through the default Web site, which is configured to listen for HTTP requests on port 8888. To access the console, simply type the following URL in a Web browser:

http://hostname:8888/em

Accessing Application Server Control Console in Oracle Application Server

The Application Server Control Console is installed and configured automatically when you install OC4J using the Oracle Universal Installer.

The console is started with all other installed Oracle Application Server components using the OPMN command-line tool, opmnctl, which is installed in the ORACLE_HOME/opmn/bin directory on each server node. Start all installed components by issuing the following command:

cd ORACLE_HOME/opmn/bin
opmnctl startall

In a typical Oracle Application Server installation, all Web applications, including Application Server Control Console, are accessed through Oracle HTTP Server (OHS). Use the following URL to access the console:

http://ohs_host_address:port/em

  • ohs_host_address is the address of the OHS host machine.; for example, server07.company.com

  • port is an HTTP listener port assigned to OHS by OPMN. Run the following opmnctl command on the OHS host machine to get the list of assigned listener ports from OPMN:

    opmnctl status -l
    
    

    Supply the port designated as http1 in the OPMN status output as the value for port:

    HTTP_Server | HTTP_Server | 6412 | Alive | 1970872013 | 1
    6396 | 0:48:01 | https1:4443,http2:722,http1:7779
    

Functional Overview of the Application Server Control Console Interface

The Application Server Control Console is organized into several functional areas, described below.

Applications

  • Start/stop applications, modules or standalone resource adapters deployed into the OC4J instance

  • Deploy, undeploy or redeploy an application or module

  • Create or edit a deployment plan as part of deploying an application

  • View statistics on HTTP requests and active EJB method calls

Administration

  • Manage J2EE services, including JMS and JTA

  • View and search for JNDI names

  • Create JDBC data sources and connection pools providing database access

  • Set JSP container properties

  • Configure security providers and manage users and roles

  • Access MBeans through the JMX MBean browser

  • Subscribe to event-driven JMX notifications

Performance

  • View graphs showing usage of CPU and memory resources by OC4J versus other active applications, as well as OC4J heap usage

  • View statistics on database connections and transaction activity, JVM usage, JSP and servlet requests and EJB methods

  • Query system for most-requested JSPs, servlets and EJBs

Web Services

  • Enable or disable a Web service

  • View metrics and statistics for Web services running within the instance

  • View the WSDL for a Web service

  • Test a Web service

  • Configure auditing, logging, reliability and security for a Web service

Logs

  • View log files for specific applications deployed into the OC4J instance

  • View logs for the default (global) application and Application Server Control Console

  • Search logs for specific message types and strings

  • View XML formatted log files for components using the Oracle Diagnostic Logging (ODL) framework

  • Retrieve Web service logs

See Chapter 10, "Logging in OC4J" for more on the logging capabilities provided by OC4J.

The admin_client.jar Command Line Utility

OC4J provides a command-line utility— admin_client.jar—that can be used to perform operations on active OC4J instances in an Oracle Application Server clustered environment as well as on standalone OC4J servers.

Among the tasks you can perform with this utility:

See Chapter 6, "Using the admin_client.jar Utility" for instructions on using this tool.

The admin.jar Command Line Utility

OC4J provides a command-line utility called admin.jar that can be used to perform operations on an active standalone OC4J instance. Among other things, you can use this utility to:

The utility is installed by default in ORACLE_HOME/j2ee/home. Note that OC4J must be started before this utility can be used. Also note that the utility cannot be used to start OC4J. See Chapter 7, "Using the admin.jar Utility" for instructions on using this tool.

The oc4j/oc4j.cmd Executable Scripts

The OC4J distribution includes executable scripts - a shell script for the Unix/Linux platforms and a batch file for the Windows platform - that can be used in an OC4J standalone configuration to start and stop a local OC4J instance, get the OC4J version, and complete the OC4J installation process.

The oc4j executable scripts are located in the ORACLE_HOME/bin directory. The scripts are platform-specific:

Both executables use the same syntax, which is as follows:

oc4j [options]

The set of options that can be passed to the executables is identical for both, as summarized below.

Table 3-1 Options for oc4j executables

Option Description
-start Starts the OC4J instance.
-shutdown -port ormiport -password password Stops the OC4J instance.

-port ormiport: You do not need to specify the port if OC4J is running on the default ORMI port, which is 23791.

-password password: Specify the oc4jadmin account password.

-version Returns the OC4J version number.

Oracle Process Manager and Notification Server (OPMN)

In a managed OC4J environment, OPMN is used to manage as well as start and stop all installed Oracle Application Server components, including all OC4J instances. OPMN also monitors OC4J and associated components, such as OHS. As a result, OPMN must be installed into each ORACLE_HOME to monitor installed Oracle Application Server components.

See the Oracle Process Manager and Notification Server Administrator's Guide for instructions on configuring and using OPMN.

A command-line utility, opmnctl, is used to control the OPMN daemon. The utility is installed by default in the ORACLE_HOME/opmn/bin directory on any machine hosting Oracle Application Server host components.


Note:

The current release of Application Server Control Console does not provide management support for either OPMN or Oracle HTTP Server. Use the OPMN command-line tool, opmnctl, to start/stop and manage instances of these components.

OPMN is configured through the opmn.xml configuration file, which is located in the ORACLE_HOME/opmn/conf directory. Most edits to this file must be made by hand, as the current release of Application Server Control Console does not provide a file editing capability.

The following is an abridged example of how OC4J configuration data is structured in the opmn.xml configuration file.

The following is an abridged example of the OC4J configuration data structure in opmn.xml:

<opmn>
 ...
 <ias-component id="OC4J">  <process-type id="home" module-id="OC4J" status="enabled">
    <module-data>
      <category id="start-parameters">
        <data id="java-options" value=" -Djava.awt.headless=true"/>
        <data id="java-bin" value="/jdk/bin"/>
        <data id="oc4j-options" value="-validateXML -verbosity 10"/>
      </category>
      <category id="stop-parameters">
        <data id="java-options" value="-Djava.awt.headless=true"/>
      </category>
    </module-data>
    <start timeout="600" retry="2"/>
    <stop timeout="120"/>
    <restart timeout="720" retry="2"/>
    <port id="default-web-site" protocol="ajp" range="12501-12600"/>
    <port id="rmi" range="12401-12500"/>
    <port id="jms" range="12601-12700"/>
    <process-set id="default_group" numprocs="1"/>
  </process-type>
 </ias-component>
</opmn>

Changing the oc4jadmin Account Password

The OC4J administrator account is created by default with the user name oc4jadmin. This account is required to invoke commands using the various tools provided with OC4J, such as the admin_client.jar command line utility, and can also be used to log in to Application Server Control Console.

The oc4jadmin account is assigned the oc4j-administrators role, which an account must have to manage users and roles. An account must also have this role to connect to the JMX MBean server.

The initial password for this account can be set when OC4J is installed; otherwise, you will be prompted to set it the first time OC4J is started. The password can later be changed through the Setup page in Application Server Control Console.

To change the password for the oc4jadmin account:

  1. Log in to Application Server Control Console as oc4jadmin.

  2. If multiple instances are configured, select the instance you want to change the password for. Otherwise, you will change the password for the OC4J instance the Application Server Control Console is running on.

  3. Click the Setup link located at the bottom of any page in the user interface.

  4. Change the password.