• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: session cleanup hooks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: session cleanup hooks


  • Subject: Re: session cleanup hooks
  • From: King Chung Huang <email@hidden>
  • Date: Sun, 01 Aug 2004 09:32:13 -0600

You could try listening for SessionDidTimeOutNotification.

King Chung Huang
Learning Commons
University of Calgary

On Aug 1, 2004, at 9:11 AM, Michael Engelhart wrote:

That's only regarding the current request-response loop from what I read:

"Returns whether or not the receiver is in the process of terminating. If true, the session will terminate after the conclusion of the current request-response loop."

I need to cleanup when the application server is shutdown via monitor or other means.

In J2EE for example, the session object is sent an event informing it that it's about to be terminated and you can clean up whatever you need to do like insert a record into a database, close network connections, etc. There's any number of reasons for wanting to be notified when the session is about to be destroyed and from what I've read on the omni lists WOApplication doesn't seem to do this and I'm wondering how I can write a hook that will.


On Aug 1, 2004, at 10:02 AM, Chris Pavicich wrote:

isTerminating()?

see: http://developer.apple.com/documentation/WebObjects/Reference/API/ com/webobjects/appserver/WOSession.html
On Aug 1, 2004, at 9:38, Michael Engelhart wrote:


Are there any hooks that can be called when a session is getting terminated by the application. I have legacy network connections that I open and store in a users session to avoid connection overhead with every request and would like to neatly close them down rather then just wait for the legacy system to shut them down when they time out.
From what I can tell it also doesn't appear that WOApplication (or Wonder's ERXApplication which I'm using) does session cleanup by calling terminate() on the session objects at least from Monitor. I saw a thread somewhere saying that Monitor uses an undocumented application shutdown method which doesn't call WOApplication.terminate() or ERXApplication.terminate(). For a framework that is so mature I'm really surprised at how little there is in the way of shutdown hooks there are built into WebObjects.


Does anyone know of any way to write in these hooks?

Thanks
KMike
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: session cleanup hooks
      • From: Geoff Hopson <email@hidden>
References: 
 >session cleanup hooks (From: Michael Engelhart <email@hidden>)
 >Re: session cleanup hooks (From: Chris Pavicich <email@hidden>)
 >Re: session cleanup hooks (From: Michael Engelhart <email@hidden>)

  • Prev by Date: Re: session cleanup hooks
  • Next by Date: Re: session cleanup hooks
  • Previous by thread: Re: session cleanup hooks
  • Next by thread: Re: session cleanup hooks
  • Index(es):
    • Date
    • Thread