You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Humberto Cervantes <hc...@xanum.uam.mx> on 2006/04/22 01:39:18 UTC

Declarative Services

Hello everyone,

I wanted to let everyone know that I committed an initial, but 
incomplete version of the Service Component runtime for Felix. This 
runtime is derived from the Service Binder's code. At this point, the 
runtime parses the Declarative Service's descriptor and is capable of 
creating immediate and delayed components (factories are not yet 
supported though).

Since we have not decided on a hook for Felix to get bundle contexts, to 
use it you must specify a generic activator for your bundle activator, 
but it is no longer necessary to create a subclass as it was done with 
the ServiceBinder. You simply need to put the following Bundle-Activator 
entry in the manifest:

    Bundle-Activator: org.apache.felix.scr.GenericActivator

This will change in the future once we get the framework hook figured out.

You can find under the root directory a file named 'todolist.txt' which 
lists the main aspects which haven't been implemented yet.

Please be aware that this is a very preliminary version that still needs 
a lot of improvement and testing. Any contributions from others are 
certainly welcome.



Humberto

-- 
------------------------------------------------------
Humberto Cervantes <hc...@xanum.uam.mx>
Web: http://www.humbertocervantes.net

Universidad Autonoma Metropolitana-Iztapalapa,
San Rafael Atlixco Nº 186, Col. Vicentina, C.P. 09340
Delegación Iztapalapa. Distrito Federal, Mexico

Tel: (52) 55 5804 4634 ext 212
------------------------------------------------------



Re: Declarative Services

Posted by "Richard S. Hall" <he...@ungoverned.org>.
This is definitely excellent news and should provide a good jump start 
for a complete DS impl, thanks a lot for getting this going.

We need to start thinking about how we want to hook into the 
framework...I will start burning some cycles on that.

-> richard

Humberto Cervantes wrote:
> Hello everyone,
>
> I wanted to let everyone know that I committed an initial, but 
> incomplete version of the Service Component runtime for Felix. This 
> runtime is derived from the Service Binder's code. At this point, the 
> runtime parses the Declarative Service's descriptor and is capable of 
> creating immediate and delayed components (factories are not yet 
> supported though).
>
> Since we have not decided on a hook for Felix to get bundle contexts, 
> to use it you must specify a generic activator for your bundle 
> activator, but it is no longer necessary to create a subclass as it 
> was done with the ServiceBinder. You simply need to put the following 
> Bundle-Activator entry in the manifest:
>
>    Bundle-Activator: org.apache.felix.scr.GenericActivator
>
> This will change in the future once we get the framework hook figured 
> out.
>
> You can find under the root directory a file named 'todolist.txt' 
> which lists the main aspects which haven't been implemented yet.
>
> Please be aware that this is a very preliminary version that still 
> needs a lot of improvement and testing. Any contributions from others 
> are certainly welcome.
>
>
>
> Humberto
>

Re: NLOG4J, Declarative Services, and System out

Posted by Humberto Cervantes <hc...@xanum.uam.mx>.
Hello John,

This is probably a bug, however I don't understand why it may be 
happening. Currently trace and error messages are enabled by default and 
they are sent to the console using System.out. Traces and errors are 
centralized on the trace() and error() methods of the GenericActivator 
to facilitate a future transition towards a more appropritate logging 
mechanism. This is the same as it was in the Service Binder and I have 
just checked the code of the SB available in the repository to see if it 
has been changed to use something else for its logs, but it hasn't. In 
the examples I am using to test, traces are showing fine...

I will try to give it a look this weekend.

Regards,

Humberto



John E. Conlon escribió:
> I am using SLF4J for logging with my felix bundles. To do this I utilize
> a logging bundle that wraps NLOG4J and jcl104-over-slf4j and declares
> the exportPackage element as:
> <exportPackage>org.apache.commons.logging;version=1.0.0,org.slf4j;version=1.2.24,org.apache.log4j</exportPackage>
>
> Started experimenting with the new Declarative Services implementation
> today and notice some interesting differences from the serviceBinder. 
>
> After I made the switch I noticed that my NLOG4J infrastructure was no
> longer outputting log messages to the console. So I tried to just send
> to standard out with System.out.print, but that would not work either.
>
> Is it a feature or bug in the SCR??
>
> cheers,
> John
>   

-- 
------------------------------------------------------
Humberto Cervantes <hc...@xanum.uam.mx>
Web: http://www.humbertocervantes.net

Universidad Autonoma Metropolitana-Iztapalapa,
San Rafael Atlixco Nº 186, Col. Vicentina, C.P. 09340
Delegación Iztapalapa. Distrito Federal, Mexico

Tel: (52) 55 5804 4634 ext 212
------------------------------------------------------



NLOG4J, Declarative Services, and System out

Posted by "John E. Conlon" <jc...@verticon.com>.
I am using SLF4J for logging with my felix bundles. To do this I utilize
a logging bundle that wraps NLOG4J and jcl104-over-slf4j and declares
the exportPackage element as:
<exportPackage>org.apache.commons.logging;version=1.0.0,org.slf4j;version=1.2.24,org.apache.log4j</exportPackage>

Started experimenting with the new Declarative Services implementation
today and notice some interesting differences from the serviceBinder. 

After I made the switch I noticed that my NLOG4J infrastructure was no
longer outputting log messages to the console. So I tried to just send
to standard out with System.out.print, but that would not work either.

Is it a feature or bug in the SCR??

cheers,
John










Re: Declarative Services

Posted by Enrique Rodriguez <en...@gmail.com>.
On 4/21/06, Humberto Cervantes <hc...@xanum.uam.mx> wrote:
> Hello everyone,
>
> I wanted to let everyone know that I committed an initial, but
> incomplete version of the Service Component runtime for Felix ...

FYI, I added support for "Service-Component" to the Felix M2 Plugin.

Enrique

Re: Declarative Services

Posted by Enrique Rodriguez <en...@gmail.com>.
On 4/21/06, Humberto Cervantes <hc...@xanum.uam.mx> wrote:
> Hello everyone,
>
> I wanted to let everyone know that I committed an initial, but
> incomplete version of the Service Component runtime for Felix. ...

This is great news!  I just built and installed it in Felix.  I will
migrate some bundles currently using Service Binder and give some
feedback.

I will open 2 issues that I hope to address myself:

1)  Update the "spellcheckservice" examples that currently use Service
Binder to use SCR.

2)  Update Service Binder to use kxml 2.2.2.

Enrique