Skip Headers

Oracle9i Application Server Migrating From WebLogic
Release 2 (9.0.2)

Part Number A95109-01
Go To Documentation Library
Home
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to next page

A
Oracle9iAS 1.0.2.x and WebLogic Server 6.0 Comparison

This appendix provides a comparison of performance and features between Oracle9iAS version 1.0.2.2.x and BEA Systems' WebLogic Server 6.0. (Oracle9iAS 1.0.2.2 is the predecessor Oracle9iAS 9.0.2.)

This chapter is organized as follows:

Introduction

In response to Oracle's delivery of a 100% J2EE 1.2 standards compliant J2EE container in Oracle9iAS 1.0.2.2, which is both feature-rich and highly optimized for Java execution, the primary competitors in the application server market have responded with several claims to both feature and performance differentiation to Oracle9iAS.

To provide Oracle's customers with a fair and accurate representation of the actual facts when comparing Oracle9iAS 1.0.2.2 against the most recent release of WebLogic Server 6.0, this chapter provides the specific details comparing Oracle9iAS' J2EE facilities with this product.

This chapter is structured in two parts:

The objectives of this chapter are to provide Oracle's customers and potential application server customers with a clear and objective analysis of the capabilities of Oracle9iAS' J2EE facilities.

Performance Results and Analysis

In order to compare the relative performance of Oracle9iAS 1.0.2.2's J2EE container vs WebLogic Server 6.0, Oracle ran a formalized benchmark test comparing various aspects of the performance of the Oracle9iAS J2EE container against WebLogic Server 6.0 (the production version available at the time of our benchmarking effort). The goals were to measure the comparative performance of the J2EE containers of the two application servers along the following objective set of guidelines:

The results of the performance and scalability comparisons are as documented below.

Performance and Scalability Results

Although the characteristics of the individual tests varied, Oracle9iAS demonstrated superior performance to WebLogic Server in all tests. We stopped the tests at the point where the application server's average response time was increasing exponentially, but all indications suggest that Oracle9iAS can be scaled to much higher user loads and configurations. On average, Oracle9iAS performance (based on response times) was 2-5 times better than WebLogic Server. On average, Oracle9iAS demonstrated much superior scalability (based on CPU utilization) compared to WebLogic Server. CPU utilization was about 2 times less than WebLogic Server. Even at lower user loads, Oracle9iAS used significantly less hardware resources than WebLogic Server.

Feature Comparison

The section above clearly documents the relative performance and scalability differences of Oracle9iAS' J2EE container with WebLogic Server. The results showed that the Oracle9iAS' J2EE container yielded better performance and used less CPU and memory than WebLogic Server on all the tests. In response to these benchmark results, BEA falsely claims that Oracle9iAS' J2EE container lacks several features. To address these concerns, this section specifically examines the J2EE features in Oracle9iAS against WebLogic Server.

Installation and Configuration

BEA has claimed that Oracle9iAS has a very heavyweight disk and memory footprint and is, as a result, difficult to install and configure. In doing so, they falsely compare the relative disk and memory requirements for their J2EE containers with the requirements for all of Oracle9iAS, which includes a directory server, an enterprise portal, a cache, business intelligence, and several other capabilities. Their comparisons are not accurate. Accurate comparisons are shown in Table 6-2.

Table 6-2 Disk and Minimum Memory Configurations for J2EE Containers
Issue Oracle BEA

Download Size

10 MB

32 MB

Disk Space

15 MB

45 MB

Minimum Memory

20 MB

256 MB

To address these claims, we compare the disk and memory requirements for Oracle9iAS J2EE container with those of WebLogic Server - the requirements for WebLogic Server are taken from BEA's product documentation. The facts highlight these important results:

Performance and Scalability

Having considered the relative ease of installation and configuration, let us examine the fundamental reasons for the performance and scalability differences between Oracle9iAS and WebLogic Server. There are a number of reasons that drive the measured performance differences that were documented in the previous section.

J2EE Container Features

Table 6-2 lists the J2EE features of a J2EE container and the implementation currently supported by Oracle and BEA.

Table 6-3 J2EE Features of J2EE Containers
J2EE Compliance Oracle BEA

EJB

1.1

1.1 (early 2.0)

Servlets

2.2

2.2 (early 2.3)

JSP

1.1

1.1 (early 1.2)

JDBC

2.0

2.0

JNDI

1.2

1.2

JMS

1.0.2

1.0.2

Clustering Support

Application server clustering (not to be confused with database clustering) essentially means the use of a group of application servers that coordinate their actions in order to provide scalable, highly-available services in a transparent manner. There are three requirements here:

From a comparative point of view, Oracle9iAS' J2EE container provides the following facilities:

Sample Migration Case Study

This section describes in detail the steps used to migrate an application from WebLogic Server 6.0 to Oracle9iAS 1.0.2.2.1.

Migration was done on a Windows 2000 system with OC4J connected to an Oracle 8.1.7 database and JDK 1.3.1 as runtime environment for OC4J.

  1. Classpath and Libraries. As several commonly used classes, including apache SOAP 2.2 had to be accessible we created the following startup script to set the appropriate environment.

    >d:
    >cd \oracle\oc4jv1\j2ee\home
    >set java_home=d:\jdk1.3
    >set path=d:\jdk1.3\bin;%path%
    >set CLASSPATH=D:\oracle\oc4jv1\j2ee\home\orion.jar;
    D:\OrderServerNew\OrderServer.jar;D:\OrderServerNew\DataItemCore.jar;
    D:\OrderServerInstall\OrderServerJars\jdom.jar;
    D:\OrderServerInstall\OrderServerJars\activation.jar;
    D:\OrderServerInstall\OrderServerJars\imap.jar;
    D:\OrderServerInstall\OrderServerJars\mail.jar;
    D:\OrderServerInstall\OrderServerJars\mailapi.jar;
    D:\OrderServerInstall\OrderServerJars\pop3.jar;
    D:\OrderServerInstall\OrderServerJars\smtp.jar;
    D:\OrderServerInstall\OrderServerJars\soap.jar;
    D:\OrderServerNew\Performance.jar
    
    >java -hotspot -Xss128k -ms128m -mx128m -cp %CLASSPATH% 
    -Dplot.home=D:\OrderServerNew\OC4JRepository 
    -Dplot.orderserver.url=ormi://localhost:23791 
    -Dplot.orderserver.factory=com.evermind.server.rmi.RMIInitialContextFactory 
    -Dplot.orderserver.principal=admin -Dplot.orderserver.credential=admin 
    -Dplot.orderserver.EJBAppName=OrderServer 
    com.evermind.server.ApplicationServer -verbosity 10
    
    

    Doing benchmarks we discovered that there are several problems when including another XML parser (xerces.jar) in the classpath. Development also recommends to start OC4J with java -jar -orion.jar (so the manifest file in the orion.jar is used). It can slow down OC4J to 50% of it's normal performance. So, if the application, e.g. Apache SOAP, needs an XML parser, then include it in the WEB-INF\lib directory and change the entry in the web.xml file for the XML-Parser as follows.

    <init-param>
       <param-name>XMLParser</param-name>
       <param-value>org.apache.crimson.jaxp.DocumentBuilderFactoryImpl
       </param-value>
    </init-param>
    
    

    We tried the crimson parser and it worked faster than xerces.

    The second thing we discovered doing benchmarks with WebLogic Server 6.0 which uses its internal JDK1.3.0 and OC4J using JDK1.3.1 was that the java -server option gives very bad performance for OC4J.

    Using java -hotspot instead, WebLogic Server had 2 times better performance for looping through a large JDBC result set. OC4J had 4 times better performance with the same operation.

  2. Automatic invocation of a class at server startup, WebLogic Server 6.0 has a parameter weblogic.system.startupClass.initialise=<class-name> that enables automatic initialization of environment constants and services at startup.

    To get similar behaviour in OC4J we created an startup application as java enterprise client, put it in an .ear and set two parameters in the config files.

    server.xml:

    <application name="Startup" parent="OrderServer" 
     path="../applications/startup.ear" auto-start="true" />
    
    

    application.xml for Startup.ear

    <application>
       <display-name>StartupSettings</display-name>
       <module>
          <java>Start.jar</java>
       </module>
    </application>
    
    

    Example of a startup class:

    import my.util.StartupHelper;
    
    public class OracleASStartupClient {
       private static void startup() {
          StartupHelper.setConstantswithProperties();
          StartupHelper.cacheSettings();
          StartupHelper.installClientInteface();
          StartupHelper.installLogging();
       }
    
       public static String startBatch (String name, Hashtable args) throws 
          Exception {
    
          Object obj =  Class.forName(name).getConstructor(
             new Class[]{Class.forName("java.util.Hashtable")}).newInstance(
             new Object[]{args});
    
          if (obj instanceof Thread) {
             ((Thread)obj).start();
             }
          else throw  new Exception("Class to start must be of Type Thread");
          // Write your startup code here...
          return  "BatchStarter Successfully completed.";
       }
    
       public static void main(String[] args) {
          System.out.println("***** STARTUP begin ********************");
          startup();
    
    /*    try {
            startBatch("my.orderserver.batch.MessagePersisterBatch", 
               new Hashtable());
         catch(Exception e) {
         e.printStackTrace();*/
    
          System.out.println("******* STARTUP end *********************");
          return;
       }
    }
    

  3. Adapt application from WebLogic Server global JNDI context to OC4J specific context. The JNDI tree in WebLogic Server enables each enterprise application to see all other ear's methods. In OC4J, it is standards compliant, and therefore, we had to use the parent-application parameter in server.xml (see 2 above). The following class was used to establish the JNDI context:

    public static Context getInitialContext (boolean security) throws 
    Exception {
       Hashtable env= new Hashtable();
       env.put(Context.INITIAL_CONTEXT_FACTORY,Constants.OS_FACTORY);
       env.put(Context.PROVIDER_URL, Constants.ORDERSERVER_URL);
       if(security) {
          env.put(Context.SECURITY_PRINCIPAL, 
                  Constants.ORDERSERVER_PRINCIPAL);
          env.put(Context.SECURITY_CREDENTIALS, 
                  Constants.ORDERSERVER_CREDENTIAL);
          try {
             Context ctx = new InitialContext(env);
             return ctx;
          }
          catch (Exception e) {
             e.printStackTrace();
          }
          return  new InitialContext();
    }
    

  4. Enable call-by-reference for EJB methods. As the application was programmed to make use of call-by-reference for EJB method calls, we had to set this behaviour (default is call-by-value) in orion-ejb-jar.xml.

    orion-ejb-jar.xml for OrderServerGroup:

    <?xml version="1.0"?>
    <!DOCTYPE orion-ejb-jar PUBLIC "-//Evermind//DTD Enterprise JavaBeans 1.1 
    runtime//EN" "http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd">
    
    <orion-ejb-jar deployment-version="1.0.2.2.1" deployment-time="eadf228126">
       <enterprise-beans>
          <session-deployment name="AblaufsteuerungBean"
          location="AblaufsteuerungBean" wrapper=
          "AblaufsteuerungHome_StatelessSessionHomeWrapper1" timeout="0"
          persistence-filename="AblaufsteuerungBean" />
    
          <session-deployment name="OrderService" copy-by-value=false
          location="OrderService" wrapper=
          "OrderServiceHome_StatelessSessionHomeWrapper3" timeout="0"
          persistence-filename="OrderService" />
    
          <session-deployment name="TransparentService"
          location="TransparentService" wrapper=
          "TransparentServiceHome_StatelessSessionHomeWrapper5" timeout="0" 
          persistence-filename="TransparentService" />
       </enterprise-beans>
    
       <assembly-descriptor>
          <default-method-access>
             <security-role-mapping name="&lt;default-ejb-caller-role&gt;" 
             impliesAll="true" />
          </default-method-access>
       </assembly-descriptor>
    
    </orion-ejb-jar>
    

  5. Enable connection pooling with OC4J. We used the same Oracle JDBC 2.0 drivers classes12.jar for WebLogic Server and Oracle9iAS. To enable connection pooling, we had to switch off MTS on Oracle 8.1.7. We used the ejb-location in the following data-sources.xml config file:

    <data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="OrderServerDS"
    location="myOrderServerDS"
    pooled-location="pooledOrderServerDS"
    xa-location="jdbc/xa/OrderServerXADS"
    ejb-location="OrderServerDS"
    connection-driver="oracle.jdbc.driver.OracleDriver"
    username="plot"
    password="plot"
    url="jdbc:oracle:thin:@localhost:1529:o8i"
    inactivity-timeout="3600"
    min-connections="20"
    max-connections="100"
    />
    

  1. Transaction timeout for EJB's. During benchmarking, we discovered in some tests that the EJB container ran into a time-out and rolled back transactions. To fix that, we set the timeout parameter in orion-ejb-jar.xml to zero (no time-outs).

    <enterprise-beans>
       <session-deployment name="TransparentService" 
       location="TransparentService" 
       wrapper="TransparentServiceHome_StatelessSessionHomeWrapper5" timeout="0" 
       persistence-filename="TransparentService" 
       />
    </enterprise-beans>
    
    

Go to previous page Go to next page
Oracle
Copyright © 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Table Of Contents
Contents
Go To Index
Index