cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcelo F. Ochoa" <>
Subject RE: [C2] DataSources Proposal
Date Sat, 06 Jan 2001 00:28:00 GMT
+1024 with this.
I have a plan to implement something like this for the new generator for Cocoon 2 of DB Prism
But its a good idea re-use this component with other resources like esql.
How about to defined component for ConnectionPooling and JTA transaction API supported by
JDBC 2.0 drivers?
Best regards, Marcelo.

-----Mensaje original-----
De:	Berin Loritsch []
Enviado el:	viernes 5 de enero de 2001 18:17
Asunto:	[C2] DataSources Proposal

I am in the process of attempting to use Cocoon in a J2EE infrastructure.  This means using
the DataSources included in the J2EE Container.  There are two issues that I want to solve
in preparing Cocoon 2 to work seemlessly in this environment.  The first is using one
DataSource definition for _ALL_ the database connections in esql and the sql transformer.
This makes the management of datasources much easier to the end user.  The second is using
JNDI to obtain the DataSource from the J2EE Container.

I propose to solve the issue in this manner:

Create a DataSourceComponent in Cocoon that inherits from Component, Poolable,
Configurable, and DataSource.  Create a JdbcDataSource that calls the JDBC
Driver using the normal connection parameters (dburl, driver, usernam, password).
Create a J2eeDataSource that calls the JDBC Driver through JNDI.

In both instances, the DataSource is a Component, so every XSP page or any other
Composer will be able to have access to it.  (Imagine setting Actions to directly
handle the database without having to worry about complex configurations).

The J2eeDataSource will only be compiled when JNDI is present.

Toward that end, I need to know if this is something that you guys would be interested
in having in the Cocoon source.  If that is the case, I need to know what package name
to use.  I was thinking the following:


They would be included in the cocoon.xconf file using a ComponentSelector because
you can potentially have multiple database connections in Cocoon.

Any thoughts or requests for clarification?

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

View raw message