cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@s-und-n.de>
Subject RE: No SesionManager provided for Seleector?
Date Thu, 05 Sep 2002 14:53:00 GMT
When is your session context created?

Carsten

> -----Original Message-----
> From: Jan Bromberger [mailto:vincev@gmx.de]
> Sent: Thursday, September 05, 2002 4:30 PM
> To: cocoon-users@xml.apache.org
> Subject: Re: No SesionManager provided for Seleector?
>
>
> > Ok, I'm not sure, but I think you can't lookup the SessionManager
> > in your compose() method. Try it in your select() method of
> > the Selector Interface.
> > That should work (I hope).
>
> Yes, thanks. That helps.
> But: The session that is provided is not the same as the one that I get
> with:
>
>     ObjectModelHelper.getRequest(objectModel).getSession()
>
> Where objectModel is from
>
>     public boolean select(final String expression, final Map objectModel,
> final Parameters parameters) {
>
> In the latter there is my SessionContext in the one provided by the
> SessionManager it is not.
> Do you have a clue why?
>
> > > > This should work, you can get a SessionManager from the
> > > > ComponentManager.
> > > >
> > > > What/how do you exactly try?
> > >
> > > public void compose(final ComponentManager componentManager) throws
> > > ComponentException {
> > >     this.componentManager = componentManager;
> > >     this.sessionManager = (SessionManager)
> > > componentManager.lookup(SessionManager.ROLE);
> > > }
> > >
> > > The stacktrace says:
> > > org.apache.avalon.framework.component.ComponentException:
> Could not find
> > > component
> > >         at
> > > org.apache.avalon.excalibur.component.ExcaliburComponentManager.lo
> > > okup(Excal
> > > iburComponentManager.java:367)
> > >         at
> > > org.apache.cocoon.components.CocoonComponentManager.lookup(CocoonC
> > > omponentMa
> > > nager.java:227)
> > >         at
> > > org.apache.avalon.excalibur.component.DefaultComponentFactory$Comp
> > > onentManag
> > > erProxy.lookup DefaultComponentFactory.java:314)
> > > ...
> > >
> > > Cheers,
> > > Jan
> > >
> > > > -----Original Message-----
> > > > From: Jan Bromberger [mailto:vincev@gmx.de]
> > > > Sent: Thursday, September 05, 2002 3:47 PM
> > > > To: cocoon-users@xml.apache.org
> > > > Subject: No SesionManager provided for Seleector?
> > > >
> > > >
> > > > I intend to write a SessionContextSelector and tried to use a
> > > SessionManager
> > > > just like the SessionTransformer does. But it seems that there is no
> > > > SessionManager provided to a Selector while a Transformer gets one.
> > > > Am I right?
> > > > Why is that so?
> > > > And: Has anybody a suggestion for a workaround?
> > > >
> > > > Cheers,
> > > > Jan
>
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message