Oracle® Containers for J2EE Configuration and Administration Guide 10g (10.1.3.1.0) Part Number B28950-01 |
|
|
View PDF |
This chapter provides an overview of the administrative capabilities provided with OC4J. It includes the following sections:
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 for managing a standalone OC4J server, a group of OC4J instances within an Oracle Application Server cluster, and the Web services used by your applications. This section covers the following topics:
Accessing Application Server Control Console in Standalone OC4J
Accessing the Application Server Control Console in Oracle Application Server
Functional Overview of the Application Server Control Console Interface
See the online Help provided with Application Server Control Console for detailed instructions on using this interface.
Note: The current release of the Application Server Control Console supports some configuration of OPMN and starting and stopping Oracle HTTP Server, but not the Oracle HTTP Server configuration. For instructions on configuring OPMN and Oracle HTTP Server, see the Oracle Process Manager and Notification Server Administrator's Guide. |
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
The Application Server Control Console is installed and configured as an embedded component of OC4J. 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.
You can start all installed components by issuing the following command:
cd ORACLE_HOME/opmn/bin
opmnctl startall
For a cluster topology that includes multiple OC4J instances, if the OPMN configuration file for the cluster, opmn.xml
, does not include the sequential
option, you should use the -sequential
flag in the command:
cd ORACLE_HOME/opmn/bin
opmnctl startall -sequential
The sequential
option causes the OC4J instances to start sequentially. If you started the components in parallel, resource contention issues might occur. For information about how to specify the sequential
option in the opmn.xml
file, see "Setting Runtime Options in a Managed OC4J Configuration".
In a typical Oracle Application Server installation, all Web applications, including Application Server Control Console, are accessed through Oracle HTTP Server. Use the following URL to access the console:
http://ohs_host_address:port/em
ohs_host_address
is the address of the Oracle HTTP Server host machine; for example, server07.company.com
port
is an HTTP listener port assigned to Oracle HTTP Server by OPMN. Run the following opmnctl
command on the Oracle HTTP Server 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
The Application Server Control Console is organized into several functional areas, described in the following text.
Applications
Start or stop applications, modules, or standalone resource adapters deployed into an OC4J instance or group of instances within an Oracle Application Server cluster
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 an 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 an OC4J instance
View logs for the default application (which includes the global Web 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 11, "Logging in OC4J" for more on the logging capabilities provided by OC4J.
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:
Deploy an application (EAR), a standalone Web module (WAR), a standalone EJB module (EJB JAR), or a standalone resource adapter (RAR) to a specific OC4J instance or to a group of instances within an Oracle Application Server cluster
Undeploy an application, Web module, EJB module, or resource adapter
Incrementally update a deployed EJB module with modified classes
Create a new shared library
Create JDBC and JMS resources
Stop, start, or restart an OC4J instance
Stop, start, or restart a specific application, on a specific OC4J instance or on a group of instances cluster wide
See Chapter 6, "Using the admin_client.jar Utility" for instructions on using this tool.
OC4J provides a command-line utility called admin.jar
that can be used to perform operations on an active standalone OC4J instance.
Note: Theadmin.jar utility can be used only to manage a single OC4J instance in a standalone OC4J installation.
Due to its more advanced capabilities, the |
Among other things, you can use this utility to:
Shut down and restart a standalone OC4J instance
Restart a specific application
Deploy or undeploy applications to a standalone OC4J instance
Add, remove, or test a global or application-specific data source
The utility is installed by default in ORACLE_HOME
/j2ee/home
. OC4J must be started before this utility can be used, except when you upgrade data sources. Also, the utility cannot be used to start OC4J. See Chapter 7, "Using the admin.jar Utility" for instructions on using this tool.
The OC4J distribution includes executable scripts 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. - a shell script for the Unix/Linux platforms and a batch file for the Windows platform -
The oc4j
executable scripts are located in the ORACLE_HOME
/bin
directory. The scripts are platform-specific:
Before you use one of these scripts, the ORACLE_HOME
and JAVA_HOME
environment variables must be set, as described in "Set Environment Variables".
Both executables use the same syntax, which follows:
oc4j [options]
The set of options that can be passed to the executables is identical for both, as summarized in Table 3-1.
Table 3-1 Options for oc4j executables
Option | Description |
---|---|
|
Starts the OC4J instance. |
|
Stops the OC4J instance.
|
|
Returns the OC4J version number. |
|
Displays the syntax and set of options. |
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 Oracle HTTP Server. As a result, OPMN must be installed into each ORACLE_HOME
directory 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 supports some configuration of OPMN and starting and stopping Oracle HTTP Server, but not the Oracle HTTP Server configuration. For instructions on configuring OPMN and Oracle HTTP Server, see the Oracle Process Manager and Notification Server Administrator's Guide |
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.
Configuration data for each component is set in an <ias-component>
element, in which the id
attribute equals the component name, in this case default_group
.
Each individual OC4J instance created on the host machine is configured within a <process-type>
element. The id
attribute uniquely identifies the instance.
The <process-set>
element defines a group of OC4J processes created at startup.
The value of the id
attribute identifies the group and is appended to log files generated for processes within the group to aid in management.
The following element is an abridged example of the OC4J configuration data structure in opmn.xml
:
<opmn> ... <ias-component id="default_group"> <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"/> <port id="rmis" range="12701-12800"/> <process-set id="default_group" numprocs="1"/> </process-type> </ias-component> </opmn>
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 the 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 MBeanServer 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. All OC4J instances in a group within an Oracle Application Server cluster need to have the same password for the oc4jadmin
account so that you can access all of the instances through the Application Server Control Console and perform group operations. Also, all OC4J instances in an Oracle Application Server cluster must have the same password for the oc4jadmin
account to prevent problems with OPMN.
The password can later be changed, as described in Appendix A of the Oracle Application Server Administrator's Guide. The following guidelines apply to changing the oc4jadmin
password:
As a best practice, Oracle suggests that you use the oc4jadmin
account only for the initial login to the Application Server Control Console. After that, you should create a new account (and accounts for your fellow administrators) to use for your everyday work. The oc4jadmin
account and its password should be used only internally by the ascontrol
application, which uses that account to log into and manage the other OC4J instances in the Oracle Application Server cluster.
If you must change the oc4jadmin
password, you must change it for all OC4J instances in the cluster. Changing this password involves quite a few steps, which are documented in Appendix A of the Oracle Application Server Administrator's Guide. Specifically, the procedure to change the oc4jadmin
password for the Administration OC4J instance, which runs the active ascontrol
application, is different from the procedure to change the oc4jadmin
password for the remotely managed OC4J instances.