ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button

Oracle Containers for J2EE (OC4J)

by Debu Panda
01/16/2002

With the release of version 1.0.2.2 of its 9i Application Server, Oracle introduced a fast, scalable, developer-friendly J2EE container. OC4J, as it is popularly known, was licensed from Ironflare, makers of the Orion server, and was enhanced by Oracle and integrated with other components in the application server stack.

A future article will discuss the just-released developers' preview version of OC4J 2.0. 9iAS release 2 includes complete support for Enterprise JavaBeans (EJB) 2.0, Servlets 2.3, JavaServer Pages (JSP) 1.2, JTA 1.0, JNDI 1.2, JMS 1.0, JDBC 2.0, JavaMail 1.2, JAF 1.0, JAXP 1.1, Connector 1.0, and JAAS 1.0. OC4J also supports standard services such as JSP Tag libraries, and provides advanced clustering facilities to support both stateless and stateful application failover of servlets and EJBs. This article only discusses the features provided in the 1.0.2.2.x version of 9iAS Oc4J.

OC4J 1.0.2.2 is a J2EE-1.2-certified application server. OC4J provides the performance, scalability, and features (like HTTP clustering and load balancing) necessary for deployment as an enterprise application server. In addition, it boasts several features to make developers' lives easier during the development phase. In this article, I will cover the ease-of-use and developer features that make OC4J an attractive option for developing and deploying J2EE applications.

Ease of Installation and Configuration

OC4J can either be installed from 9iAS software distribution or downloaded from the Oracle Technology management Web site. OC4J is developed purely in Java and hence the same distribution works for most of its platforms (Windows, Linux, Solaris, HP).

The installation of the J2EE container is very simple and takes only few minutes. You need JDK 1.2.2 or higher installed on your machine and java binaries included in your path. If the unzip utility is not available in your environment, you can use the jar utility to install the server from the oc4j.zip file.

Following are the steps involved in installing OC4J:

$ cd ias 
$ unzip oc4j.zip (or jar xvf oc4j.zip) 
$ cd j2ee/home 
$   java -jar orion.jar  -install 
Enter an admin password to use: debu 
Confirm admin password: debu Installation done

The application server configuration files consists of seven XML files residing in the $IAS_HOME/j2ee/home/config directory; the names of the XML files are self-explanatory.

The following list provides a brief description about the configuration files.

server.xml
Main configuration file containing directives that apply globally across the container.
default-web-site.xml
Configuration for the default HTTP listener.
data-sources.xml
Allows generic naming for a number of data sources and how and where these are accessed.
data jms.xml
Configuration for the Java Messaging Service, including queues, topics, and port.
rmi.xml
Configuration for Remote Method Invocation, including ports.
application.xml
Configuration for the default application.
global-web-application.xml
Directives for all Web applications deployed.

By default, OC4J has a Web server configured to listen for HTTP requests at port 8888; you can change the port by editing default-web-site.xml.

The OC4J server can be started with a single command and the process runs in a single JVM. After the OC4J server is started, you can invoke your Web site as http://<servername>:8888. The command to start and shutdown OC4J is:

$ java -jar orion.jar Oracle9iAS (1.0.2.2.1) 
Containers for J2EE initialized 
$ java -jar admin.jar ormi://localhost admin debu -shutdown 
$

Pages: 1, 2

Next Pagearrow