Skip Headers

Oracle9iAS Containers for J2EE User's Guide
Release 2 (9.0.2)

Part Number A95880-01
Go To Documentation Library
Go To Product List
Solution Area
Go To Table Of Contents
Go To Index

Go to previous page Go to next page

J2EE Overview

Oracle9iAS provides a complete set of Java 2 Enterprise Edition (J2EE) containers written entirely in Java that execute on the Java virtual machine (JVM) of the standard Java Development Kit (JDK). You can run Oracle9iAS Containers for J2EE (OC4J) on the standard JDK that exists on your operating system. Refer to the certification matrix on

OC4J is J2EE compliant and provides all the containers that J2EE specifies. OC4J is based on technology licensed from Ironflare Corporation, which develops the Orion server--one of the leading J2EE containers. Although OC4J is integrated with the Oracle9iAS infrastructure, the product and some of the documentation still contains some reference to the Orion server.

This chapter includes the following topics:

In addition to the J2EE overview, the following OC4J services are highlighted.

OC4J Features

The features of OC4J are the following:

Set of Pure Java Containers and Runtime Executing on the JDK

The J2EE containers are implemented completely in Java and have the following capabilities:

  1. Lightweight--It takes less than 25 MB of disk space after being unzipped.

  2. Quick installation--The installation, which comes with a default configuration, requires less than 5 minutes. It comes installed with the Oracle9iAS product.

  3. Leverages the JDK JVM--OC4J is certified to run on JDK 1.3.x.x. It leverages the performance enhancements and features of this JDK release for each operating system and hardware platform.

  4. Easy to use--It supports standard Java development and profiling tools.

  5. It is available on all standard operating systems and hardware platforms, including Solaris, HP-UX, AIX, Tru64, Windows NT, and Linux.

J2EE Certified

OC4J is J2EE compliant; therefore, it includes a JSP Translator, a Java servlet container, and an Enterprise JavaBeans (EJB) container. It also supports the Java Messaging Service (JMS), and several other Java specifications as Table 1-1 shows.

Table 1-1 Oracle9iAS J2EE Support  
J2EE Standard Interfaces Version Supported

JavaServer Pages (JSP)




Enterprise JavaBeans (EJB)

1.1 and part of 2.0

Java Transaction API (JTA)


Java Messaging Service (JMS)


Java Naming and Directory Interface (JNDI)


Java Mail


Java Database Connectivity (JDBC)








Overview of J2EE APIs and OC4J Support

OC4J supports and is certified for the standard J2EE APIs, as listed in Table 1-1, which the following sections discuss:

Java Servlets

A Java servlet is a program that extends the functionality of a Web server. A servlet receives a request from a client, dynamically generates the response (possibly querying databases to fulfill the request), and sends the response containing an HTML or XML document to the client. Servlets are similar to CGI but much easier to write, because servlets use Java classes and streams. Servlets are faster to execute, because servlets are compiled to Java Byte code. At run time, the servlet instance is kept in memory, and each client request spawns a new thread.

Servlets make it easy to generate data to an HTTP response stream in a dynamic fashion. The issue facing servlets is that HTTP is a stateless protocol. That is, each request is performed as a new connection, so flow control does not come naturally between requests. Session tracking or session management maintains the state of specific clients between requests.

OC4J Servlet Container

The OC4J servlet container provides the following support:

Support for Servlets

The OC4J servlet container provides complete support for the Servlet 2.3 specification, which is part of the J2EE 1.3 Specification.

100% Application Code Compatible with Tomcat

The OC4J servlet container is 100% application code compatible with the Tomcat servlet container delivered by the Apache consortium. If you have used Apache and Tomcat to develop your applications, then you can easily deploy them to the OC4J servlet container. A few administrative changes, such as updating the application.xml file and encapsulating the Web Application Archive (WAR) file in an EAR file, are required. But, no changes to your code is necessary.


The following are features used within the OC4J servlet container:

See the Oracle9iAS Containers for J2EE Servlet Developer's Guide for more information on using and configuring servlets in OC4J.

JavaServer Pages

JavaServer Pages (JSP) are a text-based, presentation-centric way to develop servlets. JSPs allow Web developers and designers to rapidly develop and easily maintain information-rich, dynamic Web pages that leverage existing business systems. JSPs enable a clean separation and assembly of presentation and content generation, enabling Web designers to change the overall page layout without altering the underlying dynamic content. JSPs use XML-like tags and scriptlets, written in the Java programming language, to encapsulate the logic that generates the content for the page. Additionally, the application logic can reside in server-based resources, such as JavaBeans, that the page accesses with these tags and scriptlets. All formatting (HTML or XML) tags are passed directly back to the response page. By separating the page logic from its design and display, and supporting a reusable component-based design, JSP technology is faster and easier when building Web-based applications. A JSP page looks like a standard HTML or XML page with additional elements that the JSP engine processes and strips out. Typically, the JSP generates dynamic content, such as XML, HTML, and WML.

An application developer uses JavaServer Pages as follows:

  1. JSP pages with embedded Java scriptlets and directives.

  2. JSP pages with JavaBean classes to define Web templates for building a Web site made up of pages with a similar look and feel. The JavaBean class renders the data, which eliminates the need for Java code in your template. Ultimately, your template can be maintained by an HTML editor.

  3. JSP pages used by simple Web-based applications. Bind content to the application logic using custom tags or scriptlets instead of a JavaBeans class.


OC4J provides a JSP 1.1 compliant translator and runtime engine.

See the Oracle9iAS Containers for J2EE Support for JavaServer Pages Reference for more information on using and configuring JSPs in OC4J.

Enterprise JavaBeans

Enterprise JavaBeans (EJB) are Java components that implement business logic. The container interposes system services for the EJBs, so that the developer does not have to worry about implementing such things as database access, transaction support, security, caching, and concurrency. This functionality is the responsibility of the EJB container.

An enterprise bean consists of interfaces and classes. Clients access enterprise bean methods through the home and remote interfaces of the bean. The home interface provides methods for creating, removing, and locating the enterprise bean, and the remote interface provides the business methods. At deployment time, the container creates classes from these interfaces that it uses to provide access to clients seeking to create, remove, locate, and call business methods on the enterprise bean.

The types of enterprise beans are session beans, entity beans, and message driven beans.

Session Beans

A session bean represents a transient conversation with a client and might execute database reads and writes. A session bean might invoke JDBC calls, or it might use an entity bean to make the call. In this case, the session bean is a client to the entity bean. The fields of a session bean contain the state of the conversation and are transient. If the server or client crashes, the session bean is lost. Session beans can be stateful or stateless.

Entity Beans

An entity bean is a business entity that represents data in a database, and the methods to act on that data. Entity beans are transactional and long-lived: as long as the data remains in the database, the entity bean exists. Entity beans can support either Container-Managed or Bean-Managed Persistence.

Message-Driven Beans

OC4J supports Message-Driven Beans (MDB) that are a part of the EJB 2.0 specification. An MDB models a long-running process, invoked asynchronously. The client posts a message to a JMS queue or topic. The message is captured by the EJB container and routed to the intended MDB. At this point, the MDB can execute the request or forward the request to another EJB.

OC4J EJB Support

OC4J provides an EJB container that provides the following:

See the Oracle9iAS Containers for J2EE Enterprise JavaBeans Developer's Guide and Reference for more information on using and configuring EJBs in OC4J.

Java Database Connectivity Services

JDBC is essentially a portable bridge to relational databases. It is modeled on ODBC (Open Database Connectivity) specification and is fairly simple and well understood. It decouples the database from the program code through the use of drivers. With Oracle9iAS, Oracle provides connectivity to both Oracle and non-Oracle databases.

Specifically, it provides enhanced JDBC drivers to access Oracle8.0, Oracle8i, and Oracle9i databases. Oracle has licensed the DataDirect Connect JDBC drivers to access non-Oracle databases--specifically IBM DB/2 UDB, Microsoft SQL Server, Informix, and Sybase databases. These drivers are available for download on:

See the Oracle9iAS Containers for J2EE Services Guide for more information on using and configuring data sources in OC4J.

Oracle Database Access Through JDBC

Oracle9iAS offers two JDBC drivers to access Oracle databases from Java. These two JDBC drivers are as follows:

Full JDBC 2.0 Support

The JDBC drivers comply fully with JDBC 2.0, including the following:

Data Direct Connect JDBC Drivers

To access non-Oracle databases from the Oracle J2EE Container, Oracle certifies Type 4 JDBC drivers from Data Direct Technologies, which is an Oracle Partner. Data Direct Technologies provides JDBC drivers to access Informix, Sybase, Microsoft SQL-Server, and IBM DB/2 Databases from Oracle9iAS.

SQLJ Support

OC4J also supports the SQLJ language for directly embedding SQL statements in Java code. This is a simpler, more productive way of accessing the database from Java than using JDBC.

Java Naming and Directory Interface

Java Naming and Directory Interface (JNDI) is the standard interface to naming and directory services. J2EE applications use JNDI to find other distributed objects. The JNDI Interface has two parts: an application-level interface that is used by application programs to access naming and directory services, and a service provider interface to attach a provider of naming and directory services.

OC4J provides a complete JNDI 1.2 implementation. Servlets and Enterprise JavaBeans in OC4J access names using the standard JNDI programming interfaces. The JNDI service provider in OC4J is implemented in an XML-based file system.

See the Oracle9iAS Containers for J2EE Services Guide for more information on using JNDI in OC4J.

Java Transaction API

The JTA transaction model enables an application developer to specify--at deployment time--relationships among methods that compose a single transaction. All methods in one transaction are treated as a single unit. A transaction is a series of steps that must all be either complete or backed out. For example, you might have a series of methods in an enterprise bean that moves money from one account to another--by debiting the first account and crediting the second account. The entire operation should be treated as one unit--so that if there is a failure after the debit and before the credit, the debit is rolled back.

You can specify transaction attributes for an application component during assembly. This groups methods into transactions across application components. You can easily change application components within a J2EE application and re-assign the transaction attributes without changing code and recompiling.

The Java Transaction API (JTA) specification provides transactional support in J2EE for EJB and JDBC 2.0. OC4J provides a complete implementation of the JTA 1.0.1 specification.

JTA allows programmatic transaction demarcation. This enables work that is performed by distributed components to be bound by a global transaction. It is a way of demarcating groups of operations as a single global transaction. Additionally, you can allow the container to demarcate your transaction. You specify how the container demarcates the transaction through the deployment descriptors.

See the Oracle9iAS Containers for J2EE Services Guide for more information on using JTA in OC4J.

Java Messaging Service

Java Messaging Service (JMS) is the J2EE mechanism to support the exchange of messages between Java programs. This is how Java supports asynchronous communication--where the sender and receiver do not need to be aware of each other. Thus, each can operate independently. JMS supports two messaging models:

OC4J provides a complete implementation of the JMS 1.0 specification. OC4J certifies other messaging systems. See the Oracle9iAS Containers for J2EE Services Guide for more information on using JMS in OC4J.

JAAS Provider

You can configure application behavior, such as security and transaction management, at deployment time on Web and enterprise bean components. This feature decouples application logic from configuration settings that might vary with assembly. The J2EE security model enables you to configure a Web or enterprise bean component so that system resources are accessed only by authorized users. For example, you can configure a Web component to prompt for a user name and password. An EJB component can be configured so that only persons in specific groups can invoke certain methods. Alternatively, you might configure a servlet component to have some of its methods accessible to everyone and a few methods accessible to only certain privileged persons in an organization. You can configure the same servlet component for another environment to have all methods available to everyone, or all methods available to only a select few.

OC4J has a powerful Access Control List (ACL) mechanism that allows for fine-grained control of the usage of components running on the server. You can define what can or cannot be executed by which user or group of users right down to the Java method level. This ACL mechanism covers anything that runs on OC4J except EJBs. EJBs have their own access control mechanism defined in the EJB specification.

Security realms allow the administrator to import information from existing authorization or authentication systems into the ACL. You can import information from the NT security system, from an LDAP system, from the UNIX password file, or from the database. Oracle9iAS includes all the classes for the following:

OC4J supports firewall tunneling, which is the ability to go through firewalls and proxies using HTTP and HTTPS tunneling. See the Oracle9iAS Containers for J2EE Services Guide for more information on security in OC4J.

Tunneling, Load Balancing, and Clustering Services Provided by OC4J

The other advantages, beyond J2EE support, that OC4J provides are the following:

See the Oracle9iAS Containers for J2EE Services Guide for more information on RMI and HTTP tunneling in OC4J. For more information on load balancing and clustering in OC4J, see Chapter 9, "Oracle9iAS Clustering".

RMI Tunneling Over HTTP

Deployed J2EE applications are typically divided into the following tiers:

Smaller Web sites combine these tiers into one physical middle-tier; larger Web sites divide these tiers into two or three separate physical tiers for security, scalability, and load balancing purposes. OC4J takes these architectural issues into consideration and is designed to meet the following needs:

Oracle HTTP Server to JSP/Servlet Container Connectivity

The Oracle HTTP Server can use either the Apache JServ Protocol (AJP) or HTTP to direct requests to the JSP/servlet container. As a result, you can place the Oracle HTTP Server outside a firewall and direct requests to the OC4J servlet container that exists behind the firewall.

JSP/Servlet-to-EJB and EJB-to-EJB Connectivity

Communication from the presentation tier to the business tier and between EJBs is performed using standard RMI, which gives any client or Web tier program that is accessing an EJB, direct access to the services in the EJB tier. These services include JNDI for looking up and referencing EJBs, Java Messaging Service (JMS) for sending and receiving asynchronous messages, and JDBC for relational database access.

HTTP and HTTP-S Tunneling

OC4J supports the ability to tunnel RMI over HTTP and HTTP-S protocols. You can use RMI over HTTP/HTTP-S tunneling for Java-based clients when they must communicate with OC4J over the HTTP protocol. Typically, HTTP tunneling simulates a stateful socket connection between a Java client and OC4J and "tunnels" this socket connection through an HTTP port in a security firewall. HTTP is a stateless protocol, but OC4J provides tunneling functionality to make the connection appear to be a stateful RMI connection. Under the HTTP protocol, a client can make a request and accept a reply from a server. The server cannot voluntarily communicate with the client, and the protocol is stateless. This means that a continuous two-way connection is not possible. The OC4J HTTP tunneling simulates an RMI connection over the HTTP protocol, overcoming these limitations.

As a result, the different J2EE components in OC4J can be either deployed on a single physical tier (typically to optimize performance) or on separate physical tiers (for redundancy, such as connection rerouting for high availability).

Load Balancing and Clustering

OC4J supports clusters, which can be customized to the specific needs of the user. The purpose of a cluster is to replicate the configuration and state of the individual node to all nodes in the cluster. Thus, in case of a failover, the server state is preserved. The state information is not saved to any persistent storage, but is saved in memory.

OC4J supports load balancing. The purpose of load balancing is to manage incoming calls among several OC4J servers.

You can receive failover for Java applications when there is a failure connecting to one server.

For more information on clusters, see Chapter 9, "Oracle9iAS Clustering".

Java Plug-In Partners and Third Party Tools Support

Many popular Java development tools and applications support OC4J either through plug-ins or through built-in support. They are certified to work with OC4J Check for the latest updates. The products are as follows:

Actional Control Broker

Actional joins with Oracle to extend Oracle9iAS InterConnect beyond the Oracle environment. It provides connectivity to disparate applications and technologies--including SAP, PeopleSoft, FTP, CICS, JDE, and Siebel. The Actional Control Broker was recently selected by eAI Journal as the 2001 Integration Product of the Year. More information about Actional can be found at

Blaze Advisor

Blaze Advisor from HNC offers support for Oracle9iAS with QuickDeployer wizards that generate and package up all the necessary files to deploy a sophisticated rule service in a given environment. By integrating with Oracle9iAS, HNC allows Advisor developers to deploy easily and quickly to this high-performance, feature-rich environment. For more information, visit

Borland JBuilder

Oracle9iAS Plug-in for Borland JBuilder allows Borland JBuilder developers to create and distribute their applications with OC4J. For information and documentation about both the Oracle9iAS Plug-in for Borland JBuilder and OC4J, visit the Oracle Technology Network Web site at For product information and documentation about Borland JBuilder, visit the Borland JBuilder Web site at

Cacheon Business Service Center

The Cacheon BSC Console provides Oracle9iAS implementations with command and control capability for any production or development environment across disparate application servers. With Oracle9iAS and the BSC console, systems integrators can manage new customer applications from assembly, to integration, to testing, to customization and execution. Go to for more information.

Computer Associates Cool:Joe

Computer Associates has many products that support Oracle9iAS. These products include Cool:Joe and Unicenter Management for Oracle9iAS. For more information on products from CA that support Oracle, visit To download the Cool:Joe plug-in for Oracle9iAS, visit

Compuware OptimalJ

OptimalJ is an advanced development environment enabling the rapid design, development, and deployment of J2EE applications to Oracle9iAS and other application servers. OptimalJ generates complete, working applications directly from a visual model, using sophisticated patterns to implement accepted best practices for coding to the J2EE specs. Visit for more information.

Documentum WDK

Documentum currently offers its Web Development Kit (WDK) version 4.2 on the Oracle9iAS platform, running on OC4J. The WDK is included with each Documentum Developer Studio license, which itself is included with each Documentum 4i eBusiness Platform Edition. Documentum plans to offer a seamless integration of the 4i eBusiness Platform with the Oracle9iAS platform, enabling access to both the Documentum repository and WebCache. This integration enables the development of applications that reliably support ever-increasing volumes of personalized interactions, allowing customer Web sites to serve up dynamic, trusted content that is relevant to each user. Documentum plans to offer a tight integration of its eContent Services for Portals with the Oracle9iAS Portal. To learn more about the Documentum content management solution, visit their web site at

Empirix BeanTest

The Empirix portfolio of Web test and monitoring solutions provides organizations with best-in-class products and services for testing business-critical Web applications. For more information, visit

FatWire UpdateEngine

FatWire UpdateEngine runs as a servlet on Oracle9iAS, leveraging the power of the application server for enterprise performance, personalization, and dynamic delivery. As a database-centric content management system, UpdateEngine provides a critical link between the database and the application server as a store for enterprise content management and delivery. Because of its 100 percent Java design, integration of this content into Web pages, applications, and other databases is easy. For more information, visit


ILOG JRules enables OC4J customers to embed advanced business rules through a dynamic Java rules engine. This allows users to implement business rules using the definition of the syntax and vocabulary of the business language. For more information on how ILOG JRules work, visit the ILOG Web site at

Macromedia UltraDev

Macromedia UltraDev is a development environment for building Web applications. It supports Web page layout design and dynamic content generation. Developers can create dynamic Web pages with JSP as the standard J2EE mechanism for building those pages. In addition, developers can extend Macromedia UltraDev to take advantage of server-specific features and behavior, and to create customized menus and commands. One example of server-specific behavior is to support using the Oracle JSP tag libraries. Oracle9iAS Extensions for Macromedia UltraDev is a tag library extension generator. This extension generator uses standard tag library descriptor files as input to generate Macromedia UltraDev ServerBehavior extension files. Macromedia Extension Manager packages and installs these ServerBehavior extension files to enable support for Oracle-specific tag libraries.

Mercury Interactive LoadRunner

Mercury Interactive LoadRunner is a load testing tool used by many organizations to predict the system behavior and performance of their applications. LoadRunner has specific performance monitors for monitoring applications running on Oracle9iAS. These monitors interface with Oracle9iAS DMS (Dynamic Monitoring Service) to provide accurate and comprehensive metrics, with little or no additional overhead. For more information about Mercury Interactive LoadRunner, visit

Neuvis NeuArchitect

NeuArchitect is an integrated visual modeling and automated construction system that enables organizations to rapidly design and construct all aspects of an enterprise-class e-business application with exceptional speed, quality, and flexibility. NeuArchitect-based applications are highly portable across the leading deployment technologies, including Oracle9iAS, providing customers with unparalleled protection against technology obsolescence. To know more about NeuArchitect, go to

Pramati Studio

Pramati Studio is an IDE that provides full life cycle support for developing applications for any J2EE deployment platform. Pramati Studio is packed with features that are offered only on Enterprise versions of most IDEs. Integration with Oracle9iAS is built in to Pramati Studio. A migration tool enables the re-use of codebase across multiple application servers. For more information, please visit

Rational Rose

Rational Rose is an integrated software modeling and development environment. Rational Rose uses the Unified Modeling Language (UML) and visual models to represent structures and relationships for software systems and business processes, and to represent programming logic for software designs. Oracle9iAS Plug-in for Rational Rose enables developers to create and distribute their applications with OC4J. Using this plug-in, developers can create applications with Rational Rose and then deploy those applications to OC4J servers. For more information, see OTN and

Sitraka JProbe

Integrated with OC4J, JProbe offers superior server-side tuning capabilities. JProbe 3.0 allows developers to profile servlets, JSPs, and EJBs running within OC4J for problem detection. OC4J with the Sitraka integrated suite of JProbe products--including JProbe Profiler and Memory Debugger, JProbe Threadalyzer, and JProbe Coverage--ensures the most efficient and reliable Java applications for mission critical environments. Performance, scalability, and reliability are a necessity for enterprise applications. For support information on JProbe on OC4J, please see the JProbe Integration Portal for J2EE at

Sonic Software SonicMQ

SonicMQ is one of the leading messaging servers in the market. In addition to the Oracle JMS transports of Oracle9iAS, both volatile and non-volatile, applications developed on Oracle9iAS can also choose to use SonicMQ as the transport for JMS messaging. For more information on SonicMQ, visit the Sonic Software Web site at

Sun Forte

Oracle9iAS Plug-in for Sun Forte for Java allows Forte developers to create and deploy their J2EE applications on OC4J. For the latest update on the Oracle9iAS Plug-in for Sun Forte for Java, visit the Oracle Technology Network Web site at For product information and documentation about Sun Forte for Java, visit the Sun web site at

TogetherSoft ControlCenter

TogetherSoft ControlCenter enables teams of business analysts, software architects and developers to deliver high quality Oracle9iAS applications in shorter timeframes. ControlCenter's integrated development platform contains J2EE patterns from Sun Microsystems and LiveSource from TogetherSoft to automate the deployment of EARs to OC4J. Therefore, companies can combine the performance of their Java applications running on OC4J with the faster time to deployment of ControlCenter. Successful companies and developers can be sure of deployment and performance of any J2EE application with the certified combination of Oracle9iAS and TogetherSoft ControlCenter. To download the latest Together ControlCenter Plug-in, visit the Oracle Technology Network Web site at To learn more about ControlCenter, go to the TogetherSoft Web site at

VMGear Optimizeit

The Optimizeit tools enable you to pinpoint performance and reliability issues early in the development process, while keeping your code base developed on Oracle9iAS fast and reliable each step of the way. For more information, go to

WebGain Visual Cafe

Oracle9iAS Plug-in for WebGain Visual Cafe allows WebGain Visual Cafe developers to create and distribute their applications with OC4J. OC4J contains its own Web server. For information and documentation about both the Oracle9iAS Plug-in for WebGain Visual Cafe and OC4J, visit the Oracle Technology Network Web site at For product information and documentation about WebGain Visual Cafe, visit the WebGain Web site at

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

All Rights Reserved.
Go To Documentation Library
Go To Product List
Solution Area
Go To Table Of Contents
Go To Index