Skip to main content



      Home
Home » Archived » Riena » Problem Injecting Osgi Service Into Submodule(Injection doesnt work when my project is deployed)
Problem Injecting Osgi Service Into Submodule [message #784660] Fri, 27 January 2012 16:04 Go to next message
Eclipse UserFriend
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
Re: Problem Injecting Osgi Service Into Submodule [message #787149 is a reply to message #784660] Tue, 31 January 2012 03:09 Go to previous message
Eclipse UserFriend
Hi Bruce,

Have you checked whether the SubModule has been created, e.g. some logging within the constructor?

Tschüß,
Stefan
Previous Topic:Riena on e4
Next Topic:Drag and Drop with navigation elements
Goto Forum:
  


Current Time: Wed Jul 23 17:12:26 EDT 2025

Powered by FUDForum. Page generated in 0.03062 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top