well, I'm quite sure that it's the same and that it's called
Session.terminate():

When I wrote the first code, I thought it would be better to forget all the
objects in the ec, to reinizialize the ec with the session so in the
Session.java I've overwritten public void terminate()

public void _cleanUp()
{
this.setUser(null);
this.setDisplayCurrency(null);
_needsLogin = true;
this.defaultEditingContext().revert();
}

public void terminate()
{
//NP: make sure we clean up
this._cleanUp();
this.defaultEditingContext().reset(); // forget all our objects
super.terminate();
}

well when the session timed out and I
reenter in the app, and I try to read one of the objects, it comes out an
error with the explanation
cannot read an object that is not registrated in any editing context.

I've tried to force the disposing and the reinitializations (I don't know if
that word exist...)

public void terminate()
{
//NP: make sure we clean up
this._cleanUp();
this.defaultEditingContext().dispose(); // delete it
super.terminate();
}

well, when my session timed out and I reenter, the error is cannot read an
object that was in a editing context that was disposed

(I'm sorry if the error text is not exact but the meaning is that)

I think this means that the session terminates, or not?

Thank you, Chuck, probably you are saving my life!!!


2006/12/7, Chuck Hill <[EMAIL PROTECTED]>:

One of these things is true:

- you think it is the same EC, but it is not
- the session did not terminate

What makes you think it is the same EC?

Chuck


On Dec 7, 2006, at 8:09 AM, Daniele Corti wrote:

> Hi all,
>      I'm a little cofused: in my app I use as editing context the
> Session.defaultEditingContext(), and I thought that when the
> session is terminated automatically the ec would be disposed. well,
> today I've notice that when the session timed out, and I reenter in
> the app, when the session is created the defaulEditingContext()
> still points to the old ec.
>
> Am I the only one that found this a little strage?
>
> --
> Daniele Corti
> AIM: S0CR4TE5
> Messenger: [EMAIL PROTECTED]
--

Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects








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

This email sent to archive@mail-archive.com

Reply via email to