Return-Path: Delivered-To: apmail-jakarta-hivemind-user-archive@www.apache.org Received: (qmail 77906 invoked from network); 19 Aug 2004 12:52:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 19 Aug 2004 12:52:00 -0000 Received: (qmail 47221 invoked by uid 500); 19 Aug 2004 12:51:59 -0000 Delivered-To: apmail-jakarta-hivemind-user-archive@jakarta.apache.org Received: (qmail 47204 invoked by uid 500); 19 Aug 2004 12:51:59 -0000 Mailing-List: contact hivemind-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: hivemind-user@jakarta.apache.org Delivered-To: mailing list hivemind-user@jakarta.apache.org Received: (qmail 47188 invoked by uid 99); 19 Aug 2004 12:51:59 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.27.1) with SMTP; Thu, 19 Aug 2004 05:51:58 -0700 Received: (qmail 25681 invoked by uid 65534); 19 Aug 2004 12:51:56 -0000 Received: from unknown (EHLO [192.168.115.182]) (217.7.2.243) by mail.gmx.net (mp005) with SMTP; 19 Aug 2004 14:51:56 +0200 X-Authenticated: #18751065 Message-ID: <4124A2E4.7020102@gmx-topmail.de> Date: Thu, 19 Aug 2004 14:53:56 +0200 From: Achim Huegen User-Agent: Mozilla Thunderbird 0.7.2 (Windows/20040707) X-Accept-Language: en-us, en MIME-Version: 1.0 To: hivemind-user@jakarta.apache.org Subject: Re: Problem with "multiple service points for interface" References: <1F905AA22C9BD6119BD140001001261403344569@tuiger3.tui.de> In-Reply-To: <1F905AA22C9BD6119BD140001001261403344569@tuiger3.tui.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N The definition of TestComponent2 doesn't specify a value for property component2. So autowiring is tried and searches for a unique service that implements the TestComponent interface in order to assign it to property component2. Since two services with this interface exist an error is raised. You can fix this by specifying a value for component2, but I dont't know how you can leave it null. Achim Huegen Teshler, Andre wrote: > I am working with beta-2 and use following configuration for my service: > > interface="framework.transaction.TestComponent"> > > > service-id="TestComponent*2*"/> > > > > > interface="framework.transaction.TestComponent"> > > > > > > > With implementation class: > > public class TestComponentImpl implements TestComponent { > private TestComponent *component2*; > public void setComponent2(TestComponent component2) { > this.component2 = component2; > } > // ... > } > > TestComponent1 will be initialized correctly, but acessing the property > 'component2' I get following exception: > > /Unable to autowire property component2 of service > framework.transaction.TestComponent2: There are multiple service points > for interface framework.transaction.TestComponent: > {framework.transaction.TestComponent, > framework.transaction.TestComponent2}./ > > What is wrong here ? It should be possible to define two services with > the same interface (and same implementation class) but different > injektions for member-services. > > By the way: this example has worked withe beta-1. > > Thanks. > > Andre > --------------------------------------------------------------------- To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: hivemind-user-help@jakarta.apache.org