Hi

So it turns out that the Sling Starter / Launcher Base is quite similar to the 
Feature Launcher and they works more or less the same with the exception that 
the Feature Launcher does not create a Control Socket to interact with the 
instance after launch. Anyhow the Sling Starter is not running in the 
background with ’start’ either and so I will not change that in the Feature 
Launcher.

I will try to add the Control Listener to the Sling Feature Starter and leave 
the Feature Launcher untouched. The Sling Feature Starter Mojo will then put 
the Sling Feature Starter into a separate process to run it in the background 
to enable IT tests to run.

Cheers - Andy

> On Jan 8, 2020, at 3:18 PM, Andreas Schaefer <[email protected]> wrote:
> 
> Looking into the Sling Feature Launcher I just realized that this is a Sling 
> specific Launcher and so my point of making available to other FM application 
> is mute.
> 
> If I am not mistaken the best place to put the Demon process handling is the 
> Framework Runner as the application is launched there as well as the 
> Shutdownhook is added.
> 
> Currently I am working on integrating the ControlListener into the 
> FrameworkRunner to see if that works well. It might be possible to run the 
> Feature Runner with the Control Listener outside which I will check out as 
> well.
> 
> - Andy
> 
>> On Jan 8, 2020, at 8:41 AM, Andreas Schaefer <[email protected]> 
>> wrote:
>> 
>> Hi
>> 
>>> On Jan 8, 2020, at 8:23 AM, Robert Munteanu <[email protected]> wrote:
>>> 
>>> On Wed, 2020-01-08 at 08:01 -0800, Andreas Schaefer wrote:
>>>> The Sling Starter for FM will create an executable JAR file so that
>>>> Sling can be launched with: ‘java -jar <sling jar file>’.
>>> 
>>> Right, good point. So basically we need code that
>>> 
>>> - creates an executable jar file from a set of feature model files
>> 
>> This is in place - see Sling Whiteboard / 
>> sling-org-apache-sling-feature-starter
>> 
>>> - creates a WAR file from a set of feature model files
>> 
>> Pending
>> 
>>> - matches the launch behaviour of the current Sling Starter jar
>> 
>> The code in place is more or less a copy of the Sling Starter project with 
>> some additional parameter that are specific for FMs like providing its own 
>> Main and Additional FM files. I also migrated the code to use picocli to 
>> make handling of the parameters are little bit more straightforward.
>> 
>>> 
>>>> 
>>>> Also the Feature Launcher does not support to be launched in the
>>>> background and so it cannot used as an IT test vehicle like the
>>>> Slingstart Maven Plugin (Start / Stop Mojo).
>>> 
>>> Can we use forking instead? Alternatively, we need to review and update
>>> the feature launcher to be more embeddable. Not sure if there is
>>> anything to be done besides extracting a class that takes arguments out
>>> of the current main class.
>> 
>> In my view this would be a feature that the Feature Launcher should provide 
>> so that any application handled by the Feature Launcher can be run in the 
>> background. This would require to add a control socket and a background 
>> thread so that it stays up and running and can be stopped.
>> If that is not desired I will add this to the Sling Starter.
>> 
>>> 
>>> Thanks,
>>> Robert
>>> 
>>>> 
>>>> - Andy
>>>> 
>>>>> On Jan 8, 2020, at 6:31 AM, Robert Munteanu <[email protected]>
>>>>> wrote:
>>>>> 
>>>>> Hi Andy,
>>>>> 
>>>>> On Tue, 2020-01-07 at 13:16 -0800, Andreas Schaefer wrote:
>>>>>> Hi
>>>>>> 
>>>>>> For the Sling Starter Module we need to be able to launch a FM
>>>>>> system
>>>>>> in a demon / background thread. The question is where is the code
>>>>>> placed.
>>>>> 
>>>>> Can't we just use the current feature launcher application to
>>>>> launch
>>>>> the sling starter?
>>>>> 
>>>>> Thanks,
>>>>> Robert
>>>>> 
>>>>>> As the Feature Launcher is not only here for Sling I think it
>>>>>> should
>>>>>> be added to the Feature Launcher instead of the Sling Starter for
>>>>>> Features.
>>>>>> 
>>>>>> What do you think?
>>>>>> 
>>>>>> - Andy
>>> 
>> 
> 

Reply via email to