3 Introduction to Oracle WebLogic Server for OC4J Users

In past releases, Oracle Application Server included Oracle Containers for Java EE (OC4J), which provided an industry-standard container for developing, deploying, and managing your Java EE applications.

For Oracle Fusion Middleware 11g, OC4J is replaced with Oracle WebLogic Server.

As a result, the core architecture of Oracle Fusion Middleware is built around the WebLogic Server domain, which consists of an Administration Server and one or more managed servers.

Refer to the following sections for more information:

3.1 Key Oracle WebLogic Server Concepts for OC4J Users

The following sections provide some key concepts for OC4J users as they prepare to upgrade to Oracle WebLogic Server:

3.1.1 Comparing the OC4J and Oracle WebLogic Server Architectures

When comparing the topologies of OC4J and Oracle WebLogic Server, we can consider two basic topologies:

3.1.1.1 Standalone OC4J and Standalone Oracle WebLogic Server

Figure 3-1 compares a typical standalone OC4J instance with a standalone Oracle WebLogic Server domain. In both cases, HTTP requests to each are handled by built-in HTTP listeners.

In Oracle WebLogic Server, the managed servers are similar to the OC4J instances you configured in Oracle Application Server 10g. However, Oracle WebLogic Server always provides a dedicated administration server, which hosts the Oracle WebLogic Server Administration Console. The Administration Console provides a Web-based management tool for Oracle WebLogic Server, similar to the Application Server Control used to manage OC4J.

Note that you can configure a simple Oracle WebLogic Server development domain with no managed servers. In such an environment, you would deploy your applications to the administration server. However, more typically, the administration server is dedicated to hosting the Administration Console and you deploy your applications to one or more managed servers within the domain.

Figure 3-1 Comparison of Oracle WebLogic Server and OC4J Standalone Architecture

Description of Figure 3-1 follows
Description of "Figure 3-1 Comparison of Oracle WebLogic Server and OC4J Standalone Architecture"

3.1.1.2 OC4J and Oracle WebLogic Server Integrated With a Web Server

Figure 3-2 shows a typical Oracle Application Server 10g Release 2 (10.1.2) Integrated Web Server and OC4J middle tier installation and how it compares to a similar topology in Oracle Fusion Middleware 11g.

In Oracle Fusion Middleware, you must install and configure a separate Web tier installation, using the installation and configuration tools available on the WebTier and Utilities CD-ROM.

Figure 3-2 Comparison of Oracle WebLogic Server and OC4J with a Front-End Web Server

Description of Figure 3-2 follows
Description of "Figure 3-2 Comparison of Oracle WebLogic Server and OC4J with a Front-End Web Server"

3.1.1.3 OC4J and Oracle WebLogic Server Clustering Features

Oracle Application Server 10g Release 3 (10.1.3) introduced the following concepts related to clustering:

  • The Oracle Application Server cluster topology, which enables multiple Oracle Application Server instances to be managed from a single, active Oracle Enterprise Manager Application Server Control.

    From the Cluster Topology page in Application Server Control, you can view the multiple Oracle Application Server instances in the cluster topology and perform management tasks on those instances. The different instances within the cluster topology communicate via Oracle Notification Service (ONS).

  • OC4J Groups, which provides a mechanism for grouping OC4J instances within the cluster topology and performing group-wide tasks on all the OC4J instances at once.

    For example, after you created a group of OC4J instances, you can deploy an application to the group or modify data sources for the group. One key restriction is that each OC4J within the group must be identical in configuration to the other OC4J instances in the group.

  • OC4J Application Clustering, which is the habilitate to communicate state information among applications deployed to different OC4J instances within the cluster topology.

For more information about how these OC4J features compare to Oracle WebLogic Server, refer to the following:

  • Table 3-1 compares the OC4J clustering features with those available in Oracle WebLogic Server.

  • Figure 3-3 illustrates differences between OC4J and Oracle WebLogic Server clustering.

Table 3-1 Comparing OC4J Clustering Features with Oracle WebLogic Server

OC4J Feature Oracle WebLogic Server Equivalent Feature More Information

Oracle Application Server cluster topology

Oracle WebLogic Server domain

"Understanding WebLogic Server Domains" in the Oracle Fusion Middleware Understanding Domain Configuration for Oracle WebLogic Server

OC4J groups

Oracle WebLogic Server clusters

"Understanding WebLogic Server Clustering" and "Cluster Architectures" in Oracle Fusion Middleware Using Clusters for Oracle WebLogic Server

OC4J application clustering

Oracle WebLogic Server HTTP Session State Replication

"HTTP Session State Replication" in Oracle Fusion Middleware Using Clusters for Oracle WebLogic Server


Figure 3-3 Comparison of OC4J Groups and Oracle WebLogic Server Clusters

Description of Figure 3-3 follows
Description of "Figure 3-3 Comparison of OC4J Groups and Oracle WebLogic Server Clusters"

3.1.2 Comparing OC4J and Oracle WebLogic Server Directory Structures

The directory structure of a typical Oracle WebLogic Server domain differs from the directory structure of an Oracle Application Server 10g instance in several ways.

When you install Oracle Application Server 10g, you create a single Oracle home that contains the j2ee directory. The OC4J-specific configuration files and log files reside inside the j2ee directory.

In Oracle WebLogic Server, the installation is enclosed within a Middleware home. Within the Middleware home, the installer creates the Oracle WebLogic Server home directory. When you configure a domain, the Oracle WebLogic Server Configuration Wizard creates a new domain inside the user_projects directory.

Figure 3-4 shows the difference between the Oracle WebLogic Server and OC4J directory structures.

Figure 3-4 Comparison of the Oracle WebLogic Server and OC4J Directory Structures

Description of Figure 3-4 follows
Description of "Figure 3-4 Comparison of the Oracle WebLogic Server and OC4J Directory Structures"

3.1.3 Understanding Oracle WebLogic Server Domains for OC4J Users

The following sections are designed to help OC4J users learn about the features and capabilities of Oracle WebLogic Server domains:

3.1.3.1 Basic Content and Organization of a Domain

Depending on whether you are using 10g Release 2 (10.1.2) or 10g Release 3 (10.1.3), you organize your Oracle Application Server 10g environment in one of two ways:

  • In Oracle Application Server 10g Release 3 (10.1.3), you organize your applications servers and OC4J instances into a cluster topology.

  • In Oracle Application Server 10g Release 2 (10.1.2), you can add multiple Oracle Application Server instances into a farm and your OC4J instances into Oracle Application Server Clusters.

Oracle Fusion Middleware 11g uses an entirely different mechanism to organize your environment. The Oracle WebLogic Server environment is grouped into logical groups called domains. These domains consist of the following:

  • A single administration server, which is used to manage the domain.

  • One or more managed servers, which are used to deploy the Oracle Fusion Middleware Java components, as well as your custom Java EE applications.

In previous versions of Oracle Application Server 10g, you installed, created, and configured OC4J instances, and one or more Java Virtual Machines (JVMs) per OC4J instance.

In Oracle Fusion Middleware 11g, you configure an Oracle WebLogic Server domain with one administration server and one or more managed servers to deploy your Java EE applications.

3.1.3.2 Additional Facts About Oracle WebLogic Server Domains

The following sections provide more detailed information about Oracle WebLogic Server domains that can be helpful as you transition from an OC4J environment to an Oracle WebLogic Server environment:

3.1.3.2.1 A WebLogic Server Installation Can be Used to Configure Multiple Domains

As shown in Figure 3-4, the binary and configuration files associated with the OC4J instances you create are stored in a subdirectory structure inside the Oracle Application Server 10g Oracle home (the j2ee directory structure). Not only is this direct file system association required, but the relationship between the OC4J binaries and the configuration of instances is at a per instance level.

In contrast, Oracle WebLogic Server provides a clear separation between the installed software and its different configuration instances. A single Oracle WebLogic Server installation can be used to create multiple domains, each with a different set of servers.

By default, the Oracle WebLogic Server configuration wizard assumes that you will place the configuration files for each domain inside the user_projects/domains directory. However, the files associated with a domain can reside anywhere within the file system. For a WebLogic Server instance to run from a domain directory, the only requirement is that the Oracle WebLogic Server directory must be accessible.

Note also that in the WebLogic Server model, the relationship between the WebLogic Server binaries and the configuration of instances is at a per domain (set of instances) level.

3.1.3.2.2 A WebLogic Server Instance Is Always Associated With a Single Java Virtual Machine Process

OC4J executes on the Java Virtual Machine (JVM) of the standard Java Development Kit (JDK). By default, each OC4J instance uses one JVM. However, you can configure an OC4J instance so it runs on multiple JVMs. You can configure the OC4J instance in this manner using the numproc property or by using the Application Server Control console.

When you configure an OC4J instance to run on multiple JVMs, the OC4J instance is essentially running on multiple processes. This can improve performance and provide a level of fault tolerance for your deployed applications. However, multiple JVMs also require additional hardware resources to run efficiently.

There is no equivalent setting or capability in Oracle WebLogic Server. Instead, each server always runs on a single Java Virtual Machine. However, you can obtain the same capability as the OC4J numproc setting by increasing the number of managed servers running on the same host and within the domain.

3.1.3.2.3 A WebLogic Server Instance Processes All Application Requests on the Same Port by Default

An OC4J instance uses a different set of listen ports for each protocol for which it can accept requests. OC4J uses the concept of OC4J Web sites to configure specific HTTP, HTTPS, AJP, or AJPS ports (or port range) on each OC4J instance. Similarly, dedicated ports (and port ranges) can be configured on an OC4J instance for RMI and JMS traffic.

The WebLogic Server request port and protocol management model is by default different from OC4J's in two important ways:

  • First, an Oracle WebLogic Server instance is configured to have only two listen ports for incoming application requests: one port for accepting non-encrypted requests (which has to be set) and the other for accepting SSL encrypted requests (which is optional).

  • Second, these ports are configured to accept requests for all supported protocols as opposed to being dedicated to a specific one as is the case with OC4J instances.

Although in general, this default listening port model is sufficient for a majority of use cases, Oracle WebLogic Server offers a feature called network channels, which allows you to configure a WebLogic Server instance with additional ports dedicated to specific protocols. This feature can be used for the special use cases where such a configuration is required.

3.1.3.2.4 A WebLogic Server Instance Is Always Configured With an HTTP Listener and Does Not Support AJP

One of the supported OC4J configurations is a topology where a front-end Web server (in most cases, Oracle HTTP Server) is configured to receive incoming HTTP requests. The requests are then routed from Oracle HTTP Server to the appropriate OC4J instance via the AJP protocol. In this configuration, the OC4J instance does not receive HTTP requests directly and no HTTP listener is configured on the OC4J instance.

In contrast, an Oracle WebLogic Server instance must always accept HTTP requests and has no support for AJP. However, WebLogic Server domains can be (and frequently are) fronted by a Web tier for security and scalability purposes. A number of Web servers, including Oracle HTTP Server, are certified to act as a Web tier to servers within a WebLogic Server domain.

For more information, see Chapter 7, "Upgrading a Java EE and Web Server Environment".

3.2 Oracle WebLogic Server Installation and Configuration Tools for OC4J Users

Unlike Oracle Application Server 10g, Oracle WebLogic Server separates the tasks of installing and configuring your environment.

In Oracle Application Server 10g, you use Oracle Universal Installer to install and configure your Oracle Application Server environment, including the OC4J instances within that environment.

With Oracle WebLogic Server, you use two separate tools to install and configure your environment:

  • The Oracle WebLogic Server installer, which you use to create the Middleware home and place the necessary Oracle WebLogic Server files on disk, in preparation for configuring your Oracle WebLogic Server domains.

  • The Oracle WebLogic Server Configuration Wizard, which you use to create and configure your Oracle WebLogic Server domains.

This separation of installation and configuration tasks allows you create multiple domains from a single Oracle WebLogic Server instance, as described in Section 3.1.3.2.1.

3.3 Oracle WebLogic Server Administration Tools for OC4J Users

The following sections compare the administrations tools available for managing OC4J and Oracle WebLogic Server, as well as a summary of how you perform some typical management tasks in Oracle WebLogic Server:

3.3.1 Comparison of OC4J and Oracle WebLogic Server Administration Tools

The tools you use to administer an Oracle WebLogic Server domain are different than those you use to administer an OC4J-based environment:

  • Table 3-2 compares the equivalent administration tools for the two products.

  • Table 3-3 describes additional administration tools not available for OC4J.

For a complete list of the Oracle WebLogic Server administration tools, see "Summary of System Administration Tools and APIs" in Introduction to Oracle WebLogic Server.

Table 3-2 Comparison of OC4J and Oracle WebLogic Server Administration Tools

10g Release 3 (10.1.3) Administration Tool Equivalent Oracle WebLogic Server Administration Tools More Information

Oracle Enterprise Manager Application Server Control

Oracle WebLogic Server Administration Console

Note, that an additional Web-based management tool called Oracle Enterprise Manager Fusion Middleware Control is also available. You use Fusion Middleware Control to manage the farm and the OPMN-managed components of the farm.

"Overview of Oracle Fusion Middleware Administration Tools" in the Oracle Fusion Middleware Administrator's Guide

admin_client.jar

WLST (Oracle WebLogic Server command-line scripting tool)

"Getting Started Using the Oracle WebLogic Scripting Tool (WLST)" in the Oracle Fusion Middleware Administrator's Guide

opmnctl

opmnctl

Note that OPMN is supported in Oracle Fusion Middleware 11g, but only for managing specific Oracle Fusion Middleware system components.

For other configuration tasks in Oracle Fusion Middleware 11g, such as administering the managed servers in a domain, you use WLST.

"Getting Started Using Oracle Process Manager and Notification Server" in the Oracle Fusion Middleware Oracle Process Manager and Notification Server Administrator's Guide


Table 3-3 Additional Oracle WebLogic Server Administration Tools

Administration Tool Description

weblogic.Deployer

Oracle WebLogic Server provides a packaged deployment tool, weblogic.Deployer, to provide deployment services for WebLogic Server for ears, wars, rars, jars and other deployment artifact. Any deployment operation that can be implemented using the WebLogic deployment API is implemented, either in part or in full, by weblogic.Deployer.

This tool provides similar capabilities to OC4J admin_client.jar for Java EE artifact deployment. In earlier OC4J releases deployment to OC4J was provided by admin.jar and the dcmctl tooling.

Ant tasks

Oracle WebLogic Server provides a set of administration Ant tasks that allow for the execution of WebLogic Server administrative processes within Apache Ant scripts. These Ant tasks perform a similar type of function as the OC4J Ant tasks.


3.3.2 Typical Oracle WebLogic Server Administration Tasks for OC4J Users

The following sections describe some typical administration tasks and you perform them in Oracle WebLogic Server:

3.3.2.1 Starting and Stopping Servers

You can start and stop OC4J instances using Application Server Control or the OPMN command line (opmnctl). Similarly, you can start and top WebLogic server instances using the Oracle WebLogic Server Administration Console or the WebLogic Scripting Tool (WLST).

Additionally, WebLogic server instances can also be started through the start-up scripts available in the bin directory of the domain directory. These scripts include the startWebLogic script for starting the Administration server and the startManagedWebLogic script for starting the managed servers in a domain.

For more information, see Oracle Fusion Middleware Managing Server Startup and Shutdown for Oracle WebLogic Server.

3.3.2.2 Performing Diagnostics on a Domain

The diagnostics capabilities of Oracle WebLogic Server are provided through the WebLogic Diagnostics Framework (WLDF). WLDF provides features that meet or exceed the capabilities of the OracleAS Dynamic Monitoring Service (DMS), which was the monitoring server for Oracle Application Server 10g.

The WLDF features, which include dynamic code instrumentation, image capture, watches, and notifications, result in extended application diagnostics capabilities which can greatly reduce the total cost of ownership of maintaining Java EE applications.

Furthermore, WLDF capabilities can be exposed as custom dashboards within the Administration Console through the WLDF Console Extension features. Applications that currently use DMS can continue to do so in Oracle Fusion Middleware 11g.

Note that if you are using third-party application management tools, your third-party tools can typically be updated and continue operating against the upgraded applications running on Oracle WebLogic Server.

3.3.2.3 Viewing Log Files for a Domain

Oracle WebLogic Server Logging Services provides a comprehensive set of logging features similar to the Oracle Application Server 10g logging capabilities. The capabilities of the Oracle Diagnostics Logging (ODL) framework can also been integrated into Oracle WebLogic Server using the Java Required Files (JRF) template available in Oracle Fusion Middleware 11g.

For more information, see Section 5.1.4, "Using the Java Required Files (JRF) Domain Template".

As a result, if an application is using the ODL framework directly for logging, it does not require modification before you deploy it to Oracle WebLogic Server. The JRF ODL integration into WebLogic Server is as follows:

  • ODL log messages are sent to a log file that is kept on the file system separate from the Oracle WebLogic Server log files. they are stored in the following location:

    domain_directory/servers/server_name/logs/server_name-diagnostic.log
    
  • Critical messages (errors) are logged both in the ODL and Oracle WebLogic Server domain log file.

  • ODL log query and configuration JMX MBeans are available from the Administration server of the domain.

3.3.2.4 Configuring and Tuning Thread Pools

OC4J Server instances use different thread pools for different purposes (system, HTTP, and JCA are the default startup thread pools). The parameters of each thread pool (such as maximum and minimum thread counts) can be individually tuned to achieve an optimal application request throughput for a particular environment.

A Oracle WebLogic Server instance has by default a single thread pool, the thread count of which is automatically tuned to achieve maximum overall throughput. All requests are enqueued upon arrival in a common queue and prioritized according to administratively configured goals such as an application's desired response time or its fair-share usage of all available threads relative to other applications.

This Oracle WebLogic Server feature--referred to as WebLogic Work Managers--effectively allows Oracle WebLogic Server instances to self-tune their thread counts for optimal request processing.

For more information, see "Using Work Managers to Optimize Scheduled Work" in Oracle Fusion Middleware Configuring Server Environments for Oracle WebLogic Server.

3.4 Standards Support for OC4J and Oracle WebLogic Server

Table 3-4 compares the Java standards supported by OC4J and Oracle WebLogic Server.

Table 3-4 Comparison of Java Standards Supported by OC4J and Oracle WebLogic Server

Standard Version Supported by OC4J Version Supported by Oracle WebLogic Server

Java SE

6.0

6.0

Java EE

1.4/5.0

5.0

JSP

1.1 to 2.0

1.1 to 2.1

JSF

1.1

1.1 and 1.2

Servlet

2.2 to 2.5

2.2 to 2.5

EJB

2.1 and 3.0

2.1 and 3.0

JAX-WS

Not Supported

2.1

JAX-RPC

1.1

1.1

JMS

1.0.2b and 1.1

1.0.2b and 1.1

JNDI

1.2

1.2

JCA

1.5

1.5

JTA

1.1

1.1

JMX

1.2

1.2

Java EE Deployment

1.0

1.2

Java EE Management

1.0

1.1

JDBC

3.0

3.0