From dev-return-102056-archive-asf-public=cust-asf.ponee.io@sling.apache.org Wed Jan 8 23:18:31 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 386A3180607 for ; Thu, 9 Jan 2020 00:18:31 +0100 (CET) Received: (qmail 16708 invoked by uid 500); 8 Jan 2020 23:18:30 -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 16696 invoked by uid 99); 8 Jan 2020 23:18:30 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jan 2020 23:18:30 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id DDD1B1A3259 for ; Wed, 8 Jan 2020 23:18:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-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: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=me.com Received: from mx1-ec2-va.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id UUTLRuF-aHQT for ; Wed, 8 Jan 2020 23:18:27 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=17.58.23.196; helo=mr85p00im-ztdg06021701.me.com; envelope-from=schaefera@me.com; receiver= Received: from mr85p00im-ztdg06021701.me.com (mr85p00im-ztdg06021701.me.com [17.58.23.196]) by mx1-ec2-va.apache.org (ASF Mail Server at mx1-ec2-va.apache.org) with ESMTPS id D0C7BBC563 for ; Wed, 8 Jan 2020 23:18:26 +0000 (UTC) X-ASF-DKIM-Sig: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1578525505; bh=pYSa4PTMIj79ZFq2LjaLtcEQpGzoqwxSTjdo5t9K8u0=; h=From:Content-Type:Subject:Date:To:Message-Id; b=px3GJf2qWxGmfCA+pWNFHIs2FSzA+QKwAAYvy0zfmlgy/lGxfOUvECMvAZ9mHRjVq yy3W/L8gg02asjYBuZVqHATSw0u0wEnVvaI+E35C0MUjkaOD0k7ADcYQdf516XrT77 /AvcBJI9fuj6UDK0P5a88jm2SysCzYeOYIAyVSTPYQSGhiwrVY+53GAh8saPaTM4z+ Oo5zt8M1qXFL66Ev+6ZwWLQ3Hxm//j34zpmuGuXEhmvXPv3BKdav2AJMrNNT3kAL62 lFdFcovfClFPEImE9JKBMoIxDouak8+PhdrUw5WRtDZPkp+1XY6ELw5zgnVbgxLp1k LzezvauJ8XI5g== Received: from [192.168.1.55] (unknown [47.148.18.99]) by mr85p00im-ztdg06021701.me.com (Postfix) with ESMTPSA id D1CCDA00D01 for ; Wed, 8 Jan 2020 23:18:25 +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: Wed, 8 Jan 2020 15:18:24 -0800 References: <53cd1a541e30ab0f0717b69e141aa877ca3e5132.camel@apache.org> <19db5f5275868b120ecd347e81da6e13dfd5c7f7.camel@apache.org> <97CF4247-E7EE-4FDF-BD13-8F4A728C54CE@me.com> To: dev@sling.apache.org In-Reply-To: <97CF4247-E7EE-4FDF-BD13-8F4A728C54CE@me.com> Message-Id: <7D9355D6-062E-4A1D-8359-F273FD1591AB@me.com> X-Mailer: Apple Mail (2.3445.104.11) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2020-01-08_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 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-2001080183 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 = 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