Documentation regarding the configuration and deployment of .war file is out of 
date
------------------------------------------------------------------------------------

                 Key: ODE-871
                 URL: https://issues.apache.org/jira/browse/ODE-871
             Project: ODE
          Issue Type: Improvement
          Components: Documentation
         Environment: All
            Reporter: Pid
            Priority: Minor


The following sample code from the ODE deployment documentation is inaccurate 
in current versions of Tomcat.

From: http://ode.apache.org/war-deployment.html

<Context path="/ode" docBase="ode" debug="5" reloadable="true" 
crossContext="true">
         <Resource name="jdbc/ODEDB" auth="Container" 
type="javax.sql.DataSource"
                 maxActive="100" maxIdle="30" maxWait="10000"
                 username="root" password="" 
driverClassName="com.mysql.jdbc.Driver"
                 url="jdbc:mysql://localhost:3306/ode?autoReconnect=true"/>
 </Context>

>From Tomcat 5.5 onwards Context definitions should not be placed in 
>server.xml. The ODE.war file should include a META-INF/context.xml file 
>containing any default settings for the application.  

N.B. 
- The 'debug' attribute has been deprecated.
- The 'path' and 'docBase' attributes must not be used here, Tomcat will deploy 
the .war using the filename as the path
- The 'reloadable' attribute is true by default

The result is:

// Note to ODE devs (Add Apache License Header here)
<Context crossContext="true">
  // http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html
  // Uncomment the following and edit as appropriate
  /*
<Resource name="jdbc/ODEDB" 
                 auth="Container" 
                 type="javax.sql.DataSource"
                 maxActive="100" maxIdle="30" maxWait="10000"
                 driverClassName="com.mysql.jdbc.Driver"
                 validationQuery="/* ping */ select 1"  // newer MySQL drivers 
will detect & use this; it's better
                 username="root" password="" 
                 url="jdbc:mysql://localhost:3306/ode"/>    
  */
</Context>

Tomcat will copy this file to: %tomcat%/conf/Catalina/localhost/ODE.xml on 
deployment, and it can be edited there to include the database definition 
thereafter.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to