cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <>
Subject Re: Database access using sitemap parameter
Date Fri, 26 Sep 2003 15:55:52 GMT
On 26.Sep.2003 -- 05:37 PM, Stephen Winnall wrote:
> Hi
> I am writing a generator which returns metadata from a database via JDBC.
> I would like to retrieve the name of the database from the pool declared
> in cocoon.xconf. The examples that I have seen show how to do this by
> extending ComposerGenerator and setting the DataSource in the method
> 'compose'.
> As I understand it, this means that the database name is effectively
> hard-coded because 'compose' is only called when Cocoon is initialised.

AFAIK the contract is that you don't access other components earlier
than compose() in the Avalon lifecycle. If you have a reference to the
component manager through compose(), you can use it later to lookup
any datasource / selector later on. E.g. the database actions do that.

C h r i s t i a n       H a u l
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

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

View raw message