datasheet Oracle9iAS Containers for J2EE - General - Frequently Asked Questions

Last Updated: Oct. 14, 2002.
What is the latest version of Oracle9iAS Containers for J2EE (OC4J) ?

What are the new features in this release  ?

OC4J 9.0.3 runs on which JDK versions ?

Where do I get the documentation for this release  ?

What is OC4J standalone ?

How do I configure OC4J standalone?

When will I use OC4J standalone ?

How do I define datasources in OC4J ?

What is the difference between emulated and non-emulated datasources ?

I am trying to startup OC4J and keep getting an out of memory error. How can I solve this ? 

How can I start OC4J standalone as a service in NT ?

How can I deploy a WAR file to OC4J standalone ?

I have two EARs as part of my application with EJBs in one EAR and client apps in another EAR. How do I deploy this application?

I'm trying to using JDBC drivers from IBM DB2 Client libraries for and getting some errors when connecting from OC4J. Is this supported?
 



What is the latest version of Oracle9iAS Containers for J2EE (OC4J) ?
The latest version of OC4J is 9.0.3. It is J2EE 1.3 compatible.
 

What are the new features in this release (OC4J 9.0.3) ?
The features of OC4J 9.0.3 are described in the feature overview document available at /tech/java/oc4j/index.html
 

OC4J 9.0.3 runs on which JDK versions ?
OC4J 9.0.3 is certified on JDK 1.3.1, JDK 1.4.0 and JDK 1.4.1.

Where do I get the documentation for this release ?
/tech/java/oc4j/index.html 
Click on Documentation

What is OC4J standalone ?
OC4J standalone is the Oracle9iAS Containers for J2EE distribution which can be run outside of the complete Oracle9iAS environment. OC4J standalone is typically used for development and testing purposes, and could be used for simple small scale Web solutions.  Running the standalone distribution outside of the complete Oracle9iAS environment does not provide you with the benefits of managed scalabilty, Enterprise Manager support for administration and deployment, application fail-over and other Enterprise level capabilities that are contained with Oracle9iAS. 

How do I configure OC4J standalone?
OC4J standalone comes with a command line utility, admin.jar. This enables you to perform a set of administrative functions from the command line.  Also, you may directly modify the XML configuration files in the OC4J standalone environment.

When will I use OC4J standalone ?
Typically OC4J standalone would be used for development purposes and for small scale web solutions.

How do I define datasources in OC4J ?
You define OC4J datasources in an XML file known as data-sources.xml.   If you're using Oracle9iAS, please use Enterprise Manager(EM) to create and configure datasources.  With OC4J standalone use admin.jar or edit the data-sources.xml.  Refer to the OC4J standalone user's guide

What is the difference between emulated and non-emulated datasources ?
Emulated datasource - The pre-installed default data source is an emulated data source. Emulated data sources are wrappers around Oracle data sources. Used primarily by applications that access only a single database. 

Non-emulated datasource - Non-emulated data sources are pure Oracle data sources. Used by applications that want to coordinate access to multiple sessions within the same database or to multiple databases within a global transaction. 
For more on datasources, refer the Datasources chapter in Oracle9iAS Containers for J2EE Services Guide Release 2

I am trying to startup OC4J and keep getting an out of memory error. How can I solve this ? 
Try increasing the heap size to 100M or higher while starting the server. Start your server with this following command :
[/usr/local/oc4j/j2ee/home]: java -jar -Xmx100m oc4j.jar

How can I start OC4J standalone as a service in NT ?
In Oracle9iAS Release 2, OC4J is started as a managed process by Oracle Process Management Notification (OPMN).  This provides automatic startup, shutdown and death detection functionalities for OC4J processes.  For environments which require the use of OC4J as a service, Oracle9iAS should be used.
Optionally, you can set OC4J as a service in Windows as follows:
1) Create a command file to start OC4J as follows:
set PATH=c:\java1.3\bin;%PATH
cd \oracle\ias\j2ee\home
java -jar oc4j.jar

2) Create a service for the this command file using NT/Win2k Resource Kit. You can use the following Microsoft article how to create a service: http://support.microsoft.com/support/kb/articles/q137/8/90.asp

How can I deploy a WAR file to OC4J standalone ?
The command line deployment tool (admin.jar) requires an EAR file as it's deployment archive. To deploy a WAR file using this, you must package the WAR file within a EAR file.
.
You can manually deploy a WAR file to OC4J However following are the steps involved in deploying a WAR file in OC4J.

1. Copy the file to D:\oc4j\j2ee\home\applications where d:\oc4j is the location OC4J is installed in. 
copy mywar.war D:\oc4j\j2ee\home\applications

2. Open the application.xml file in D:\oc4j\j2ee\home\config directory 
and add the following after the <web-module id="defaultWebApp" path="../default-web-app" /> 
line: 
<web-module id="mywar" path="../applications/mywar.war" /> 

3. Open the default-web-site.xml file in D:\oc4j\j2ee\home\config directory and add the following after the <default-web-app application="default" name="defaultWebApp" /> line: 
<web-app application="default" name="mywar" root="/technology/mywar" />

In Oracle9iAS Release 2; deployment of applications is done either using EM or via the DCM commands.
 

I have two EARs as part of my application with EJBs in one EAR and client Apps in another EAR. How do I deploy this application?
You have to use the parent directive in server.xml to create a class hierarchy between the different applications, for example, you have two applications addressbook containing EJBs and addressbook4 containing client module :
<application name="addressbook" path="../applications/addressbook.ear" auto-start="true" />
<application name="addressbook4" path="../applications/addressbook4.ear" parent="addressbook" auto-start="true" />
You have to use com.evermind.server.ApplicationInitialContextFactory as f both EJBs and clients arein the same application.
You cannot have more than one parent for an application however X can be parent of Y and Y can be parent of Z.

I'm trying to using JDBC drivers from DB2 Client libraries for and getting some errors when connecting from OC4J. Is this supported?
Oracle only supports DataDirect JDBC Drivers for third party DB sources like DB2, SQL Server, Sybase.  Please refer to Oracle9iAS Containers for J2EE Services Guide, for more details.