cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <>
Subject Re: Help! connecting to a database
Date Sat, 04 Nov 2000 20:27:50 GMT
Sorry if this reply is a bit redundant but there were some things which I 
don't think have been mentioned.

"Sergei O . Naumov" <> wrote:
>I am starting to develop a large Cocoon based project that needs to query a
>(it will probably be Oracle). The question I have is on the good way to 
>a database from XSP. In a servlet world, one connects to a database on the
>and uses this db handle to eliminate db connection overhead.

Actually no, it's not that simple, because connections may time out and 
should not be used by multiple threads simultaneously. So instead you would 
use a connection pool. Cocoon has just such a connection pool, which can be 
used either in your own code or by the sql or esql taglibs:

>I was thinking on having a taglib that would implement all the Java methods
>work with a database, and just use those in my XSP pages.

No need to reinvent the wheel. The esql taglib performs the hard work, and 
lets you insert arbitrary preprocessing logic by using esql:get-string etc. 
- totally flexible.

>Can anyone give some sort of suggestion on how to go around this? It would 
>wonderful if there are some code examples on that.


You'll need at least Cocoon 1.8 of course.

Get Your Private, Free E-mail from MSN Hotmail at

Share information about yourself, create your own public profile at

View raw message