That will create a new session unless you explicitly reconnect to the existing session by passing in the session ID.
Do you have real "state" associated with a session? I've done flash UI apps which have a single session for the flash calls. You can also avoid session creation all together (if it makes sense) by creating a new editing context and/or avoiding using "session()" anywhere in your code.
Put a log message in Session's constructor to see when one is created. If you have more than you expect, add "new Exception.printStacktrace();" to see where the session is being created...
abc Begin forwarded message:
Date: November 6, 2006 3:42:58 PM EST Subject: Re: Flash, DirectAction and Sessions Question
hmmmm....
I am using session().defaultEditingContext() to get a context to query..
does that create a new session?
- James
On Nov 6, 2006, at 1:05 PM, Chuck Hill wrote:
On Nov 6, 2006, at 10:25 AM, James Cicenia wrote:
Hello -
One of my apps has a Flash front-end that has direct actions associated with certain buttons in the Flash.
I think this is causing my application to eventually stop taking new connections. I think it is just creating new sessions on and on till it freezes and I have to actually kill the instance.
Would this be killing my app?
Yes, if it ran out of memory.
Is there an easy way of maintaining or reducing the sessions?
Do the direct actions need a session? If not, remove whatever code it is that references a session. If they do, Flash needs to include the session ID in the URL it requests. I have done that by passing the URLs as parameters to the Flash object.
Chuck
___alex b cone___ ceo codefab inc 212 465-8484 x101 email@hidden http://www.codefab.com
"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, and die gallantly. Specialization is for ants." --R. A. Heinlein
|