You are on page 1of 9

OC4J - The 'Other' Oracle Application Server DatabaseJournal.

com
IT Professionals Developers Solutions

http://www.databasejournal.com/features/oracle/article.php/3576801/OC...
eBook Library Webopedia

Free Newsletters: DatabaseDaily

Search Database Journal:

MS SQL SQL Scripts & Database Oracle DB2 Access MySQL PostgreSQL Sybase PHP Links SQL Etc Samples Forum Database Journal |DBA Support |SQLCourse |SQLCourse2 Database Journal Home DBA Videos Database Articles Database Tutorials MS SQL Oracle DB2 MS Access MySQL RESOURCES Database Tools SQL Scripts & Samples Links Database Forum DBA Jobs Sitemap News Via RSS Feed By Steve Callan How does extensible markup language relate to the J2EE standalone version of Application Server? If "extensible markup language" sounds unfamiliar to you, perhaps you know it better by its acronym of XML. XML matters not to just to the J2EE version of Application Server, but to all versions. The manner in which XML matters is fairly significant: many configuration files are XML-based. If your DBA responsibilities include administering J2EE applications based upon Application Server, you face the learning hurdles of XML, Java and J2EE, how Oracle interfaces with Java (OC4J, more on that later), and Application Server itself. Chances are you have seen XML in action and may not have even noticed it. Oracle 10g's staging information uses a file named products.xml instead of products.jar. If coming from a Forms and Reports Services standalone background, the J2EE version will be somewhat familiar, but even within this "known" territory, there are many differences. For example, using true or false: all versions of

DBA Videos

UCS Manager Achieve greater agility through unified, embedded management across multip operations with a flexible management system.
Technical Specialist Pre-sales (MA) Next Step Systems US-MA-Littleton Post A Job | Post A Resume

Featured Database Articles

January 13, 2006

Reduce TCO and Increase B the Cisco Unified Computin


The Cisco Unified Computing Sy next-generation data center platfo network, storage access and virtu system. Integrating low-latency, lo Ethernet unified network fabric w x86-architecture servers, this flex chassis platform unites all resour management domain. >>

Be a Marketplace Partner Business EMail Your trusted Web Host since 1997 Business Insurance for the IT services industry Business Insurance for the IT services industry

Decrease Complexity, Impr Efficiency with Cisco UCS B Servers


The Cisco UCS 5108 chassis is Computing System's breakthroug simplicity and IT responsiveness. fabric; integrated, embedded ma extender technology, resulting in components, no independent ma energy efficiency than traditional >>

1 of 9

6/21/2011 5:54 PM

OC4J - The 'Other' Oracle Application Server DatabaseJournal.com

http://www.databasejournal.com/features/oracle/article.php/3576801/OC...

Visit the Internet.com eBook Library for Technology Professionals

Application Server are installed using Oracle Universal Installer, so all you ever need to look for in the "Disk 1" directory is the setup.exe (or runInstaller) executable? As we will see later on, the answer is false. This article is the first of a multi-part series focusing on Oracle's more Web-like version of Application Server, J2EE applications, and XML. Being able to differentiate the versions of Application Server (what is common, what is different), basic administration (using XML configuration files), performing a new type of installation, and acquiring an XML editing tool (free and lasts forever) are some of the topics that will be covered.

The different flavors of Application Server


Which version do you need, is it part of a bundle, and does it come in a standalone version? Part of the answer is shown in the version comparison matrix found under the Middleware (not Applications) link under "Products" at www.oracle.com (see http://www.oracle.com/appserver /appserver_family.html).
Click for larger image

MARKETPLACE

Network Perform Software

Monitor availability & Switches, Servers, Ap Now! www.OpManager.com

Scrolling down a bit on the page, the OC4J version shows the following availability by version.

Oracle Application Server Containers for J2EE (OC4J)

Version Availability Java SE/SE1 Yes EE Yes

internet.commerce Be a Commerce Partner

Fastest J2EE-certified Java environment with support for Web services (UDDI, SOAP and WSDL), Fast Start Fault Recovery Architecture, cluster support for JSPs, servlets, and EJBs, and J2EE-based security framework.

Yes

Brocade Doubles Down on 16 Gbps Fibre Channel Microsoft Wants iOS Apps to Run on WP7 Avaya Debuts New Virtual Services Switch

Under product information for Application Server at OTN, you can expand a list of features f two tables below show a consolidated listing for each type. Common elements are aligned at t Application Server 10g Release 2 Oracle HTTP Server Oracle Application Server Containers for J2EE (OC4J) Oracle Application Server Web Cache J2EE and Web Cache Oracle Application Server Contain Oracle HTTP Server Oracle Web Oracle Enterprise Manager 10g Application Oracle Enterprise Manager 10g A Server Control

internet.com

2 of 9

6/21/2011 5:54 PM

OC4J - The 'Other' Oracle Application Server DatabaseJournal.com

http://www.databasejournal.com/features/oracle/article.php/3576801/OC...

IT Developer Internet News Small Business Personal Technology Search internet.com Advertise Corporate Info Newsletters Tech Jobs E-mail Offers

Server Control OracleAS Backup and Recovery OracleAS Backup and Recovery Tool Oracle Application Server Portal Oracle Application Server Wireless Oracle Sensor Edge Server Oracle Database Server 10g (10.1.0.4.2) Oracle Internet Directory Oracle Application Server Single Sign-On Oracle Application Server Directory Integration Provisioning Oracle Application Server Delegated Administration Services Oracle Application Server Certificate Authority Oracle Application Server Forms Services Oracle Application Server Reports Services Oracle Application Server Personalization Oracle Business Intelligence Discoverer Oracle Security Developer Tools Oracle Application Server Guard OracleAS Upgrade Assistant and Plug-Ins OracleAS Change IP/Host Name OracleAS Cloning Scripts Oracle XML Developer's Kit

Oracle Application Server 10g Release 2 (10.1.2.0.1) Standard Edition One

Oracle Application Server J2EE D Pure Java - Runs on all certified P

Oracle HTTP Server Oracle Application Server Containers for J2EE (OC4J) Oracle Application Server Web Cache Oracle Enterprise Manager 10g Application Server Control Oracle Application Server Portal Oracle Database Server 10g Oracle Internet Directory Oracle Application Server Single Sign-On

Oracle HTTP Server Oracle Application Server Contain Oracle Application Server Web C Oracle Enterprise Manager 10g A Server Control

3 of 9

6/21/2011 5:54 PM

OC4J - The 'Other' Oracle Application Server DatabaseJournal.com

http://www.databasejournal.com/features/oracle/article.php/3576801/OC...

Oracle MapViewer The J2EE downloads (pure Java) version is of interest to us in that this version installs withou Installer. Click the "Pure Java" link and you will see several standalone versions (the product somewhat misleading given that there is, in fact, a standalone version). Version 10.1.2.0.2 is a over 35MB) and results in a compressed file named oc4j_extended.zip. Reader's Note: For the purposes of this particular article, it is not necessary to install this prod before deciding whether or not you want to sample this version. One thing to take note of is that Oracle Corporation is not consistent in how it refers to featur used, sometimes not. Is it Application Server Web Cache, or HTTP Server Web Cache?

Installing Oracle Application Server Containers for J2EE


Expand the zipped file and open the Readme.txt file. I staged the uncompressed version of th C:\oracle\oc4j. To perform the installation, you need the Java "java" executable (may have to Files\Java\jdk1.5.0_02\bin folder to your path). To test your environment and setup, run "java command prompt.
C:\>java -version java version "1.5.0_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-b09) Java HotSpot(TM) Client VM (build 1.5.0_02-b09, mixed mode, sharing)

In the j2ee\home directory, start the installation with java jar oc4j.jar install.
C:\oracle\oc4j\j2ee\home>java -jar oc4j.jar -install Auto-unpacking C:\oracle\oc4j\j2ee\home\applications\dms0.war... done. To enable in-process JSP compilation (which can be faster in some cases), please add the path to your tools.jar in application.xml Example: <library path="../../../jdk/lib/tools.jar" /> Enter an admin password to use: oracle Confirm admin password: oracle If you are using J2SE 1.4 or higher, please ensure that all your imported c with in packages, as required by the Java Language Specification. Installation done C:\oracle\oc4j\j2ee\home>

If the installation was successful, the next step is to test it by starting an OC4J instance. This p to Forms developers running a Developer Suite OC4J instance (used to run Forms on the Web Application Server).
C:\oracle\oc4j\j2ee\home>java -jar oc4j.jar 06/01/08 18:48:18 Oracle Application Server Containers for J2EE 10g (10.1.2 06/01/08 18:48:18 !!! No valid java compiler found !!! 06/01/08 18:48:18 javac.exe not found under C:\Program Files\Java\ jre1.5.0_02, please use a valid jdk or specify the location of your java compiler in server.xml using the <java-compiler .../> tag

Note the error about javac.exe not being found under C:\Program Files\Java\jre1.5.0_02. Let' JDK or JRE does javac come with? That would be JDK, so why is Oracle looking for javac Environment (JRE) installation path? I have JDK listed first in my path statement, not JRE, b difference. The Standalone User's Guide (installs with the product) even mentions JDK as bei Oracle is looking for javac under JRE. Anyway, this leads into one of the topic areas for this s XML-based configuration files.

XML Configuration Files


For an overview of all the files involved, Figure 2-1 shows a good representation. The specific covered later (along with an XML editor), but for now, the server.xml is what needs our atten

4 of 9

6/21/2011 5:54 PM

OC4J - The 'Other' Oracle Application Server DatabaseJournal.com

http://www.databasejournal.com/features/oracle/article.php/3576801/OC...

The server.xml file is located in J2EE_HOME\j2ee\home\config, which resolves to C:\oracle\ given that I used C:\oracle\oc4j as my Oracle, oops, make that J2EE, home. The error messag java-compiler tag needs to be used to set the JDK location. The default server.xml file does n (more on what a directive is later, but for now, consider it to be a very close cousin of an HTM added. The contents of the server.xml file are shown below.
<?xml version="1.0" standalone="yes"?> <!DOCTYPE application-server PUBLIC "Orion Application Server Config" "http://xmlns.oracle.com/ias/dtds/application-server-9_04.dtd"> <application-server application-directory="../applications" deployment-directory="../application-deployments" connector-directory= <rmi-config path="./rmi.xml"/> <!-- JMS-server config link, uncomment to activate the JMS service --> <jms-config path="./jms.xml"/> <j2ee-logging-config path="./j2ee-logging.xml" /> <log> <file path="../log/server.log"/> </log> <global-application name="default" path="application.xml"/> <global-web-app-config path="global-web-application.xml"/> <!-- <web-site path="./secure-web-site.xml" /> --> <web-site path="./http-web-site.xml"/> <!-- Uncomment the following, to deploy these apps. <application name="callerInfo" path="../jazn/demo/callerInfo/callerInfo. <application name="ssoInfo" path="../jazn/demo/ssoInfo/build/ssoInfo.ear <application name="ejbsamples" path="../demo/ejb" /> <application name="news" path="../applications/news.ear" /> <application name="logger" path="../demo/messagelogger.ear" /> <application name="petstore" path="../applications/estore-patched.ear" / <application name="ws_example" path="../demo/web_services/java_services/ <application name="ojspdemos" path="../demo/ojspdemos.ear" /> --> <!-- Compiler, activate this to specify an alternative compiler such as jikes for EJB/JSP compiling. --> <!-- <compiler executable="jikes" classpath="/myjdkdir/jre/lib/rt.jar" </application-server>

Directives, just like tags in HTML, have beginning and ending parts. Some tags are self-closin are not, like "table." With the server.xml file, the configuration part is between the "applicatio

5 of 9

6/21/2011 5:54 PM

OC4J - The 'Other' Oracle Application Server DatabaseJournal.com

http://www.databasejournal.com/features/oracle/article.php/3576801/OC...

Somewhere in between the opening and ending is good enough as far as adding java-compiler for adding the java-compiler tag include: Provide a name of the compiler ("javac" in this case) Provide a path name using "bindir" For Windows-like paths, escape the back-slash character with another back-slash chara An example is shown below.
<j2ee-logging-config path="./j2ee-logging.xml" /> <java-compiler name="javac" bindir="C:\\Program Files\\Java\\jdk1.5.0_02\ <log> <file path="../log/server.log"/> </log>

Let's restart the OC4J instance and see what happens.


C:\oracle\oc4j\j2ee\home>java -jar oc4j.jar 06/01/08 20:52:37 Oracle Application Server Containers for J2EE 10g (10.1.2

Looks like a clean start. At this point, the basic webapp should be available. Access it via a U http://localhost:8888.

As another example, the Standalone User's Guide should be available at http://localhost:8888 This URL suggests that where the PDF is located is also the Web server document root. The r C:\oracle\oc4j\j2ee\home\default-web-app, and a simple test of trying to access other files wi web-app directory should prove this to be true.

Where is Enterprise Manager for this version of Application Server? Despite Oracle's Web sit includes Enterprise Manager, it does not. The next version up J2EE and Web Cache is the to get Enterprise Manager. Just for grins, if you note that the contents of the server.xml file remind you of a simple HTM (or any) XML file in a browser.
Click for larger image

6 of 9

6/21/2011 5:54 PM

OC4J - The 'Other' Oracle Application Server DatabaseJournal.com

http://www.databasejournal.com/features/oracle/article.php/3576801/OC...

In Closing
So far, we have seen a listing of the features included in the four types of installation for App Applications can be deployed via the standalone OC4J version, and administration can be per editing of (many) XML files. Knowing the specifics of XML is not necessary, but it certainly appreciation of the who-what-where of what Enterprise Manager changes when you, as the a making changes via the EM console. See All Articles by Columnist Steve Callan
Tools: Add databasejournal.com to your favorites

Add databasejournal.com to your browser search box IE 7 | Firefox 2.0 | Firefox 1.5.x Receive news via our XML/RSS feed

Oracle Archives 3 Comments (click to add your comment) By Anj December 16 2009 20:46 PST Thank you. This is great
Reply to this comment

By Alexis May 26 2009 10:26 PDT

Excelente!! estaba buscando esta respuesta. Thank you!!


Reply to this comment

By Alexis May 26 2009 10:26 PDT

Excelente!! estaba buscando esta respuesta. Thank you!!


Reply to this comment

Comment and Contribute

7 of 9

6/21/2011 5:54 PM

OC4J - The 'Other' Oracle Application Server DatabaseJournal.com

http://www.databasejournal.com/features/oracle/article.php/3576801/OC...

Your name/nickname Your email Subject

(Maximum characters: 1200). You have

characters left.

Type the two words:

World's Fastest Object Database. Learn from experts and get coding tips. Join developerWorks Community today! Join the discussion, share your knowledge or find advice. Create an IBM developerWorks profile today Discover the collective knowledge of IBM developerWorks. Create a profile today. Search your organization for skills and expertise. Join developerWorks Community to access profiles.

Lates Oracle Forum Topic


Student Scheduling Query max cursors Records not locked in the order specified Query Optimization - Select Statement

By
DrPhibes flash05 btg ss135r

Replies
0 0 5 1

U
June 14th June 14th June 6th, May 15th

8 of 9

6/21/2011 5:54 PM

OC4J - The 'Other' Oracle Application Server DatabaseJournal.com

http://www.databasejournal.com/features/oracle/article.php/3576801/OC...

The Network for Technology Professionals

Search:
About Internet.com Copyright 2011 QuinStreet Inc. All Rights Reserved. Legal Notices, Licensing, Permissions, Privacy Policy. Advertise | Newsletters | E-mail Offers

Solutions
Whitepapers and eBooks
MSDN Spotlight for Developers Internet.com Cloud Computing Showcase Microsoft TechNet Spotlight Helpful Cloud Computing Resources MORE WHITEPAPERS, EBOOKS, AND ARTICLES

Webcasts
MORE WEBCASTS, PODCASTS, AND VIDEOS

Downloads and eKits


MORE DOWNLOADS, EKITS, AND FREE TRIALS

Tutorials and Demos


Demo: Google Site Search Virtual Event: Master Essential Techniques for Leveraging the Cloud Article: Explore Application Lifecycle Management Tools in Visual Studio 2010 Internet.com Hot List: Get the Inside Scoop on IT and Developer Products New Security Solutions Using Intel(R) vPro(TM) Technology All About Botnets MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES

9 of 9

6/21/2011 5:54 PM