The artist formerly known as HTMLDB and Oracle11

From: Mladen Gogala <gogala.mladen_at_gmail.com>
Date: Sat, 16 Jul 2011 23:05:56 +0000 (UTC)
Message-ID: <pan.2011.07.16.23.05.56_at_gmail.com>



The company that I work for uses Apex. There are several simple applications and reports created using Apex. There is also a development instance which runs Oracle 11.2.0.2 on RH Linux 5.6, 64 bit. So far, the developers have been using Apex 3.2, running of an Apex instance, Oracle home version 10.2, with the standard mangled Apache server, modplsql and "marvel.conf". It was a nice little 32 bit machine which has reached its end of commercial life and was scheduled to be decommissioned. I was told to install the Apex server on the new shiny development box, with 24GB of RAM, 64 bits and 2 4-core CPU's, which also hosts the new development instance, the aforementioned RDBMS 11.2.0.2.

Unfortunately, there is no Oracle's version of Apache any more. The old 10.2 version will not install on RH 5.6 - one of the libraries is missing symbols, will not start. The good news is that Oracle has integrated Apex 3.2.1 with Oracle 11.2. RDBMS can assume the role of a web server and it is even in DBCA. One needs only to enable RDBMS to serve HTTP pages by using DBMS_XDB.SETHTTPPORT and voila, everything is cool and simple. There is, however, a problem. Apex server needs to be on the same machine as the database. Database and web serving are typically two very different types of load and it would be rather hard to properly configure the box which would be very active web server, as well as a very active RDBMS server. Fortunately, there is a solution for that, too. It is delightfully simple and is called Oracle Apex Listener:

www.oracle.com/technetwork/developer-tools/apex-listener/overview/

It is essentially a single jar (actually "war") file which is a breeze to configure, and so far extremely reliable. It is run simply as:

java -jar apex.war

That's it! It is configured using web interface. No installation, just unzip. I've created a short bash script that is run using "nohup" and voila, here is a full fledged Apex server. It does require JDK 1.6.0.20 or newer. Well done, Oracle! Here is my "launcher":

[oracle_at_oracle2a apex]$ cat launcher
#!/bin/bash
set -am
JAVA_HOME=/usr/java/latest
PATH=$JAVA_HOME/bin:$PATH
ORACLE_BASE=/software/oracle/base
ORACLE_HOME=/software/oracle/base/product/11.2.0/dbhome01 TNS_ADMIN=$ORACLE_HOME/network/admin
ORACLE_SID=MCST
LD_LIBRARY_PATH=$ORACLE_HOME/lib
PATH=$ORACLE_HOME/bin:$PATH
WAR=$HOME/apex/apex.war
APEX=$HOME/apex
IMAGES=$HOME/images
cd $APEX
exec java -Dapex.images=$IMAGES -jar $WAR

The "images" directory is the /i/ directory from the former Apache installation. I copied the old 3.2.0 directory and it works perfectly. Log file is very verbose and is, of course, called "nohup.out":

[oracle_at_oracle2a apex]$ head -5 nohup.out

INFO: Starting: /home/oracle/apex/apex.war
 See: 'java -jar apex.war --help' for full range of configuration options
INFO: Extracting to: /tmp/apex
INFO: Using classpath: file:/tmp/apex/apex/____embedded/start.jar:file:/
tmp/apex/apex/WEB-INF/lib/apex.jar:file:/tmp/apex/apex/WEB-INF/lib/ commons-fileupload-1.2.1.jar:file:/tmp/apex/apex/WEB-INF/lib/ je-4.0.103.jar:file:/tmp/apex/apex/WEB-INF/lib/ojdbc6.jar:file:/tmp/apex/ apex/WEB-INF/lib/ojmisc.jar:file:/tmp/apex/apex/WEB-INF/lib/ucp.jar:file:/ tmp/apex/apex/WEB-INF/lib/poi-3.6-20091214.jar:file:/tmp/apex/apex/WEBINF /lib/xmlparserv2-11.2.0.jar:file:/tmp/apex/apex/WEB-INF/lib/ xdb-11.2.0.jar:
INFO: Starting Embedded Web Container in: /tmp/apex
[oracle_at_oracle2a apex]$

Once again, well done! No more tedious httpd.conf and marvel.conf fixing and tuning.

-- 
http://mgogala.byethost5.com
Received on Sat Jul 16 2011 - 18:05:56 CDT

Original text of this message