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:

From: James Cicenia <[EMAIL PROTECTED]>
Date: November 6, 2006 3:42:58 PM EST
To: Chuck Hill <[EMAIL PROTECTED]>
Cc: WebObjects-Dev Apple <[email protected]>
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 PROTECTED]

    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


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to