You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Andreas Neuenschwander <an...@andi.ch> on 2001/04/24 18:19:30 UTC

[C2] cocoon.xconf Connection Pool

In the cocoon.xconf file there is an entry for common jdbc connections:

<datasources>
   <jdbc name="personnel">
   <pool-controller min="5" max="10"/>
   <dburl>jdbc:hsqldb:${install.war}/cocoon/WEB-INF/db/cocoondb</dburl>
   <user>sa</user>
   <password/>
   </jdbc>
</datasources>


I changed this to:

<datasources>
   <jdbc name="personnel">
   <pool-controller min="5" max="10"/>
   ...
   <dburl>jdbc:mysql://localhost/test</dburl>
   <user>test</user>
   <password>test</password>
   </jdbc>
</datasources>

and placed my JDBC Driver jar file in the WEB-INF/lib directory.

To get access to my MySQL Database, can I define the JDBC Driver
parameter like this:

<driver>org.gjt.mm.mysql.Driver</driver> ?

I couldn't find anything like this, even in the sources...

At the moment I can't use the <esql:pool>personnel</esql:pool> tag when I
use
the esql library.
When I use <esql:driver>...<esql:dburl>... <esql:username>...
<esql:password>
everything works fine.

How can I configure the connection pool in C2 correctly?


Thx




---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: [C2] cocoon.xconf Connection Pool

Posted by Andreas Neuenschwander <an...@andi.ch>.
> No.  Please check the documentation included with Cocoon 2.  You
> will find that you have the servlet load it at initialization time.
> In the /WEB-INF/web.xml file, you will find an initial parameter
> named "load-class".  The value is a whitespace or comma separated
> list of fully qualified class names.  Simply add the driver for
> your class in this location.  This will also work if you want to
> explicitly declare your datasources each time.
> 

Now it works fine, thanks a lot.

Andi





---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: [C2] cocoon.xconf Connection Pool

Posted by Berin Loritsch <bl...@apache.org>.
Andreas Neuenschwander wrote:
> 
> In the cocoon.xconf file there is an entry for common jdbc connections:
> 
> I changed this to:
> 
> <datasources>
>    <jdbc name="personnel">
>    <pool-controller min="5" max="10"/>
>    ...
>    <dburl>jdbc:mysql://localhost/test</dburl>
>    <user>test</user>
>    <password>test</password>
>    </jdbc>
> </datasources>

Good.

> and placed my JDBC Driver jar file in the WEB-INF/lib directory.

Correct.

> To get access to my MySQL Database, can I define the JDBC Driver
> parameter like this:
> 
> <driver>org.gjt.mm.mysql.Driver</driver> ?

No.  Please check the documentation included with Cocoon 2.  You
will find that you have the servlet load it at initialization time.
In the /WEB-INF/web.xml file, you will find an initial parameter
named "load-class".  The value is a whitespace or comma separated
list of fully qualified class names.  Simply add the driver for
your class in this location.  This will also work if you want to
explicitly declare your datasources each time.

> At the moment I can't use the <esql:pool>personnel</esql:pool> tag when I
> use
> the esql library.
> When I use <esql:driver>...<esql:dburl>... <esql:username>...
> <esql:password>
> everything works fine.

esql is designed to be compatible with both C1 and C2.

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>