[
https://issues.apache.org/jira/browse/KARAF-1640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13413660#comment-13413660
]
Guillaume Nodet commented on KARAF-1640:
----------------------------------------
Showing the console only once Karaf is started sounds good to me. We've
already done that in our recent Fuse releases and the main goal was to avoid
people starting typing commands that were not available.
It's really just a heuristic, as the best we can do is wait for all main
bundles to be installed and started. Given the nature of OSGi, it will be
somewhat difficult to display a work in progress that really is worthwhile, but
we can experiment and see how accurate we can be.
Note that the whole thing is kinda pointless if we don't start blueprint
bundles synchronously, but that's already done in etc/config.properties
(org.apache.aries.blueprint.synchronous=true) afaik, so that's fine. What this
means is that the features service initial provisioning can also be done
synchronously, but it will be hard to display such things from the main,
because we don't know in advance which bundles will be installed.
Pressing a key to start the console immediately would be nice too, but this
might require quite a tight coupling between main and the console, we'll see.
Anyway, +1, I like the idea and we'll see how well we can make that work and
worthwhile.
> Make sure the local console is fully working before the user can type commands
> ------------------------------------------------------------------------------
>
> Key: KARAF-1640
> URL: https://issues.apache.org/jira/browse/KARAF-1640
> Project: Karaf
> Issue Type: Improvement
> Reporter: Christian Schneider
> Fix For: 3.0.0
>
>
> The console bundle starts early as it contains jline, gogo and karaf specific
> console interfaces and tools that all commands need.
> The problem with this is that the user can start typing commands before all
> commands are started. So it can happen that a command is not available at
> that point. This leads to (from the user point of view) errors in completion
> and when executing commands.
> So the idea is to still start the console bundle early but make sure the
> shell is only opened when all commands are started.
> As commands often use blueprint to startup we can not simply check the bundle
> status as it will be active before the commands are activated.
> So one option to improve the situation is to split the shell starting from
> the rest of console and do it in a separate bundle with a high start level.
> So most of the commands would be present. Still because of the blueprint
> startup we could miss some bundles.
> Another option is to start a thread that somehow watches the start of the
> bundles and that opens the shell when all bundles are really active. We could
> use the new status checking from the bundle module that also can watch
> spring-dm and blueprint status. The advantage with this aproach is that we
> could display the live startup status while waiting.
> We could also allow the user to press e.g. enter to open the console at any
> point.
> So for example we could show something like this:
> Karaf startup ...
> Press Enter to open a shell now
> Bundles started (11/78), 3 failures
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira