Return-Path: X-Original-To: apmail-felix-users-archive@minotaur.apache.org Delivered-To: apmail-felix-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9458618EA2 for ; Tue, 8 Sep 2015 02:03:29 +0000 (UTC) Received: (qmail 22828 invoked by uid 500); 8 Sep 2015 02:03:28 -0000 Delivered-To: apmail-felix-users-archive@felix.apache.org Received: (qmail 22770 invoked by uid 500); 8 Sep 2015 02:03:28 -0000 Mailing-List: contact users-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@felix.apache.org Delivered-To: mailing list users@felix.apache.org Delivered-To: moderator for users@felix.apache.org Received: (qmail 19053 invoked by uid 99); 8 Sep 2015 01:59:12 -0000 X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.144 X-Spam-Level: ** X-Spam-Status: No, score=2.144 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FORGED_MSGID_YAHOO=2.244, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:mime-version:subject:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=Q12OCfjNwdUrCy8udhQz7g6D+7mSlkEJXsCr5PA5xeY=; b=TZMLG/COSWx4r+qMIRtkWDkRh7mHGPGyN8Pd0vSkYnhFgsOR6BnIiZ522GH170vubP B4z58+9HdXSPI+U6S4V6SQuNeAZAXXL3zGtKYi95HKBCIta8NroMuF29H/0YC0tTQqRh 45rq6mMKrrI98hyY2JnCvMMfy00pUQJ3fwSoMYLeOOMhz9DZ7im8IHHKPYKtrDahxl2T IGNzjhLxbA2yN4O0m/EQTErQeu6C5bfiOiYsteQfC9mmTvVyjq8j0gUj8oJErjYM6jD+ 5ZJEJ6bmySPzcvUVC73lmEdLm+xLsvEZfNJOStKEP6QCu0WAmSWlOioc4sjBSRu/vsCJ pJ3w== X-Received: by 10.140.43.118 with SMTP id d109mr31409603qga.1.1441677542262; Mon, 07 Sep 2015 18:59:02 -0700 (PDT) From: David Jencks X-Google-Original-From: David Jencks Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: How to 'let the dust settle' with DS? In-Reply-To: Date: Mon, 7 Sep 2015 21:58:58 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: <5FB3EC1F-B49D-4639-9DDF-A49374943DEB@yahoo.com> <6BFF2F6D-059C-43BE-AE09-93466A9E3914@yahoo.com> <55EDCFBA.8040605@composent.com> <275B9C64-E827-4FAD-9706-A749942F4BF9@yahoo.com> To: users@felix.apache.org X-Mailer: Apple Mail (2.2104) > On Sep 7, 2015, at 8:07 PM, Benson Margulies = wrote: >=20 > The cardinality in the config admin does not seem to be sticking: >=20 > @Component(configurationPolicy =3D ConfigurationPolicy.REQUIRE, > configurationPid =3D "com.basistech.ws.worker") >=20 > And: >=20 > @Reference(cardinality =3D ReferenceCardinality.MULTIPLE, policyOption = =3D > ReferencePolicyOption.GREEDY) > public void setWorkerComponentService(WorkerComponentService > workerComponentService) { >=20 > And in the relevant Karaf cfg file (com.basistech.ws.worker.cfg): >=20 > # This is a DS property. It tells DS that there is one component > service that we are consuming. > WorkerComponentService.cardinality.minimum=3D1 >=20 > And the reference name in the DS metadata is WorkerComponentService. >=20 > but the component goes ahead and activates when it has none (due to > leaving out the component); the activation throws an exception due to > my own code complaining. >=20 > In spite of the exception thrown in the @Activate method, the > component goes to REGISTERED, is there some particular exception that > would prevent that? >=20 > I have it working (up to the point of fun with Json deserialization > from CXF, which is also working mostly) by putting the component in > place, but eventually I need the constraint to hold things up; and it > would be nice to have a way for an exception in activation to stop the > train. The spec says: =E2=80=A2 Once the component config- uration is deactivated or = fails to activate due to an exception, SCR must unbind all the = component's bound services and discard all references to the component = instance associated with the activation.=20 Note that this doesn=E2=80=99t disable the component or unregister any = services it may be exposing, because the exception may be highly = transient, and e.g. the next time someone gets the service all may work = smoothly and activate succeed. I don=E2=80=99t know what version of ds you are =E2=80=9Cstuck=E2=80=9D = with, at some point in the distant past I think that an exception on = activation did something like disabling the component. Due to all the = cool new 1.3 features you should use the latest release 2.0 but the = previous release may have also had the cardinality.minimum support=E2=80=A6= but don=E2=80=99t quote me :-) thanks david jencks >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org > For additional commands, e-mail: users-help@felix.apache.org >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@felix.apache.org For additional commands, e-mail: users-help@felix.apache.org