[prev in list] [next in list] [prev in thread] [next in thread]
List: xml-cocoon-users
Subject: Re: Database access using sitemap parameter
From: Christian Haul <haul () dvs1 ! informatik ! tu-darmstadt ! de>
Date: 2003-09-26 15:55:52
[Download RAW message or body]
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
haul@informatik.tu-darmstadt.de
fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic