You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Michael Alsen <mi...@cyberlab.de> on 2001/04/10 10:28:07 UTC
ConnectionPool
hello,
I use cocoon 1.8.2 on WinNT4.0 and the JDK1.3
I want to use the ConnectionPool of coocon in an application. This
application should run without cocoon only with the turbine-pool.jar.
my code:
TurbineResourceService trs = new TurbineResourceService();
Properties prop = new Properties();
prop.setProperty("services.TurbineResourceService.classname",
"org.apache.turbine.services.resources.TurbineResourceService");
ConnectionPool pool = new ConnectionPool();
DBConnection db = pool.getConnection("driver","url","user","pwd");
Connection connection = db.getConnection();
pool.releaseConnection(db);
Exception:
java.lang.InstantiationException: Database type
oracle.jdbc.driver.OracleDriver not implemented.
at
org.apache.turbine.util.db.adapter.DBFactory.create(DBFactory.java:174)
at
org.apache.turbine.util.db.pool.ConnectionPool.getNewConnection(ConnectionPool.java:247)
at
org.apache.turbine.util.db.pool.ConnectionPool.getConnection(ConnectionPool.java:202)
at PoolTest.main(PoolTest.java:32)
I have to get access to a Vector wich contains the "database.adaptors",
to put my driver in it.
Has someone a hint for me ?
Or where can I get the sourcecode from
org.apache.turbine.services.resources.TurbineResources. The code from
the turbine homepage is not the code wich is used in the
turbine-pool.jar (version 1.8.2).
thank you
---------------------------------------------------------------------
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: ConnectionPool
Posted by Brian P Millett <bp...@ec-group.com>.
Michael Alsen wrote:
> hello,
> I use cocoon 1.8.2 on WinNT4.0 and the JDK1.3
> I want to use the ConnectionPool of coocon in an application. This
> application should run without cocoon only with the turbine-pool.jar.
>
> my code:
>
> TurbineResourceService trs = new TurbineResourceService();
> Properties prop = new Properties();
> prop.setProperty("services.TurbineResourceService.classname",
>
> "org.apache.turbine.services.resources.TurbineResourceService");
> ConnectionPool pool = new ConnectionPool();
> DBConnection db = pool.getConnection("driver","url","user","pwd");
> Connection connection = db.getConnection();
> pool.releaseConnection(db);
>
> Exception:
>
> java.lang.InstantiationException: Database type
> oracle.jdbc.driver.OracleDriver not implemented.
This is caused from the other parameters defined in the cocoon.properties file. There are a couple
of ways around this.
One is that if you don't mind having the cocoon engine initialized, then (if using JServ) add to the
zone that has the cocoon servlet defined:
servlets.startup=org.apache.cocoon.Cocoon
Then you can access the pools defined in the cocoon.properties from your independent code. If you
are not using JServ, but other servlet engines, then you need to set it up (servlet initialization
apon startup) according to that particular engine.
The other way is that you need a separate turbine properties file as documented in the turbine
docs. But then you aren't using the cocoon connection pool.
--
Brian Millett
Enterprise Consulting Group "Shifts in paradigms
(314) 205-9030 often cause nose bleeds."
bpm@ec-group.com Greg Glenn
---------------------------------------------------------------------
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: ConnectionPool
Posted by Donald Ball <ba...@webslingerZ.com>.
On Wed, 11 Apr 2001, Josh Hochman wrote:
> > I use cocoon 1.8.2 on WinNT4.0 and the JDK1.3
> > I want to use the ConnectionPool of coocon in an application. This
> > application should run without cocoon only with the turbine-pool.jar.
>
> You might want to take a look at jakarta-commons-sandbox "dbcp". It's a
> drop-in JDBC connection pool framework. I'm in the process of installing it
> - so I'm not sure how it performs, but I'm going to use it instead of
> Turbine. Here's a URL:
>
> http://jakarta.apache.org/cvsweb/index.cgi/jakarta-commons-sandbox/dbcp/
hey, if it works pretty well and configures pretty easily, i'd switch c1's
database pool over to it instead. that would make sam ruby happy. let us
know if you have success.
- donald
---------------------------------------------------------------------
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: ConnectionPool
Posted by Josh Hochman <jm...@kokyu.com>.
Michael Alsen asked:
> I use cocoon 1.8.2 on WinNT4.0 and the JDK1.3
> I want to use the ConnectionPool of coocon in an application. This
> application should run without cocoon only with the turbine-pool.jar.
You might want to take a look at jakarta-commons-sandbox "dbcp". It's a
drop-in JDBC connection pool framework. I'm in the process of installing it
- so I'm not sure how it performs, but I'm going to use it instead of
Turbine. Here's a URL:
http://jakarta.apache.org/cvsweb/index.cgi/jakarta-commons-sandbox/dbcp/
Good luck.
Josh Hochman
---------------------------------------------------------------------
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>