Hello,
I want to include more than one service into a bundle, so it seems like
I have to make a use of declarative services.
I'm building a test bundle with maven + maven-bundle-plugin and
generating the ds descriptor with maven-scr-plugin, so it looks like this:
?xml version=1.0
Try to add immediate=“true” to your component definition. This should result in
something like
?xml version=1.0 encoding=UTF-8?components
xmlns:scr=http://www.osgi.org/xmlns/scr/v1.0.0;
scr:component immediate=“true” name=ru.multicabinet.gateway.ExampleDS
implementation
Neil: You are right. The service gets registered also when the Component is
not yet active.
(See OSGI Enterprise Spec R4 112.2.2/112.2.3)
On Tue, Jan 20, 2015 at 1:39 PM, Milen Dyankov milendyan...@gmail.com
wrote:
Also make sure that apart from generating the descriptor(s) it adds the
Also make sure that apart from generating the descriptor(s) it adds the
correct 'Service-Component' header in your manifest. I recall some problems
when both 'maven-bundle-plugin' and 'maven-scr-plugin' are used together. I
personally try to avoid using 'maven-scr-plugin' and add
I installed felix scr bundle into my host osgi application and tried to
obtain a list of active services by visiting a controller of my spring
application which calls osgi code and it threw the following error:
| Error java.lang.NoClassDefFoundError:
Felix SCR does not interfere with Spring loading. SCR has nothing to do with
Spring. This error has come from your own class in your bundle… by installing
SCR you have now for the first time loaded the class (or rather, attempted to
load it), so now you see the problem for the first time.
The
6 matches
Mail list logo