Oracle AS 10g

Homepage

http://www.oracle.com

Where to put the JDBC driver

{ORACLE.HOME}/j2ee/{OC4J_INSTANCE}/applib/

If you are using an Oracle database server, the JDBC driver is probably already available. However, there might be a mismatch between the Oracle JDBC driver that comes with the 9iAS and the Oracle database server. The correct JDBC driver is probably submitted with the database server, or it can be downloaded from Oracles website.

Creating database connection pool

There are two ways to do this, either by editing the data-sources.xml configuration file found in {ORACLE.HOME}/j2ee/{OC4J_INSTANCE}/config/ directory, or by logging into the Oracle Enterprise Manager (default port 1810), and then add the connection pool there. The latter method is the simplest.

Start a web browser and enter URL to the Oracle Enterprise Manager, i.e. http://oracle.server:1810 and then log in. When logged into the admin, navigate to the OC4J instance that will run the EAE web applications. Then choose 'Administration' followed by 'Data Sources'. Press the 'Create' button. Fill in the following.

Name

The name of this connection pool, i.e., EaeLogger or EaeQs.

Data Source Class

Use 'com.evermind.sql.DriverManagerDataSource' with non-Oracle databases, or a pure Oracle data source class if you are using Oracle database.

JDBC URL

The JDBC URL, i.e., Oracle JDBC URL 'jdbc:oracle:thin:@[host]:[port1521]:[SID]'.

JDBC Driver

The JDBC driver, i.e., Oracle JDBC driver 'oracle.jdbc.driver.OracleDriver'.

Username

Database username.

Use cleartext password (check this)

Database password.

Location, Transaction(XA) Location and EJB Location

Location attributes, i.e. 'jdbc/eae-logger/logger', 'jdbc/eae-logger/loggerXa' and 'jdbc/eae-logger/loggerEjb'.

Connection Retry Interval (seconds)

Set this i.e., to '1'.

Cached Connection Inactivity Timeout (seconds)

Set this to i.e. '30'.

Click the 'Apply' button and restart application server if necessary.

See database vendor tips for details on the JDBC url and driver format.

How to install a Web Application Archive

Start a web browser and enter URL to the Oracle Enterprise Manager, i.e. http://oracle.server:1810 and then log in. When logged into the admin, navigate to the OC4J instance that will run the EAE web applications. Then choose 'Applications'. From this page you can deploy WAR files, just click the 'Deploy WAR file' button.

Telling the application server to allow context lookup from user threads

By default, Oracle 10g application server doesn't allow context lookup support from user-created threads. The EAE Logger application requires that this option is enabled. In order to enable this option, log into 10g iAS Enterprise Manager, choose the OC4J instance running the Logger application, choose Administration, then Server Properties. Add -Doc4j.userThreads=true to the Java Options.

Tuning the the Oracle (Apache) HTTP server connection handling

The client connection handling should be modified, closing each connection after one request. This is because a log request is not followed by multiple requests (css, images, etc) from the same client, which is the case for web page requests.

Log into the Enterprise Manager, choose HTTP_Server, then Administration and finally Server Properties. Under Client Connection Handling, uncheck the Allow Multiple Requests per Connection option, choose Apply and restart the HTTP server.

Telling the application server to use Xerces XML parser

Oracle 10g application server defaults to its own SAX parser implementation. EAE uses Xerces, and the Oracle application server instance must be configured to default to Xerces for EAE to work properly.

The first step is to copy a Xerces library jar from the EAE web application library folder to {OC4J_Instance}/applib.

The second and final step is to add the Java options -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl and -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser. This is done using the Enterprise Manager, navigate to the OC4J instance, then choose 'Administration' followed by 'Server properties'. Add the above option to 'Java option'.

FYI, if you like to force the application server to use Xalan, add the Java option -Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl, as well.