You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@cocoon.apache.org by st...@outerthought.org on 2003/02/06 12:00:03 UTC

[WIKI-UPDATE] MySQL SpecificDatabaseConnection Thu Feb 6 12:00:03 2003

Page: http://wiki.cocoondev.org/Wiki.jsp?page=MySQL, version: 7 on Thu Feb  6 10:01:46 2003 by DerekH

- This document explains the specific aspect of connecting Cocoon to a MySQL Database.\\
?                                                                                     --

+ This document explains the specific aspects of connecting Cocoon to a MySQL Database.
?                                           +

- For a general explanation on database connection please refer to the [official documentation | http://xml.apache.org/cocoon/developing/datasources.html].
- !!Downloading the jdbc drivers
- The jdbc drivers can be downloaded [here | http://www.mysql.com/downloads/api-jdbc-stable.html].
- They are an update of the popular 'Mark Matthews' driver. (See later)\\
- Expand the zip or tar and locate the jar file mysql-connector-java-2.0.14-bin.jar.\\
- Put this in either $COCOON_HOME/web-inf/lib or $TOMCAT_HOME/common/lib/.\\
- If you're using the 'Mark Matthews' driver, the jar file is called something like mm.mysql-2.0.14-bin.jar
- !!Setting Web.xml
+ For a general explanation on database connections please refer to the [official Cocoon documentation | http://xml.apache.org/cocoon/developing/datasources.html].
+ 
+ !!Installing the JDBC drivers
+ 
+ * The JDBC drivers can be downloaded from the [mySQL.com | http://www.mysql.com/downloads/api-jdbc-stable.html] website. (They are an update of the popular 'Mark Matthews' driver. (See later)\\
+ * Expand the zip or tar file and locate the jar file {{mysql-connector-java-2.0.14-bin.jar}} (if you're using the 'Mark Matthews' driver, the jar file is called something like mm.mysql-2.0.14-bin.jar)
+ * Copy this file into either $COCOON_HOME/web-inf/lib or $TOMCAT_HOME/common/lib/ 
+ 
+ !!Setting the web.xml configuration
+ 
- !!Setting cocoon.xconf
+ !!Setting the cocoon.xconf configuration
+ 
- search for:
? ^

+ Search for:
? ^

- The ?autoReconnect=true tip is cribbed from the tomcat JNDI datasource HOWTO [here | http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html] to get round the fact that MySQL by default drops connections that have been idle for 8 hours
?                                                 ^                           ------

+ The ?autoReconnect=true tip is cribbed from the [Tomcat JNDI datasource HOWTO | http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html] to get around the fact that MySQL by default drops connections that have been idle for 8 hours
?                                                 ^^                                                                                                                          +

- !!Setting sitemap.xmap
+ 
+ !!Setting the sitemap.xmap configuration
+ 
- When you want to use the connection you just call the jdbc name inside the pipeline in this way:
?                                                       ^^^^

+ When you want to use the connection you just call the JDBC name inside the pipeline in this way:
?                                                       ^^^^



Page: http://wiki.cocoondev.org/Wiki.jsp?page=SpecificDatabaseConnection, version: 25 on Thu Feb  6 10:05:48 2003 by DerekH

+ 
- Here you will find the operations and the tricks to connect Cocoon to __your__ database.\\
?                                                                                         --

+ Here you will find the operations and the tricks to connect Cocoon to __your__ database.
+ 
- In the official documentation there are no informations about where to find the jdbc driver or the specific class to load. This document's aim is to fill that gap.
?                                     ^^^               -

+ In the official documentation there is no information about where to find the [JDBC|http://java.sun.com/products/jdbc/] driver or the specific class to load. This document's aim is to fill that gap.
?                                     ^^                                        +++++++++++++++++++++++++++++++++++    ++

- For complete instructions please refer to the official documentation on [database access | http://xml.apache.org/cocoon/developing/datasources.html].\\
?                                                                                                                                                      --

+ For complete instructions please refer to the official documentation on [database access | http://xml.apache.org/cocoon/developing/datasources.html].
+ 
- If your database is not listed and you have succeded in connecting please contribute to this page.\\
?                                                                                                   ^^

+ If your database is not listed and you have succeded in connecting please contribute to this page.-- [Gabridome]
?                                                                                                   ^^^^^^^^^^^^^^

- -- [Gabridome]
+ 
- I would be very interested to hear whether anyone has attempted to use Cocoon with Apache Torque which is a Object->relational tool used in Apache Turbine. This would save a lot of ugly ESQL code.... if it was used. [AlexMcLintock]\\
+ ''I would be very interested to hear whether anyone has attempted to use Cocoon with Apache Torque which is a Object->relational tool used in Apache Turbine. This would save a lot of ugly ESQL code.... if it was used.'' -- [AlexMcLintock]\\
? ++                                                                                                                                                                                                                       +++++