cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject [C2] DataSources Proposal
Date Fri, 05 Jan 2001 21:16:58 GMT
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:

org.apache.cocoon.components.datasource/
DataSourceComponent
JdbcDataSource
J2eeDataSource

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?


Mime
View raw message