Return-Path: X-Original-To: apmail-cxf-users-archive@www.apache.org Delivered-To: apmail-cxf-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 08713313C for ; Wed, 4 May 2011 15:31:16 +0000 (UTC) Received: (qmail 40160 invoked by uid 500); 4 May 2011 15:31:15 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 40102 invoked by uid 500); 4 May 2011 15:31:15 -0000 Mailing-List: contact users-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cxf.apache.org Delivered-To: mailing list users@cxf.apache.org Received: (qmail 40094 invoked by uid 99); 4 May 2011 15:31:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 May 2011 15:31:15 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sberyozkin@gmail.com designates 209.85.214.41 as permitted sender) Received: from [209.85.214.41] (HELO mail-bw0-f41.google.com) (209.85.214.41) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 May 2011 15:31:10 +0000 Received: by bwz17 with SMTP id 17so1409459bwz.0 for ; Wed, 04 May 2011 08:30:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=R9OEE7FR5w5BHjPcqBomdKbha7VsWoGt09quoxU0gpM=; b=DixsRX5EeZLWhwtZ0vvlElnoX39A3NMtGuohcMrQA+vgl57Mr9HdAeZfU/1z2i5XS7 kbvHJwW37yfCKcUbsOVpqfhpi+3xtrRIrIxPUjg7R947XkMriXPZVt39EBgliEIo4KnP H1H4oATD6PvefMLT33X7ODA4tbq/HikjF2UiM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=EzZajurC5c184TU5xate/WndI7Tqbq/85D0h9prKLL9wD5gYaxZ+e23MFpaZaTx7Ix nOH/g3rzqQ9nlhI+Mx2pcp6vFI9/OSfOYkOLQ+OSEbH4/6iWjHUHlkfmtCuAci57Ekme klRtPWVCcONkNxEaW1P0j33Rg7xyuw7qQyKHs= MIME-Version: 1.0 Received: by 10.204.10.81 with SMTP id o17mr1220094bko.94.1304523048538; Wed, 04 May 2011 08:30:48 -0700 (PDT) Received: by 10.204.179.211 with HTTP; Wed, 4 May 2011 08:30:48 -0700 (PDT) In-Reply-To: References: Date: Wed, 4 May 2011 16:30:48 +0100 Message-ID: Subject: Re: Injecting a servlet context into an arbitrary bean From: Sergey Beryozkin To: users@cxf.apache.org Content-Type: text/plain; charset=ISO-8859-1 Arbitrary beans can probably implement http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/web/context/ServletContextAware.html Cheers, Sergey On Wed, May 4, 2011 at 3:37 PM, Benson Margulies wrote: > This is probably more a spring question than a CXF question, but ... > using org.springframework.web.context.ContextLoaderListener, I'd like > to get a reference to the servlet context in a bean which is not a > service bean of my jax-rs service. Can I just implement > ServletContextListener, or is there some other spring-trick here? >