 |
|
Oracle9iAS TopLink
Oracle Application Server Tips by Burleson
Consulting |
Oracle9iAS TopLink is an important component
for Java developers because it provides a mechanism for making Java
objects persistent across sessions. In object-oriented
languages such as Java, C# or C++, objects can be instantiated and
destroyed according to the needs of the program.
The problem is that OO languages like Java
create objects in the RAM heap, and upon termination of the program,
all of the programs objects are destroyed. Oracle9iAS TopLink
is a persistence framework that enables object persistence by
supplying routines that can be invoked to store Java objects in
relational database tables (in any relational database that supports
JDBC). In addition, Oracle9iAS TopLink provides a GUI tool,
the Mapping Workbench, that greatly simplifies the task of mapping
Java objects and their attributes to database tables. TopLink
also provides powerful features like a query framework, object-level
transaction support, relationship mappings, object caching, and much
more. Prior to TopLink, the programmer would have to write
custom JDBC code to store and retrieve the Java object?s attributes
to/from a relational table. This is extremely time-consuming and
error prone plus difficult to change. TopLink is built on top of
JDBC but does not require developers to use JDBC (or even SQL!).
Oracle9iAS TopLink supports all J2EE compliant application servers,
and can be used to store object data from standard Java objects, as
well as entity beans. Please refer to the Oracle9iAS TopLink
documentation for more information.
Next, let?s introduce the main topic of this
text, the administration and management of Oracle9iAS.
Oracle9iAS Administration
Unlike an Oracle database, which has only a
few administrative interfaces (OEM, SQL*Plus), Oracle9iAS has many
administrative utilities. To make matters even more
challenging, the Oracle9iAS administrative tools are often tightly
coupled, as in the case of the Oracle9iAS web cache administration
pages and the Oracle HTTP server administration pages. Both of
these administrative interfaces are separate, yet they are closely
intertwined in the Oracle9iAS architecture.
Oracle9iAS provides two methods for
administration, the command-line interface and Oracle Enterprise
Manager. This book will show both methods, and the choice of
Oracle9iAS administration methods is largely a personal choice.
We will start with a review of each
administrative component and then look at using OEM and the command
line interfaces within each component.
Oracle9iAS Administrative Component
Overview
As an Oracle9iAS administrator it is your
job to become intimate with all of the Oracle9iAS management
components. Of course, your shop may not have some of the
optional components such as single sign-on, but it is imperative
that you understand the administrative components and how they fit
together. This section will review the general administration
tools, web cache administration tools and application layer
administration tools. Let?s take a closer look at each of
these sections.
Oracle9iAS general administration
components
Here are the main administrative interfaces
for the Oracle9iAS Infrastructure.
-
LDAP Server (OID) ? This is the
Oracle Internet Directory (OID) component of Oracle9iAS. The
LDAP server is the foundation of the Oracle9iAS automated
provisioning methodology, and the Oracle9iAS administrator must
manage the LDAP repository (the directory), to maintain
user-access privileges
-
Single Sign-On (SSO) ? The SSO
component provides for centralized management among all of the
Oracle9iAS components. Large shops may have dozens of
Oracle9iAS components, and SSO allows for easy password management
and access control.
-
Metadata Repository (isadb) ? The
isadb is an Oracle databases that stores configuration information
and metadata. This includes data used by LDAP, OMS and SSO.
-
Mod_osso Module ? The mod_osso
module is used to provide communication between the SSO-enabled
Login Server and the Oracle HTTP Server (OHS) listener. The
mod_osso module is controlled by editing the mod_osso.conf file.
Oracle9iAS web administration components
From the top-down, the webserver component
(web cache and OHS) is one of the most important components of
Oracle9iAS, and one where tuning is the most important. For
details on Oracle9iAS web cache and Oracle HTTP Servers, see Chapter
10.
-
Oracle HTTP server (OHS) ? This is
the HTTP listener software that intercepts incoming requests and
routs them to the appropriate Oracle9iAS component. Upon
completion of the transaction, the OHS send the completed HTML or
XML back to the originating IP address.
-
Web cache ? This component is
associated with am OMS instance and server to provide RAM caching
for images (gif?s and jpeg?s), as well as page content. The
Web Cache and the OHS are closely-coupled, and the tuning of the
Web Cache is addressed in Chapter 10.
Oracle9iAS application management
components
Moving down the Oracle9iAS hierarchy we next
see the administrative tools for application development, primarily
for Java applications. The Oracle9iAS administrator must use
these interfaces to ensure optimal configuration of their systems.
J2EE Server (OC4J) ? This component
allows you to deploy and manage Java-based applications. The
Oracle9iAS administrator must configure the J2EE server to ensure
proper communications between OC4J and other Oracle9iAS components.
Oracle Process Manager and Notification (OPMN)
? OC4J is started and managed with OPMN. OPMN is also
responsible for monitoring all Oracle9iAS processes and propagating
configuration changes across Oracle9iAS clusters.
Distributed Configuration Management (DCM)
? DCM is a handy command-line utility that can used instead of the
GUI for starting and stopping Oracle9iAS services.
Now that we see the different administrative
components, let?s take a review of how you can use Oracle Enterprise
Manager (OEM) or the command line interfaces to manage Oracle9iAS.
Command line interfaces or OEM?
As we have already noted, the Oracle9iAS
administrator has two choices for administering Oracle9iAS, the OEM
console GUI or the command line interfaces. Using the OEM
console, the GUI will issue the appropriate commands without you
having to memorize the syntax. On the other hand, many
experienced Oracle9iAS administrators find that the command-line
interface offers a full-range of administration commands.
Of course, some tasks must be done from the
command line interfaces. For example, you cannot use OEM until
the OMS is started, so you must issue the emctl start oms command
before you can use OEM. Internally, it makes no difference if
you use OEM or a command-line utility to manage Oracle9iAS.
This is because the OEM Console uses DCM (the dcmctl utility) to
make configuration changes and to propagate configuration changes
and deployed applications across the cluster.
WARNING: If you use the infrastructure and
you manually edit the configuration files, you may introduce
corruption into the Oracle9iAS Infrastructure. This is true for both
V9.0.2 and V9.0.3. Be sure to shutdown the Enterprise Manager
website (emctl stop) before using dcmctl to change configuration.
If/when both are used "at the same time" there is a strong
possibility that the infrastructure data may become corrupted
and you may have to re-install Oracle9iAS. The dcmctl -updateConfig
command can be used to notify the environment that config files were
updated so that the changes are properly picked up. This
requirement will be referenced throughout the book.
Let?s start with a quick tour of OEM for Oracle9iAS and then review
the command line interfaces.
This is an excerpt from "Oracle
10g Application Server Administration Handbook" by Don Burleson
and John Garmany.