Re: Using the HttpSession object with openamf

Oliver Lietz <[email protected]>
Newsgroups gmane.comp.java.openamf.user
Message-ID <[email protected]>
Am Montag, 29. August 2005 15:44 schrieb Bruce Raggett:
> Hello Oliver,
>
> Thank you very much for replying.
>
> I have written a servlet filter which
> (1) Retrieves a user object from the HttpSession object before a request is
> handled and
> (2) Stores the user object in a ThreadLocal object and
> (3) Retrieves the user object from the ThreadLocal object after the request
> has been handled and
> (4) Stores the user object in the HttpSession object
> and my tests indicate that the filter is working as expected.

That's what Acegi is doing with HttpSessionContextIntegrationFilter and 
SecurityContextHolder (InheritableThreadLocal) plus some additional checks. 
You don't have to implement such filter yourself.

> However every time the Flash application connects to Tomcat and openamf, it
> is assigned a diffferent session (I am logging the session ids assigned).

Is your application running in browser (cookies enabled?) or standalone?

> Is there something else that I have to do to associate the Flash
> application with a session so that each call to Tomcat and openamf is
> associated with the same session?

No, normally not.

Oliver




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.