I guess if you want to speed up startup time, it would make sense to not
just extract but also run the initial install phase - the framework will
already have it's state, content is already installed etc.
We have the startup handler stuff in Sling which allows to register startup
listener services, org.apache.sling.launchpad.api.StartupListener - an
implementation could use some mechanism to signal that the installation is
complete, e.g. sending text to a port etc. I guess that's the most reliable
way.

In addition, if you want to use extracted/started files to spin up more
than one instance, make sure to remove the file containing the unique
sling.id which is in the private data area of the settings bundle and named
sling.id.file - otherwise you'll end up with multiple instances using the
same id and you wouldn't be able to connect them through the topology.

Regards
Carsten


2014-07-23 12:16 GMT+02:00 David Bosschaert <david.bosscha...@gmail.com>:

> Hi Anjan,
>
> Thanks for the suggestion. Is this reliable though especially since
> this may be running on a wide variety of machines (very slow ones and
> very fast ones)? How long should the sleep be?
>
> 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
>
> The main purpose here is to speed up startup time for subsequent runs :)
>
> Cheers,
>
> David
>
> On 23 July 2014 11:07, anjan <poliset...@gmail.com> wrote:
> > David, if you include a sleep command between the below two commands for
> > starting and stopping, it should work.
> >
> > java -jar sling.jar start -j localhost:0
> > java -jar sling.jar stop -j localhost:0
> >
> > Of course, the start command should open a different terminal and also
> the
> > stop command.
> >
> >
> >
> > --
> > View this message in context:
> http://apache-sling.73963.n3.nabble.com/Command-to-start-Sling-launchpad-expand-files-then-exit-tp4036574p4036608.html
> > Sent from the Sling - Users mailing list archive at Nabble.com.
>



-- 
Carsten Ziegeler
Adobe Research Switzerland
cziege...@apache.org

Reply via email to