[
https://issues.apache.org/jira/browse/FELIX-2844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12996570#comment-12996570
]
Felix Meschberger commented on FELIX-2844:
------------------------------------------
Point is that a component only has a component ID if it is activated.
Consequently when the component is disabled the id is removed again and is
displayed as -1 in the listing.
To fix this "problem" the command also support the component name to specified.
So to enable you can do
g! scr:enable MyComponent
I have updated the documentation at [1] (to be refreshed in a few hours).
As a consequence this is not really a bug and I resolve it appropriately.
[1]
http://felix.apache.org/site/apache-felix-service-component-runtime.html#ApacheFelixServiceComponentRuntime-ShellCommand
> Disabled SCR Component can't be re-enabled anymore
> --------------------------------------------------
>
> Key: FELIX-2844
> URL: https://issues.apache.org/jira/browse/FELIX-2844
> Project: Felix
> Issue Type: Bug
> Components: Declarative Services (SCR)
> Affects Versions: scr-1.6.0
> Environment: Linux bono 2.6.35-25-generic #44-Ubuntu SMP Fri Jan 21
> 17:40:44 UTC 2011 x86_64 GNU/Linux
> java version "1.6.0_22"
> Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
> Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)
> Reporter: Martin Zdila
> Priority: Critical
>
> g! scr:list
> [ 123] [active ] MyComponent
> g! scr:disable 123
> This correctly disables the component but it's service ID is then changed to
> -1 and the component can't be enabled anymore.
> g! scr:list
> [ -1] [disabled ] MyComponent
> g! scr:enable 123
> Missing Component with ID 123
> g! scr:enable -1
> Missing Component with ID -1
> Also affects scr-1.6.1.20110216100152
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira