Return-Path: Delivered-To: apmail-cxf-dev-archive@www.apache.org Received: (qmail 85775 invoked from network); 19 Jan 2010 11:15:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 Jan 2010 11:15:41 -0000 Received: (qmail 97533 invoked by uid 500); 19 Jan 2010 11:15:40 -0000 Delivered-To: apmail-cxf-dev-archive@cxf.apache.org Received: (qmail 97394 invoked by uid 500); 19 Jan 2010 11:15:40 -0000 Mailing-List: contact dev-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list dev@cxf.apache.org Received: (qmail 97359 invoked by uid 99); 19 Jan 2010 11:15:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jan 2010 11:15:40 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of david.bosschaert@gmail.com designates 209.85.216.179 as permitted sender) Received: from [209.85.216.179] (HELO mail-px0-f179.google.com) (209.85.216.179) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jan 2010 11:15:33 +0000 Received: by pxi9 with SMTP id 9so2784719pxi.24 for ; Tue, 19 Jan 2010 03:15:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=3kugFVE2kPTr3mCfbHE+wtcOgiEVjBOn2Fqdf4HhnLg=; b=JT1svE7rybcgzVbhFPFup4Oet7XeDR+RoWkagKX+GdlNqTZIl91W6QBlFIqOzrTooN vfV1VpPfqTVFG1s4f19UJE88PNkh3st2nIJhSIHG2BoW79JzkV9t3djLevIVkaeoVZI1 WCUTqqWD+UnGqekACx0i/dTvCAaZmyrr9xsdI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=HiEcTkegUcqZ0XgrupPe+QJPLrG5MYFHf7CpAkxNTTdzLOrVvDM7RBTtT/dTXC06kl tLceXJe0fC1n4OA+uQQ+12LPNaoFzDIppBFkKmG1/2U7sgjmaAIFeQgnJfOIJ9h52RXF IKuyZwvotSjU0nV04Y9fCr7DtyVWUQ2JaIT/Q= MIME-Version: 1.0 Received: by 10.141.101.18 with SMTP id d18mr5308562rvm.104.1263899713186; Tue, 19 Jan 2010 03:15:13 -0800 (PST) In-Reply-To: References: From: David Bosschaert Date: Tue, 19 Jan 2010 11:14:53 +0000 Message-ID: Subject: Re: Loading HTTP OSGI transport only when needed To: users@cxf.apache.org, dev@cxf.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Sergey, In CXF-DOSGi we have the option to use a similar mechanism, whereby we're registering CXFNonSpringServlets with pax web (through the OSGi HTTP Service) to make them available. The way it's done is one servlet per service which means that they don't have to share a context, but they do share the port as they're all served by a single OSGi HTTP Service underneath. We don't use the http-osgi component from CXF for this AFAIK, so I have no objection to your proposal. Best regards, David 2010/1/18 Sergey Beryozkin : > Hi > > > > I'm thinking of removing the http-osgi dependency from cxf-minimal and > cxf-jaxrs bundles only. > > Here're the reasons why : > > 1. The issue has been reported against a CXF JAX-RS bundle > > 2. CXF Minimal is used by DOSGi RI which uses its own (more dynamic) > approach toward allocating contexts (I'd like to update the cxf osgi > transport somehow to be more dynamic too, that is, for individual CXF > endpoints be able to allocate individual contexts, as opposed to all of > them having to share some root context) > > 3. CXF Minimal and CXF JAXRS are 'minimal' by definition, so it kind of > makes sense at this stage to limit the distribution of the osgi > transport to the all-inclusive bundle only. > > 4. Going forward (from CXF 3.0 ?), I reckon it would make sense to > remove the osgi transport from the distribution all together. Instead > ServiceMix CXF feature may get updated to depend on CXFBundle + CXF OSGI > transport, other OSGI environments which may need it will depend on cxf > bundle and on the osgi transport (bundle). Or may be we can have a > CXF-All-OSGI which will include all the 'active' OSGI-related > components, those causing some immediate side-effects when loaded into > OSGI... > > > > The only problem I see here is that CXF 2.2.5 users have started using > CXF JAX-RS or CXF Minimal in OSGI environments we're not aware of and > started using the osgi transport. A bit unlikely but it will be worth > checking with the users list. Has anyone tried to do it already ? Please > let us know... > > > > Users can modify the CXF bundles locally and remove this transport but > I'd rather the transport be lazily loaded or when really needed. I have > a feeling this issue might hiner a bit the migration to later CXF > versions for users which can not afford, say, easily migrating to the > next Spring DM server, etc... > > > > > > > > Thoughts ? > > > > > Sergey > > > > > > > > Hi > > > > Some users have reported that the CXF HTTP OSGI transport is causing > issues in OSGI containers depending on the Spring DM 1.0.2 or earlier, > due to Spring DM eagerly loading the CXF HTTP OSGI context but failing > to deal with the (spring-)osgi-compendium related elements. > > > > The only solution which seems to work in this case is to remove a cxf > osgi transport bits altogether from a bundle given that the user > reporting the issue is not using this transport. > > > > This works but it is not ideal. > > I'm also thinking that may be DOSGI might be affected a bit too given > that DOSGI users do not use this transport as well but will have a /cxf > context busy already, not that they need '/cxf' =A0but anyway... > > > > I'm just wondering, what options we might have here ? > > Perhaps one option is not to bundle this transport for cxf-minimal and > cxf-jaxrs bundles ? Users who do need it, say ServiceMix users, can get > it from the full bundle. > > > > Another option is to add a CXF OSGI HTTP transport BundleActivator and > repackage META-INF/spring/cxf-osgi-transport.xml into say > META-INF/cxf//spring/cxf-osgi-transport.xml. Our BundleActivator will > somehow delegate to META-INF/cxf//spring/cxf-osgi-transport.xml, I don't > know how yet, but I think, as far as I recall from writing SpringDM > tests, it might be possible to point SpringDM to some custom location. > However, before delegating, the BundleActivator will check, say a system > property which if set would disable the osgi transport. Something along > these lines. > > > > Thoughts ? > > > > cheers, Sergey > > > > P.S. I might not be able to contribute to this thread until this coming > Thursday... > > > >