ouch. This is a pretty common requirement. Hopefully a 'convention'
can be created in a future version of tapestry that requires no HM
xml.

Convention over Customization! (I should add that to my sig - who
coined that term?)

Geoff

On 2/1/06, Earnshaw, Wayne <[EMAIL PROTECTED]> wrote:
> Hi folks,
>
> The Tapestry 4 Virtual Libray (VLib) example contains an example (check
> out \examples\Vlib\src\java\org\apache\tapestry\vlib\services in the
> full distribution). It has HLS's DiscardSessionFilter, you'll also need
> an ApplicationLifecycle, ApplicationLifecycleImpl and in your
> hivemodule.xml something like :-
>
>     <service-point id="ApplicationLifecycle">
>
>         Controls lifecycle operations; specifically logging out.
>
>         <invoke-factory model="threaded">
>             <construct class="ApplicationLifecycleImpl">
>             </construct>
>         </invoke-factory>
>     </service-point>
>
>     <service-point id="DiscardSessionFilter"
> interface="org.apache.tapestry.services.WebRequestServicerFilter">
>
>         Filter used to optionally discard the session at the end of a
> request (typically after a logout).
>
>         <invoke-factory>
>             <construct class="DiscardSessionFilter">
>                 <set-object property="applicationLifecycle"
> value="service:ApplicationLifecycle"/>
>             </construct>
>         </invoke-factory>
>
>     </service-point>
>
> My Env : WebLogic 8.1SP3, Tapestry 4 beta12 [time to upgrade I guess!],
> Java 1.4.2_08, J2EE declarative security with the friendly URL's.
>
> Cheers,
>
> Wayne
>
> -----Original Message-----
> From: Geoff Longman [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, February 01, 2006 10:06 AM
> To: Tapestry users
> Subject: Re: IllegalStateException
>
> Hmm. Any Tap4 users out there (I'm getting there) care to share how they
> are killing a session?
>
> Geoff
>
> On 1/30/06, Bryan Lewis <[EMAIL PROTECTED]> wrote:
> > After upgrading our Tap3 apps to Tap4, I'm seeing an
> > "IllegalStateException:  setAttribute: Session already invalidated".
> > (Stack trace below.)   It happens whenever a user manually logs out,
> > when we call  getRestartService().service(getRequestCycle()).  It's
> > not really a problem because it's only a stack-trace -- the user
> > doesn't see anything wrong -- but it'll clutter up our logs with about
>
> > a hundred pointless exception traces a day.  Yeah, I know, it's a
> tough life.
> >
> > The exception occurs not on session.invalidate() but a bit later when
> > ApplicationStateManager.flush() causes a WebSession.store().  Tap3
> > used to have a line of code:
> >
> >         // Make isStateful() return false, so that the servlet doesn't
> >         // try to store the engine back into the (now invalid)
> session.
> >         _stateful = false;
> >
> > It would be nice if a similar thing could be done in Tap4.  Worst
> > case, I could override Engine.service() but I'm trying to wean myself
> > away from engine overriding.
> >
> >
> >  java.lang.IllegalStateException: setAttribute: Session already
> > invalidated
> >
> > org.apache.catalina.session.StandardSession.setAttribute(StandardSessi
> > on.java:1229)
> >
> > org.apache.catalina.session.StandardSessionFacade.setAttribute(Standar
> > dSessionFacade.java:129)
> >
> > org.apache.tapestry.web.ServletWebSession.setAttribute(ServletWebSessi
> > on.java:62)
> >
> > org.apache.tapestry.engine.state.SessionScopeManager.store(SessionScop
> > eManager.java:90)
> >
> > $StateObjectPersistenceManager_10918d5a17f.store($StateObjectPersisten
> > ceManager_10918d5a17f.java)
> >
> > org.apache.tapestry.engine.state.StateObjectManagerImpl.store(StateObj
> > ectManagerImpl.java:55)
> >
> > org.apache.tapestry.engine.state.ApplicationStateManagerImpl.flush(App
> > licationStateManagerImpl.java:87)
> >
> > $ApplicationStateManager_10918d59fcb.flush($ApplicationStateManager_10
> > 918d59fcb.java)
> >
> > $ApplicationStateManager_10918d59fcc.flush($ApplicationStateManager_10
> > 918d59fcc.java)
> >
> > org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:
> > 290)
> >
> > org.apache.tapestry.services.impl.InvokeEngineTerminator.service(Invok
> > eEngineTerminator.java:60)
> >
> > $WebRequestServicer_10918d5a0ab.service($WebRequestServicer_10918d5a0a
> > b.java)
> >
> > $WebRequestServicer_10918d5a0a7.service($WebRequestServicer_10918d5a0a
> > 7.java)
> >
> > org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.ser
> > vice(WebRequestServicerPipelineBridge.java:56)
> >
> > $ServletRequestServicer_10918d5a08b.service($ServletRequestServicer_10
> > 918d5a08b.java)
> >
> > org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequ
> > estInjector.java:55)
> >
> > $ServletRequestServicerFilter_10918d5a087.service($ServletRequestServi
> > cerFilter_10918d5a087.java)
> >
> > $ServletRequestServicer_10918d5a08d.service($ServletRequestServicer_10
> > 918d5a08d.java)
> >
> > org.apache.tapestry.multipart.MultipartDecoderFilter.service(Multipart
> > DecoderFilter.java:52)
> >
> > $ServletRequestServicerFilter_10918d5a085.service($ServletRequestServi
> > cerFilter_10918d5a085.java)
> >
> > $ServletRequestServicer_10918d5a08d.service($ServletRequestServicer_10
> > 918d5a08d.java)
> >
> > org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRe
> > questEncoding.java:53)
> >
> > $ServletRequestServicerFilter_10918d5a089.service($ServletRequestServi
> > cerFilter_10918d5a089.java)
> >
> > $ServletRequestServicer_10918d5a08d.service($ServletRequestServicer_10
> > 918d5a08d.java)
> >
> > $ServletRequestServicer_10918d59fff.service($ServletRequestServicer_10
> > 918d59fff.java)
> >
> > org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.ja
> > va:123)
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> The Spindle guy.          http://spindle.sf.net
> Get help with Spindle:
> http://lists.sourceforge.net/mailman/listinfo/spindle-user
> Blog:                     http://jroller.com/page/glongman
> Feature Updates:          http://spindle.sf.net/updates
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
The Spindle guy.          http://spindle.sf.net
Get help with Spindle:   
http://lists.sourceforge.net/mailman/listinfo/spindle-user
Blog:                     http://jroller.com/page/glongman
Feature Updates:          http://spindle.sf.net/updates

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to