cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hussayn <>
Subject Re: How to configure the cocoon-2.2 database block ?
Date Wed, 29 Oct 2008 11:32:56 GMT

Hi, all. 

>From your valuable input i have started a cookbook example as seen below. I
have described, how
to add the dependencies for the database block and the db-driver into the
pom.xml (see below)

Now i got followup questions:

1.) Do i still have to create a file as
described in

2.) Where do i declare the database connection string ?

     I have read about datasources, which have to be defined in cocoon.xconf
     But i doubt, this is correct for maven driven cocoon-2.2.
     I even cant find a cocoon.xconf in my block ...

3.) Once i have declared the database connection, how do i actually access
     database through cocoon ? I see the following actions been described in
     database document mentioned above:

     * DatabaseAddAction
     * DatabaseAddAction
     * DatabaseAuthenticatorAction
     * DatabaseCookieAuthenticatorAction
     * DatabaseDeleteAction
     * DatabaseDeleteAction
     * DatabaseQueryAction
     * DatabaseSelectAction
     * DatabaseSelectAction
     * DatabaseUpdateAction
     * DatabaseUpdateAction
     * OraAddAction
     * OraUpdateAction

      Where can i find working examples how to use these actions from the
sitemap ?

Thanks for any follow up hint.

regards, hussayn


This is the beginning of a database cookbook. I plan to put it into the
official cocoon
documentation when it is finished. If anyone could give me helpfull advices
corrections, that would be really a great help for me ...)


Setting up a database driven application using the database-block

1.) Add a dependency entry for the database block to your pom file.
     Currently version 1.0.0 is used. The dependency entry is:


2.) Add a dependency entry for your Database driver to your pom file.
     For example, if you want to use MySQL, you can directly write:


    NOTE: If you need to use another driver for another database, which is
not publically
    available from the internet, you always can install it into your local
maven repository
    and then add it as dependency simlar to the MySQL driver example above.
    Assume, you have developed your own "superdriver", or got a propriate
    from your database vendor. Then you can install it to your local maven
    as follows:

    mvn install:install-file -Dfile=mySuperDriver.jar \

    Once, your driver is installed, you can declare the dependency entry in
your pom:


cookbook end (to be completed)
View this message in context:
Sent from the Cocoon - Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message