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.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to