From dev-return-102293-archive-asf-public=cust-asf.ponee.io@sling.apache.org Mon Jan 13 19:56:38 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 3C26D18064E for ; Mon, 13 Jan 2020 20:56:38 +0100 (CET) Received: (qmail 68344 invoked by uid 500); 13 Jan 2020 19:56:35 -0000 Mailing-List: contact dev-help@sling.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sling.apache.org Delivered-To: mailing list dev@sling.apache.org Received: (qmail 68112 invoked by uid 99); 13 Jan 2020 19:56:34 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jan 2020 19:56:34 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id F09AD180624 for ; Mon, 13 Jan 2020 19:56:32 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.899 X-Spam-Level: X-Spam-Status: No, score=-0.899 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=me.com Received: from mx1-he-de.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id rbehxCVuEPsM for ; Mon, 13 Jan 2020 19:56:28 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=17.58.23.194; helo=mr85p00im-zteg06021901.me.com; envelope-from=schaefera@me.com; receiver= Received: from mr85p00im-zteg06021901.me.com (mr85p00im-zteg06021901.me.com [17.58.23.194]) by mx1-he-de.apache.org (ASF Mail Server at mx1-he-de.apache.org) with ESMTPS id E779E7DD7F for ; Mon, 13 Jan 2020 19:56:27 +0000 (UTC) X-ASF-DKIM-Sig: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1578945380; bh=7n+gBtFyHS8FjFt3vYDK52YeqYzFKLpz/wDt2y4qz1U=; h=From:Content-Type:Subject:Date:To:Message-Id; b=J6JsRpQGKL52IOZdB7uubHdvZXPX6Ux/bs9pPHOpzQaS9XvRwTrZhqVg7rqSFUD50 9vMCjhIXSpBy7Lxm/TUcQIxvwi2M+rEX8eGIlpEffA8EUrmWZbGHR6i3+DYxgjWCs0 uQf17OSNE36Nu+QvN06/FlgPwCRAx/6jtvU0IvK/lCnceVeLZTROWD3T0q1rOyRkz5 ZS9pKKFUHyWJ2ySoOfUxbnsAmiyk9c4aEPRMn+xMvIFRNUle80I5wrAeV7obHfUCtC /gfHA31Dnd+mfoUqT77nOiLd33ppnOMRVmH0MKU0y9tWKqbCCIHe7W6/AOoKiLLaEW 4fNXHIR0WfdZQ== Received: from [192.168.1.55] (unknown [47.148.18.99]) by mr85p00im-zteg06021901.me.com (Postfix) with ESMTPSA id 7FAD8720E2F for ; Mon, 13 Jan 2020 19:56:20 +0000 (UTC) From: Andreas Schaefer Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: Feature Launcher System in a Background Thread, where? Date: Mon, 13 Jan 2020 11:56:19 -0800 References: <53cd1a541e30ab0f0717b69e141aa877ca3e5132.camel@apache.org> <19db5f5275868b120ecd347e81da6e13dfd5c7f7.camel@apache.org> <97CF4247-E7EE-4FDF-BD13-8F4A728C54CE@me.com> <7D9355D6-062E-4A1D-8359-F273FD1591AB@me.com> To: dev In-Reply-To: <7D9355D6-062E-4A1D-8359-F273FD1591AB@me.com> Message-Id: <47400011-765B-4001-9FF2-B066938DBDE3@me.com> X-Mailer: Apple Mail (2.3445.104.11) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2020-01-13_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-2001130162 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 =E2=80=99start=E2=80=99 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 = wrote: >=20 > 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. >=20 > 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. >=20 > 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. >=20 > - Andy >=20 >> On Jan 8, 2020, at 8:41 AM, Andreas Schaefer = wrote: >>=20 >> Hi >>=20 >>> On Jan 8, 2020, at 8:23 AM, Robert Munteanu = wrote: >>>=20 >>> 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: =E2=80=98java -jar =E2=80= =99. >>>=20 >>> Right, good point. So basically we need code that >>>=20 >>> - creates an executable jar file from a set of feature model files >>=20 >> This is in place - see Sling Whiteboard / = sling-org-apache-sling-feature-starter >>=20 >>> - creates a WAR file from a set of feature model files >>=20 >> Pending >>=20 >>> - matches the launch behaviour of the current Sling Starter jar >>=20 >> 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. >>=20 >>>=20 >>>>=20 >>>> 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). >>>=20 >>> 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. >>=20 >> 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. >>=20 >>>=20 >>> Thanks, >>> Robert >>>=20 >>>>=20 >>>> - Andy >>>>=20 >>>>> On Jan 8, 2020, at 6:31 AM, Robert Munteanu >>>>> wrote: >>>>>=20 >>>>> Hi Andy, >>>>>=20 >>>>> On Tue, 2020-01-07 at 13:16 -0800, Andreas Schaefer wrote: >>>>>> Hi >>>>>>=20 >>>>>> 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. >>>>>=20 >>>>> Can't we just use the current feature launcher application to >>>>> launch >>>>> the sling starter? >>>>>=20 >>>>> Thanks, >>>>> Robert >>>>>=20 >>>>>> 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. >>>>>>=20 >>>>>> What do you think? >>>>>>=20 >>>>>> - Andy >>>=20 >>=20 >=20