Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 83894 invoked from network); 25 Jul 2008 14:40:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Jul 2008 14:40:47 -0000 Received: (qmail 89761 invoked by uid 500); 25 Jul 2008 14:40:45 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 89695 invoked by uid 500); 25 Jul 2008 14:40:45 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 89684 invoked by uid 99); 25 Jul 2008 14:40:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jul 2008 07:40:45 -0700 X-ASF-Spam-Status: No, hits=1.8 required=10.0 tests=DATE_IN_PAST_12_24,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of joerg.heinicke@gmx.de designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 25 Jul 2008 14:39:50 +0000 Received: (qmail invoked by alias); 25 Jul 2008 14:39:14 -0000 Received: from pd907f266.dip0.t-ipconnect.de (EHLO joerg-heinickes-computer.local) [217.7.242.102] by mail.gmx.net (mp062) with SMTP; 25 Jul 2008 16:39:14 +0200 X-Authenticated: #3483660 X-Provags-ID: V01U2FsdGVkX19kpVt5GbBkTURK/Cl4ueyi3UB48bAv5Ejlq8zq30 nJR+itvkVQCxBu Message-ID: <4888F39A.7090201@gmx.de> Date: Thu, 24 Jul 2008 23:26:50 +0200 From: Joerg Heinicke User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.15) Gecko/20080621 SeaMonkey/1.1.10 MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: FW: Accessing Cocoon context from class (2.1) References: <013d01c8eb74$9decba90$4f01a8c0@envisnofc.com> In-Reply-To: <013d01c8eb74$9decba90$4f01a8c0@envisnofc.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.62 X-Virus-Checked: Checked by ClamAV on apache.org You need to retrieve a component from the ServiceManager, just instantiating doesn't work. Joerg On 21.07.2008 22:59, Gary Larsen wrote: > I'm sorry for my impatient developer posting. > > Still not grasping Avalon and Excalibur stuff in 2.1, but it would seem like > it's possible to create a class which could access the Cocoon context > (org.apache.cocoon.environment.Context). > > I've tried Serviceable, Contextualizable and Component interfaces and > registering the component in cocoon.xconf - but no luck yet. > > Could someone suggest some pointers or samples to help me out? > > Thanks, > > gary > > _____ > > From: Gary Larsen [mailto:gary.larsen@envisn.com] > Sent: Monday, July 21, 2008 2:31 PM > To: users@cocoon.apache.org > Subject: Accessing Cocoon context from class (2.1) > > I'm running Cocoon 2.1.9. Could someone tell me how to access the Cocoon > context from a class? > > I've built generators which have the ObjectModel passed to it, but in this > case the class is isolated (it also implements HttpSessionBindingListener). > > Does this class need to implement an interface and/or be registered as a > Cocoon component somehow? > > Thanks for any assistance. > > gary