[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [equinox-dev] Looking for a working example for services
|
You are confusing the service-component lifecycle with the bundle
lifecycle. This is understandable - it's confusing!
The service-component lifecycle exists completely within the bundle's
lifecycle. Like this:
Bundle - INSTALLED
Bundle - RESOLVED
Bundle - ACTIVE
Service Component - ACTIVATED
Service Component - DEACTIVATED
Bundle - STOPPED
The state you see in the OSGi console is the Bundle State. Declarative
Services will not change your bundle state in any way. SCR (The
Declarative Services runtime) will only act on the Service Components in
your bundle after the bundle has been put in the active state.
So start your bundle!
Regards,
Roy Paterson
-----------------------------------------
Roy Paterson
IBM Pervasive Computing
Austin, TX
Phone: (512) 838-8898
"Cameron Ross"
<cross@symboticwa
re.com> To
Sent by: <equinox-dev@xxxxxxxxxxx>
equinox-dev-bounc cc
es@xxxxxxxxxxx
Subject
[equinox-dev] Looking for a working
05/12/2006 12:56 example for services
PM
Please respond to
Equinox
development
mailing list
<equinox-dev@ecli
pse.org>
Hello,
I'm creating an OSGi component using equinox declarative services. The
osgi console indicates that my Activator only makes it into the "RESOLVED"
state. However, page 281 of the OSGi Service Platform Service Compendium
for R4, states that an "immediate component is activated as soon as its
dependencies are satisfied". It appears to me that my component should be
an "immediate component" and I would, therefore, expect it to move into the
"ACTIVE" state. My component description and activator class follow:
<component name="example.activator">
<implementation class="example.Activator"/>
</component>
public class Activator {
public Activator() {
}
protected void activate(ComponentContext context) {
System.out.println("Activator.activate()");
}
protected void deactivate(ComponentContext context) {
System.out.println("Activator.deactivate()");
}
}
Any help is very much appreciated.
Cameron Ross.
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev