Wednesday, November 29, 2006

Oracle Containers For J2EE (OC4J)

Oracle Containers For J2EE (OC4J)

One of the reasons I am writing today’s post on Oracle Container For J2EE is that apart from being a core component of the 10g Application Server Oracle Containers For J2EE is also an important member of the new Oracle Applications Release 12 Tech Stack.

Oracle Containers For J2EE or commonly referred to as OC4J is the underlying runtime engine for the 10g Application Server infrastructure. It is an extremely lightweight and easy to install component which requires less than 50 MB of disk space and 20 MB of your server memory to be up and running. It also has a support for a wide range of operating systems including NT, Linux, Solaris, HP-UX, IBM-AIX and Compaq True 64 with support for both 32 and 64 bit operating system.

OC4J runs on the Java 1.4 virtual machine and is J2EE 1.3 complaint. You can have multiple OC4J process running each of which is referred to as a OC4J instance. The OC4J configuration is controlled via XML configuration files and OC4J properties file. An OC4J instance is referred to as a container as it provides a web container to support services like Java Server Pages(JSP),Servlets , Enterprise Java Beans(EJB) and Web Services.

The OC4J also implements the following J2EE services.

  • Java Authentication And Authorization Service (JAAS)
  • Java API for XML Parsing (JAXP)
  • J2EE Connector (J2C)
  • Java Mail
  • Java Naming and Directory Interface(JNDI)
  • Java Database Connectivity (JDBC)
  • Java Application Framework(JAF)
  • Java Transaction API (JTA)
  • Java Messaging Service (JMS)

High Availability Single Sign On and SOA

OC4J can also be configured to support High availability architectures with Oracle RDBMS using Real Application Clusters and Oracle Datagaurd Technologies.OC4J also supports the Single Sign On functionality by making use of the JAAS service. OC4J is also out of the box Service Oriented Architecture (SOA) compliant as it supports the underlying feature of persistence.


Though I am mostly talking about OC4J as a component of the Oracle Application Server, its important to note here that it comes as a standalone java component as well in the form a single zip file. Both the standalone distribution and the Application server distribution are developer friendly and deployment friendly. The code deployment in OC4J is done
through a Enterprise Archive File (EAR). The EAR file contains the Web Archive (WAR file) which in turn encapsulates the Java Archive (JAR) files containing the code.

OC4J In Oracle Applications

OC4J replaces the Jserv component which is there in the current release 11i of Oracle Applications. Also as a result the mod_jserv component would be replaced by the mod_oc4j component in release 12 of Oracle Applications. The mod_oc4j is used to communicate between different OC4J instances.

The default installation Release 12 of Oracle Applications will create 3 OC4J instances

  • Oacore: This runs the OA Framework-based applications.
  • Forms: This runs the Forms-based applications.
  • OAFM: This is responsible for running the web services.

The Jserv groups which are there current in Oracle Applications Release 11i are also planned be replaced by OC4J instances.

As mentioned earlier the OC4J properties are controlled using the XML files and file. These files are managed by the standard Oracle Applications Autoconfig.

The Java code deployment in Oracle E-Business suite for OC4J is done at the time of install using rapid install and maintained by ad tools like adadmin and adpatch. New custom code deployment can be done by using the Application Server Control user interface.

The OC4J implementation in Oracle Applications Release 12 will include the following directory structure.

  • applications: Contains applications deployed
  • applications-deployment: Contains configuration settings for the applications deployed
  • config: Contains common configuration setting for the OC4J instance.

No comments: