Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 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 21:04 Go to next message
Bruce Glaze is currently offline Bruce GlazeFriend
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
Re: Problem Injecting Osgi Service Into Submodule [message #787149 is a reply to message #784660] Tue, 31 January 2012 08:09 Go to previous message
Stefan Liebig is currently offline Stefan LiebigFriend
Messages: 124
Registered: July 2009
Senior Member
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: Thu Apr 25 22:56:14 GMT 2024

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

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

Back to the top