From dev-return-96011-apmail-cocoon-dev-archive=cocoon.apache.org@cocoon.apache.org Tue Aug 07 16:19:03 2007 Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 8572 invoked from network); 7 Aug 2007 16:18:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Aug 2007 16:18:59 -0000 Received: (qmail 60336 invoked by uid 500); 7 Aug 2007 16:18:57 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 59991 invoked by uid 500); 7 Aug 2007 16:18:56 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 59980 invoked by uid 99); 7 Aug 2007 16:18:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Aug 2007 09:18:56 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.9] (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 07 Aug 2007 16:18:50 +0000 Received: (qmail 7405 invoked from network); 7 Aug 2007 16:18:34 -0000 Received: from localhost (HELO carsten-ziegelers-computer.local) (127.0.0.1) by localhost with SMTP; 7 Aug 2007 16:18:34 -0000 Message-ID: <46B89BDB.3010200@apache.org> Date: Tue, 07 Aug 2007 18:20:43 +0200 From: Carsten Ziegeler User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: [jira] Commented: (COCOON-2106) DatabaseReader and SQLTransformer cannot obtain datasource References: <12162514.1186503119121.JavaMail.jira@brutus> In-Reply-To: <12162514.1186503119121.JavaMail.jira@brutus> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Discussions should better take place in the mailing list :) Carsten Grzegorz Kossakowski (JIRA) wrote: > [ https://issues.apache.org/jira/browse/COCOON-2106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518179 ] > > Grzegorz Kossakowski commented on COCOON-2106: > ---------------------------------------------- > > If registration of wrapper is implemented that bridge won't be needed anymore and should be removed. I also think that further discussion about wrappers should continue in COCOON-2083 because it's an issue covering the task of datasources bridging. Unfortunately, I'll not have enough free time to implement registration in upcoming days so I'll unassign myself from both issues. However, I'll be happy to help any volunteer. > > When it comes to Avalon sources not correctly looked up in Avalon components I have no idea why it doesn't work. I guess that the answer is in SpringToAvalonDataSourceBridge becuse it replaces original Avalon's DataSourceComponentSelector so even Avalon sources are handled by this component. > > Kazo, if you wanted to dig into this particular issue I think it's not worth the effort because as I said earlier whole bridge should be replaced by wrappers registration. > >> DatabaseReader and SQLTransformer cannot obtain datasource >> ---------------------------------------------------------- >> >> Key: COCOON-2106 >> URL: https://issues.apache.org/jira/browse/COCOON-2106 >> Project: Cocoon >> Issue Type: Bug >> Components: Blocks: Databases >> Affects Versions: 2.2-dev (Current SVN) >> Reporter: Kazó Csaba >> Assignee: Grzegorz Kossakowski >> Attachments: dbreader.diff, sqltrans.diff >> >> >> The DatabaseReader and SQLTransformer components fail to obtain the configured data source and throw a ServiceException like "Component with 'org.apache.avalon.excalibur.datasource.DataSourceComponent/personnel' is not defined in this service manager. (Key='AvalonServiceManager')". The failing function call in both cases is: >> this.manager.lookup(DataSourceComponent.ROLE + '/' + datasourceName) >> The result is the same regardless of whether the data source is defined as an Avalon component or a Spring bean. >> Changing the code to use ServiceSelector as in the "Creating a Reader" document [1] and the modular database actions solves the problem for both cases. The attached patch applies this modification to DatabaseReader.java. >> [1] http://cocoon.zones.apache.org/daisy/cdocs/g1/g1/g2/g1/g2/681.html > -- Carsten Ziegeler cziegeler@apache.org