Or maybe a command line option with an OSGi service filter? When a service that matches the filter is registered then shut down the container... Maybe with a reasonable default too. So, e.g.: -x "(objectClass=o.a.s.SlingReady)" or -x Where the latter uses a default filter...
Just a thought :) David On 23 July 2014 13:59, Bertrand Delacretaz <bdelacre...@apache.org> wrote: > hi David, > > On Wed, Jul 23, 2014 at 12:16 PM, David Bosschaert > <david.bosscha...@gmail.com> wrote: >> ...I guess I was thinking it might be useful to add a command line option >> to the launcher, something like: >> -x extract the sling files and then exit.. > > As Carsten says the problem is not just extracting files, if for > example you want to create a Docker image that will startup quickly > it's best to wait until the application is ready before considering > the image fully built. > > My suggestion is to add a command-line option as you suggest, and make > the logic that decides when to exit configurable. That can simply be a > combination of StartupListener and health checks, where a > configuration says "consider this instance ready when N health checks > tagged with 'startup' pass" for example. That would be a generally > useful addition IMO. Having to configure N is not ideal but I'm not > sure how you can guarantee that all required health checks are present > otherwise. > > -Bertrand