Problem Injecting Osgi Service Into Submodule [message #784660] |
Fri, 27 January 2012 21:04 |
Bruce Glaze Messages: 1 Registered: January 2012 |
Junior Member |
|
|
Hello,
I am developing a relatively large Riena App, but I've run across an issue when I try to deploy the app. I am injecting a LOCAL Osgi service into a Submodule like below.
@InjectService()
public void bind(IDeviceCommand service) {
deviceCommand = service;
}
public void unbind(IDeviceCommand service) {
...
deviceCommand = null;
}
The service activator looks like:
public void start(BundleContext bundleContext) throws Exception {
Activator.context = bundleContext;
IDeviceCommand deviceService = new SiteInfoService();
context.registerService(IDeviceCommand.class.getName(),deviceService,
null); ...
}
When I run and debug within the Eclipse environment, everything works as I expected, the bind method is called and all is well. But, once I deploy the app, the bind method is never called. I admit I'm not an expert yet with Riena or Osgi services...
Has anyone had a similier issue. If someone could point me in some direction or has any advice it would be much appreciated.
Thanks in advance,
Bruce
|
|
|
|
Powered by
FUDForum. Page generated in 0.03458 seconds