You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Marco Pauck <pa...@wmd.de> on 2000/09/25 23:01:12 UTC
Connection pooling and MySQL
I noticed that cocoon.properties (for 1.8) doesn't contain a database
adaptor for MySQL although Turbine supports MySQL.
After I added a definition for my MySQL JDBC driver I got the following
error:
Database type org.gjt.mm.mysql.Driver not implemented.java.lang.InstantiationException: Database type org.gjt.mm.mysql.Driver not implemented.
at org.apache.turbine.util.db.pool.DBFactory.create(DBFactory.java:135) at
[...]
So which version of Turbine is used?
And how can I access MySQL?
(Without Turbine and collection pooling everything works fine.)
Marco
Xinclude question!
Posted by Mats Norén <ma...@spectral.se>.
Tricky question coming up (for me at least) !
Is there a way to include dynamic XSP-pages into one file.
This is what I want to do..(maybe this isn't the best solution but hey, give me a better one then..:-)
1. Generate a menu using the esql-taglib. (the same over the entire site)
2. Generate the content of the page using the esql-taglib.
3. Merge the two together using XInclude
4. do transform it with XSLT
Another one:
1. Generate a menu using the esql-taglib. (the same over the entire site)
2. Make a form to edit the menu...
3. Merge the two
4. Transform
menu.xml
Example:
Let's pretend that the output of the esql.xml is:
<menu>
<item title="a" link="a" />
<item title="b" link="b" />
<item title="c" link="c" />
<item title="d" link="d" />
</menu>
Now, using fp I would like to do something like this:
form.xml
<if-get>
<form action="form.xml">
<input name="reference to item no 1/title">reference item no 1/title</input>
<input name="reference to item no 1/link">reference item no 1/link</input>
<input name="submit" value="submit......etc
</form>
<if-get>
<if-post>
write to db
</if-post>
If I add the output from esql.xml to the form.xml using Xinclude and then transform them using XSLT then the esql-tags are not evaluated.
What I would like to do is to evaluate the esql-page and include it in the form.xml like this.
<menu>
<item title="a" link="a" />
<item title="b" link="b" />
<item title="c" link="c" />
<item title="d" link="d" />
</menu>
<fp:if-get>
<form action="form.xml">
<input name="reference to item no 1/title" label="">reference item no 1/@title</input>
<input name="reference to item no 1/link" label="">reference item no 1/@link</input>
<input name="submit" value="submit......etc
</form>
<fp:if-get>
<fp:if-post>
write to back the changed menuitem to db
</fp:if-post>
Then I would like to transform the appropriate item-values into the corresponding input tag.
Is there better way to do this ? It seems rather clumsy.
I tried to mix the two taglibs together but it wouldn't compile (See previous posts)
/Mats
Re: Connection pooling and MySQL
Posted by Marco Pauck <pa...@wmd.de>.
Brian P Millett wrote:
>
> Marco Pauck wrote:
>
> > I noticed that cocoon.properties (for 1.8) doesn't contain a database
> > adaptor for MySQL although Turbine supports MySQL.
> >
> > After I added a definition for my MySQL JDBC driver I got the following
> > error:
> >
> > Database type org.gjt.mm.mysql.Driver not implemented.java.lang.InstantiationException: Database type org.gjt.mm.mysql.Driver not implemented.
> > at org.apache.turbine.util.db.pool.DBFactory.create(DBFactory.java:135) at
> > [...]
> >
> > So which version of Turbine is used?
> > And how can I access MySQL?
>
> >From the latest CVS, it looks like the adaptor is defined to use DBMM, which is in the cocoon1.8 distribution.
>
> #### MySQL
> database.adaptor=DBMM
> database.adaptor.DBMM=org.gjt.mm.mysql.Driver
>
> I'd add the above to the cocoon.properties file and try again.
That worked! Thanks a lot!
Marco
Re: Connection pooling and MySQL
Posted by Brian P Millett <bp...@ec-group.com>.
Marco Pauck wrote:
> I noticed that cocoon.properties (for 1.8) doesn't contain a database
> adaptor for MySQL although Turbine supports MySQL.
>
> After I added a definition for my MySQL JDBC driver I got the following
> error:
>
> Database type org.gjt.mm.mysql.Driver not implemented.java.lang.InstantiationException: Database type org.gjt.mm.mysql.Driver not implemented.
> at org.apache.turbine.util.db.pool.DBFactory.create(DBFactory.java:135) at
> [...]
>
> So which version of Turbine is used?
> And how can I access MySQL?