Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 7149 invoked from network); 15 Jun 2009 09:15:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Jun 2009 09:15:27 -0000 Received: (qmail 64453 invoked by uid 500); 15 Jun 2009 09:15:38 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 64369 invoked by uid 500); 15 Jun 2009 09:15:38 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 64194 invoked by uid 99); 15 Jun 2009 09:15:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jun 2009 09:15:38 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jun 2009 09:15:27 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6D104234C495 for ; Mon, 15 Jun 2009 02:15:07 -0700 (PDT) Message-ID: <1710090710.1245057307446.JavaMail.jira@brutus> Date: Mon, 15 Jun 2009 02:15:07 -0700 (PDT) From: "Felix Meschberger (JIRA)" To: dev@felix.apache.org Subject: [jira] Updated: (FELIX-925) Extend SCR to allow alternate activate and deactivate method signatures In-Reply-To: <578746754.1233993179725.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/FELIX-925?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:all-tabpanel ] Felix Meschberger updated FELIX-925: ------------------------------------ Component/s: Declarative Services (SCR) > Extend SCR to allow alternate activate and deactivate method signatures > ----------------------------------------------------------------------- > > Key: FELIX-925 > URL: https://issues.apache.org/jira/browse/FELIX-925 > Project: Felix > Issue Type: New Feature > Components: Declarative Services (SCR), Specification compliance > Affects Versions: scr-1.0.6 > Environment: OSGi RFC-0134, OSGi R4.2 Early Draft 2 (http://www.o= sgi.org/download/osgi-4.2-early-draft2.pdf) > Reporter: Felix Meschberger > Assignee: Felix Meschberger > Fix For: scr-1.2.0 > > > A way is needed to avoid using DS API at all in components with SCR. This= means the activate and deactivate methods should not require the Component= Context parameter. We should also allow the names of the activate and deact= ivate methods to be specified to avoid requiring specific method names. > To support this, the follow attributes will be added to the component ele= ment: > > > The activate attribute will specify the name of the activate method and t= he deactivate attribute will specify the name of the deactivate method. > The signature for the activate and deactivate methods is: > p r o t e c t ed vo i d (< a r gumen= t s > ) ; > can be zero or more arguments. > For the activate method each argument must be of one of the following typ= es: > =E2=97=8F ComponentContext - the Component Context for the compone= nt > =E2=97=8F BundleContext - the Bundle Context of the component's bu= ndle > =E2=97=8F Map - the Component Properties from ComponentContext.get= Properties. > If any argument of the activate method is not one of the above types, SCR= must log an error message with the Log Service, if present, and the compon= ent configuration is not activated. > For the deactivate method each argument must be of one of the following t= ypes: > =E2=97=8F int/Integer - the deactivation reason > =E2=97=8F ComponentContext - the Component Context for the compone= nt > =E2=97=8F BundleContext - the Bundle Context of the component's bu= ndle > =E2=97=8F Map - the Component Properties from ComponentContext.get= Properties. > If any argument of the deactivate method is not one of the above types, S= CR must log an error message with the Log Service, if present, and the deac= tivation of the component configuration will continue. > The methods may also be declared public. The same rules as specified in 1= 12.5.8 will be used to locate the activate and deactivate methods in the im= plementation class hierarchy. > 3.2.1 Component deactivation reasons > When a component is deactivated, the reason for the deactivation can be p= assed to the deactivate method. The following deactivation reasons are spec= ified in ComponentConstants. > /** > * The reason the component instance was deactivated is= unspecified. > * > * @since 1.1 > */ > public static final int DEACTIVATION_REASON_UNSPECIFIED = =3D 0; > /** > * The component instance was deactivated because the c= omponent was disabled. > * > * @since 1.1 > */ > public static final int DEACTIVATION_REASON_DISABLED =3D= 1; > /** > * The component instance was deactivated because a ref= erence became unsatisfied. > * > * @since 1.1 > */ > public static final int DEACTIVATION_REASON_REFERENCE = =3D 2; > /** > * The component instance was deactivated because its c= onfiguration was changed. > * > * @since 1.1 > */ > public static final int DEACTIVATION_REASON_CONFIGURATI= ON_MODIFIED =3D 3; > /** > * The component instance was deactivated because its c= onfiguration was deleted. > * > * @since 1.1 > */ > public static final int DEACTIVATION_REASON_CONFIGURATI= ON_DELETED =3D 4; > /** > * The component instance was deactivated because the c= omponent was disposed. > * > * @since 1.1 > */ > public static final int DEACTIVATION_REASON_DISPOSED = =3D 5; > /** > * The component instance was deactivated because the b= undle was stopped. > * > * @since 1.1 > */ > public static final int DEACTIVATION_REASON_BUNDLE_STOP= PED =3D 6; --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.