Author: markt Date: Mon Jan 16 13:55:26 2006 New Revision: 369578 URL: http://svn.apache.org/viewcvs?rev=369578&view=rev Log: Port fix for bug 15946. Update Oracle examples.
Modified: tomcat/container/tc5.5.x/webapps/docs/jndi-datasource-examples-howto.xml Modified: tomcat/container/tc5.5.x/webapps/docs/jndi-datasource-examples-howto.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/jndi-datasource-examples-howto.xml?rev=369578&r1=369577&r2=369578&view=diff ============================================================================== --- tomcat/container/tc5.5.x/webapps/docs/jndi-datasource-examples-howto.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/jndi-datasource-examples-howto.xml Mon Jan 16 13:55:26 2006 @@ -304,25 +304,40 @@ </subsection> -<subsection name="Oracle 8i"> +<subsection name="Oracle 8i, 9i & 10g"> <h3>0. Introduction</h3> -<p><i>We would appreciate comments on this section as I'm not an Oracle DBA :-)</i></p> -<p>Oracle requires minimal changes from the MySQL configuration except for the usual gotchas :-) Firstly -by default, Tomcat will only use <code>*.jar</code> files installed in <code>$CATALINA_HOME/common/lib</code> - therefore <code>classes111.zip</code> or <code>classes12.zip</code> will need to be renamed with a <code>.jar</code> -extension. Since jarfiles are zipfiles, there is no need to unzip and jar these files - a simple rename will suffice. -Also, you should be aware that some (early) versions of Tomcat 4.0 when used with JDK 1.4 will not load classes12.zip unless -you unzip the file, remove the <code>javax.sql.*</code> class heirarchy and rejar.</p> + +<p>Oracle requires minimal changes from the MySQL configuration except for the +usual gotchas :-)</p> +<p>Drivers for older Oracle versions may be distributed as *.zip files rather +than *.jar files. Tomcat will only use <code>*.jar</code> files installed in +<code>$CATALINA_HOME/common/lib</code>. Therefore <code>classes111.zip</code> +or <code>classes12.zip</code> will need to be renamed with a <code>.jar</code> +extension. Since jarfiles are zipfiles, there is no need to unzip and jar these +files - a simple rename will suffice.</p> + +<p>Some early versions of Tomcat 4.0 when used with JDK 1.4 will not load +classes12.zip unless you unzip the file, remove the <code>javax.sql.*</code> +class heirarchy and rejar.</p> + +<p>For Oracle 9i onwards you should use <code>oracle.jdbc.OracleDriver</code> +rather than <code>oracle.jdbc.driver.OracleDriver</code> as Oracle have stated +that <code>oracle.jdbc.driver.OracleDriver</code> is deprecated and support +for this driver class will be discontinued in the next major release. +</p> + <h3>1. server.xml configuration</h3> -<p>In a similar manner to the mysql config above, you will need to define your Datasource in your server.xml -file. Here we define a Datasource called myoracle using the thin driver to connect as user scott, password tiger -to the schema called myschema in the sid called mysid. (Note: with the thin driver this sid is not the same as the tnsname)</p> +<p>In a similar manner to the mysql config above, you will need to define your +Datasource in your server.xml file. Here we define a Datasource called myoracle +using the thin driver to connect as user scott, password tiger to the sid +called mysid. (Note: with the thin driver this sid is not the same as the +tnsname). The schema used will be the default schema for the user scott.</p> <p>Use of the OCI driver should simply involve a changing thin to oci in the URL string. <source> <Resource name="jdbc/myoracle" auth="Container" - type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" - url="jdbc:oracle:thin:[EMAIL PROTECTED]:1521:mysid" + type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver" + url="jdbc:oracle:thin:@127.0.0.1:1521:mysid" username="scott" password="tiger" maxActive="20" maxIdle="10" maxWait="-1"/> </source> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]