[
https://issues.apache.org/jira/browse/FELIX-3703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13471446#comment-13471446
]
Derek Baum commented on FELIX-3703:
-----------------------------------
Hi Thomas,
The gogo:gosh command is provided by the Shell bundle, not the Command bundle
and is therefore present even if the Command bundle is not started.
I cannot reproduce the condition you describe, even if I start the Shell bundle
before the Runtime bundle.
A ServiceTracker is used to locate gogo commands in other bundles. It should
not matter when this tracker is started, as it gives an initial list of
matching services and then updates and new services appear.
The patch you provided caused a NPE at Activator:156 where the process field is
accessed.
Please provide more details of your problem, ideally a test-case.
> Race condition in gogo runtime activator
> ----------------------------------------
>
> Key: FELIX-3703
> URL: https://issues.apache.org/jira/browse/FELIX-3703
> Project: Felix
> Issue Type: Bug
> Components: Gogo Runtime
> Affects Versions: gogo.runtime-0.10.0
> Environment: Embedded felix 4.0.3
> Reporter: Tomas Pan
> Attachments: my.patch
>
>
> Starting gogo.command (0.12.0) before gogo.runtime(0.10.0) produces
> CommandNotFoundException: Command not found: gosh.
> This is because runtime's Activator first registers CommandProcessor before
> creating commandTracker.
> Creating CommandProcessor triggers event on .command which will start adding
> commands, but since commandTracker is not present, those commands will be
> ignored.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira