3.5M6 Declarative Services [message #52378] |
Sat, 28 March 2009 02:02  |
Eclipse User |
|
|
|
Hi,
I tried 3.5M6 Declarative Services. I created a new plug-in project
based on the "Hello OSGi Declarative Service" template.
I then created a new Interface ITest with a simple String getText()
method definition, adjusted the generated ServiceComponent (implements
ITest) and added the Service to component.xml
---------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0"
name="de.vogella.osgi.testing">
<implementation class="de.vogella.osgi.testing.ServiceComponent"/>
<service>
<provide
interface="org.eclipse.osgi.framework.console.CommandProvider "/>
<provide interface="de.vogella.osgi.testing.ITest"/>
</service>
</scr:component>
----------------------------------
If I start my bundle I see that is running (ss in the OSGi console).
id State Bundle
0 ACTIVE org.eclipse.osgi_3.5.0.v20090311-1300
3 ACTIVE de.vogella.osgi.testing_1.0.0
Gut I do not see my ITest service if I type "services" in the OSGi console.
Any advice?
Best regards, Lars
|
|
|
|
|
|
Re: 3.5M6 Declarative Services [message #52513 is a reply to message #52487] |
Sun, 29 March 2009 09:24  |
Eclipse User |
|
|
|
Hi,
I added the decription how to create a declarative service with 3.5M6 to
http://www.vogella.de/articles/OSGi/article.html
Best regards, Lars
Lars Vogel wrote:
> Hi Chris,
>
> thank you, now it works.
>
> Best regards, Lars
>
>
> Chris Aniszczyk wrote:
>> Lars Vogel wrote:
>>> If I start my bundle I see that is running (ss in the OSGi console).
>>>
>>> id State Bundle
>>> 0 ACTIVE org.eclipse.osgi_3.5.0.v20090311-1300
>>> 3 ACTIVE de.vogella.osgi.testing_1.0.0
>>>
>>> Gut I do not see my ITest service if I type "services" in the OSGi
>>> console.
>>>
>>> Any advice?
>>
>> Sure, I don't the org.eclipse.equinox.ds bundle... and it's not ACTIVE
>> therefore how is DS going to work without DS being active or there ;)?
>>
>> Cheers,
>>
>> Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
>> http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
|
|
|
Re: 3.5M6 Declarative Services [message #594131 is a reply to message #52378] |
Sat, 28 March 2009 14:30  |
Eclipse User |
|
|
|
Lars Vogel wrote:
> If I start my bundle I see that is running (ss in the OSGi console).
>
> id State Bundle
> 0 ACTIVE org.eclipse.osgi_3.5.0.v20090311-1300
> 3 ACTIVE de.vogella.osgi.testing_1.0.0
>
> Gut I do not see my ITest service if I type "services" in the OSGi console.
>
> Any advice?
Sure, I don't the org.eclipse.equinox.ds bundle... and it's not ACTIVE
therefore how is DS going to work without DS being active or there ;)?
Cheers,
Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
|
|
|
|
Re: 3.5M6 Declarative Services [message #594158 is a reply to message #52428] |
Sun, 29 March 2009 06:43  |
Eclipse User |
|
|
|
Hi Chris,
thank you, now it works.
Best regards, Lars
Chris Aniszczyk wrote:
> Lars Vogel wrote:
>> If I start my bundle I see that is running (ss in the OSGi console).
>>
>> id State Bundle
>> 0 ACTIVE org.eclipse.osgi_3.5.0.v20090311-1300
>> 3 ACTIVE de.vogella.osgi.testing_1.0.0
>>
>> Gut I do not see my ITest service if I type "services" in the OSGi
>> console.
>>
>> Any advice?
>
> Sure, I don't the org.eclipse.equinox.ds bundle... and it's not ACTIVE
> therefore how is DS going to work without DS being active or there ;)?
>
> Cheers,
>
> Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
> http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
|
|
|
Re: 3.5M6 Declarative Services [message #594169 is a reply to message #52487] |
Sun, 29 March 2009 09:24  |
Eclipse User |
|
|
|
Hi,
I added the decription how to create a declarative service with 3.5M6 to
http://www.vogella.de/articles/OSGi/article.html
Best regards, Lars
Lars Vogel wrote:
> Hi Chris,
>
> thank you, now it works.
>
> Best regards, Lars
>
>
> Chris Aniszczyk wrote:
>> Lars Vogel wrote:
>>> If I start my bundle I see that is running (ss in the OSGi console).
>>>
>>> id State Bundle
>>> 0 ACTIVE org.eclipse.osgi_3.5.0.v20090311-1300
>>> 3 ACTIVE de.vogella.osgi.testing_1.0.0
>>>
>>> Gut I do not see my ITest service if I type "services" in the OSGi
>>> console.
>>>
>>> Any advice?
>>
>> Sure, I don't the org.eclipse.equinox.ds bundle... and it's not ACTIVE
>> therefore how is DS going to work without DS being active or there ;)?
>>
>> Cheers,
>>
>> Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
>> http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
|
|
|
Powered by
FUDForum. Page generated in 0.04959 seconds