Return-Path: Delivered-To: apmail-ws-tuscany-dev-archive@locus.apache.org Received: (qmail 68473 invoked from network); 3 Jan 2008 10:25:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Jan 2008 10:25:07 -0000 Received: (qmail 59578 invoked by uid 500); 3 Jan 2008 10:24:56 -0000 Delivered-To: apmail-ws-tuscany-dev-archive@ws.apache.org Received: (qmail 59269 invoked by uid 500); 3 Jan 2008 10:24:55 -0000 Mailing-List: contact tuscany-dev-help@ws.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: tuscany-dev@ws.apache.org Delivered-To: mailing list tuscany-dev@ws.apache.org Received: (qmail 59260 invoked by uid 99); 3 Jan 2008 10:24:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Jan 2008 02:24:55 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of simonslaws@googlemail.com designates 209.85.146.177 as permitted sender) Received: from [209.85.146.177] (HELO wa-out-1112.google.com) (209.85.146.177) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Jan 2008 10:24:30 +0000 Received: by wa-out-1112.google.com with SMTP id k22so10346066waf.18 for ; Thu, 03 Jan 2008 02:24:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=gRAPkKfOFpBlFQRb6t7p8PaEw+eWY043pUPNqGZhbjU=; b=jmcBhFa7lxiZdKUIsuEIROVG47yjAh9w4Oex1qJMp5roqIBinpkZCjregM6S93MbmTDxesZz3ihrhoErvVnWBSQFp1zSY6M1LfrbyplTxhLyexa/H+HSkOcpA6nOoUvS/4C5ElR4StKLebhCPSoSzQHCq5FFhPOfqJ1d7cG+VdI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=jkDBmeZjoA8RunG1v6ilb4XR15Y1E0WJOq/U27fG7CiSSjTin5xQgG0R8bI+6kb2I+bvcwrCcUyxHHpEqFoXmIcrGQXOr0W6A24r7wkiA+zgwAR5alRJYxY4IATF2VaxuVwGSlPQ51texlGx6yMqDNvgrCth+Hr39amEpj26YvQ= Received: by 10.115.22.1 with SMTP id z1mr17064603wai.48.1199355875188; Thu, 03 Jan 2008 02:24:35 -0800 (PST) Received: by 10.114.12.14 with HTTP; Thu, 3 Jan 2008 02:24:35 -0800 (PST) Message-ID: Date: Thu, 3 Jan 2008 10:24:35 +0000 From: "Simon Laws" To: tuscany-dev@ws.apache.org Subject: Re: Using contributions in the tutorial, was: Improving the store tutorial module structure In-Reply-To: <477C287E.6080802@apache.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2470_14407238.1199355875191" References: <4761D396.2070908@apache.org> <4762A137.3040504@gmail.com> <4762FF97.7050200@apache.org> <4769A1F6.7030504@apache.org> <477C287E.6080802@apache.org> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_2470_14407238.1199355875191 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Jan 3, 2008 12:12 AM, Jean-Sebastien Delfino wrote: > Rajini Sivaram wrote: > > Sebastien, > > > > When I was implementing OSGi bundle contributions, I was very frustrated > > about the fact that even though bundles can have cyclic dependencies, > > bundles with cyclic dependencies could not be added to SCA, if the > bundles > > contained SCA artifacts (composites/componentType files). OSGi copes > with > > cyclic dependencies because bundles have separate install and start > methods. > > So classes need to get resolved only before the start method is called. > The > > bundle is moved to resolved state by the OSGi runtime when its > dependencies > > are satisfied, and only resolved bundles can be started. With SCA > > contributions, when would the composites/componentType files in a > > contribution get processed, if it is not done when the contribution is > > added? Class resolution for contributions is lazy, and hence the > ordering of > > contributions is only relevant when there are multiple contributions > > containing the same class. But classes used in SCA composites and > > componentType files get resolved when those files are processed, and at > the > > moment addContribution is the trigger, requiring all dependent > contributions > > containing classes referred to in composites/componentType files to be > > installed first. If addContribution is not the trigger to process > > composites, I am not sure what the trigger would be. node.start() for > the > > node? What about the domain? Wouldn't it have been much simpler if > Tuscany > > had a better lifecycle layer (like OSGi :-))? > > > > > > > > Thank you... > > > > Regards, > > > > Rajini > > > > Short answer to a long question :) when a composite is assigned to a > node: node.setComposite(composite). > > -- > Jean-Sebastien > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org > For additional commands, e-mail: tuscany-dev-help@ws.apache.org > > Rajini is correct that at the moment when a contribution is added to the domain (or directly to the node) then it is passed through the contribution processor resulting in an in memory model of the provided contribution. The model isn't "built" and "activated" until the node is started. AFAIUI there is no lifecycle model in the contribution processor. Either all the required dependencies are available or they aren't. So, in the case where dependent contributions are being added separately, they must be processed in the correct order according to the sca-contribution.xmlinformation. sca-contribution.xml is itself provided inside the contribution. The domain/node currently assume a user adds contributions incrementally (there is no bulk load capability). We could consider delaying the processing until the user trys to start the domain, i.e. you assume that is the point they have all of the contributions added that they need. However I don't think that helps as how do we know which contribution to process first. From this thread we are relying on the order of addition. Sebastien, are the changes you are thinking about going to allow unresolved contributions to resolve dependencies after initial processing? Regards Simon ------=_Part_2470_14407238.1199355875191--