Andrea,

That sounds about right. With DS1.1 using the "activate" attribute of
the component element, the method can throw both checked and unchecked
exceptions. In either case SCR should log the error to LogService (if
present) and should not register any services for the instance.

Neil

On Mon, May 3, 2010 at 3:28 PM, Andrea Zoppello <zoppe...@tiscali.it> wrote:
> Hi all,
>
> In my project i'm using a lot OSGi DS and in particulra component factories
> to create DS component/services.
>
> In my DS Component Factories i'm using the activate() method to perform some
> initialization step i need
> to do in my components.
>
> In my case if the code in the activate method() fail this must result in a
> failure of component creation, and must
> result in *non registration* of the services provided by the component.
>
> At the moment i've solved this throwing a RuntimeException from the activate
> method but i'm not sure this is the
> right way to do...
>
> Any suggestion??
>
> Andrea
> _______________________________________________
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev
>
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to