config admin service seems not to launch !? [message #493294] |
Sat, 24 October 2009 12:40 |
thomas menzel Messages: 81 Registered: July 2009 |
Member |
|
|
hi,
i'm racking my brains and searching google for half a day now on getting a simple bundle working with the config admin but it seems that the config admin isnt launched. what do i have todo that it does?
i believe i have included all need bundles:
0 ACTIVE org.eclipse.osgi_3.5.0.v20090520
1 ACTIVE org.apache.log4j_1.2.13.v200903072027
2 ACTIVE org.eclipse.osgi.services_3.2.0.v20090520-1800
3 ACTIVE javax.servlet_2.5.0.v200806031605
4 ACTIVE org.eclipse.equinox.util_1.0.100.v20090520-1800
5 ACTIVE org.eclipse.equinox.frameworkadmin_1.0.100.v20090520-1905
6 ACTIVE org.eclipse.osgi.util_3.2.0.v20090520-1800
7 ACTIVE org.eclipse.equinox.frameworkadmin.equinox_1.0.100.v20090520-1905
8 ACTIVE javax.xml_1.3.4.v200806030440
9 ACTIVE org.apache.commons.logging_1.1.1
10 ACTIVE org.eclipse.equinox.common_3.5.0.v20090520-1800
11 ACTIVE ConfigedBundle_1.0.0.qualifier
12 ACTIVE org.eclipse.equinox.ds_1.1.0.v20090601
when i try to get an instance of the service like so (taken from turials and samples on the web) i get NULL!.
ServiceReference caRef = bundleContext.getServiceReference(ConfigurationAdmin.class.getName());
i have a very simple ManagedService that registers itself like so in activate()
protected void activate(ComponentContext context) throws IOException {
log(" // TODO: Do something on activation ");
Dictionary properties = new Hashtable();
properties.put("service.pid", PID_REGISTER_LOCATION_ACTIVATE);
BundleContext bundleContext = context.getBundleContext();
_registration =
bundleContext.registerService(ManagedService.class.getName(), this, properties);
logDictionary("activate(): properties", context.getProperties());
}
if i understand the OSGi spec correctly, i just have to register my service with the MS interface and then ConfgiAdmin should kick in and call the update(Config method) on a separate thread, correct?
well, i have a break point in that method, it never comes up!
so, what's the trick?
thomas menzel aka tom
[Updated on: Sat, 24 October 2009 12:41] Report message to a moderator
|
|
|
|
Re: config admin service seems not to launch !? [message #493331 is a reply to message #493316] |
Sat, 24 October 2009 22:12 |
thomas menzel Messages: 81 Registered: July 2009 |
Member |
|
|
pardon my ignorance, but how can that happen? as far as i can tell i only have on bundle exporting org.osgi.service.cm, or do you mean diff. classloaders pointing to the same bundle?
when starting i have DS debugging on but dont see a CCE!?
FYI:
my service is brought up by DS and i'm using Import package and not require bundle.
so, could give me a few more pointers, what to do?
PS: if i may ask: in which equinox bundle lives the ConfigurationAdmin implementation? and what's its name?
thomas menzel aka tom
[Updated on: Sat, 24 October 2009 22:14] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03316 seconds