Configuring an Oracle Datasource in Apache Tomcat
This page tells you how to set up an Oracle datasource connection for Confluence.
Step 1. Shut down Tomcat
bin/shutdown.batto bring Tomcat down while you are making these changes.
- Make a backup of your
<CONFLUENCE_HOME>/confluence.cfg.xmlfile and your
<CONFLUENCE_INSTALLATION>/conf/server.xmlfile, so that you can easily revert if you have a problem.
Step 2. Install the Oracle database driver
- Download the Oracle JDBC driver. Links are available on this page: Database JDBC Drivers.
- Copy the driver JAR file into the
libfolder of your Tomcat installation:
Step 3. Configure Tomcat
- If you are using the Confluence distribution, edit the
conf/server.xmlfile in your Tomcat installation. If you are running your own Tomcat instance, edit the XML file where you declared the Confluence Context descriptor.
Contextelement in the
Insert the DataSource
Resourceelement into the
Contextelement, directly after the opening
Manager,as shown here:
- Change the
passwordto match your Oracle login.
urlto match the URL for your Oracle database. See how to find your Oracle URL. For example:
- If required, choose different
maxIdlevalues. These define the number of database connections that will be allowed at one time, and the number that will be kept open even when there is no database activity.
Step 4. Configure the Confluence web application
Configure Confluence to use this datasource:
- Edit this file in your Confluence installation:
Insert the following element just before
</web-app>near the end of the file:
Step 5. Restart Tomcat
bin/startup.bat to start Tomcat with the new settings.
Was this helpful?
Thanks for your feedback!