Re: Application terminates when a session times out
Re: Application terminates when a session times out
- Subject: Re: Application terminates when a session times out
- From: meena <email@hidden>
- Date: Tue, 18 Feb 2003 16:27:30 +0100
My sincere thanks to Seejo Pylappan, Art Isbell and to all those who gave me
some
suggestion to solve this problem.
Seejo, I have implemented what you have suggested and it works fine.
Once again, many thanks,
Meena.
Seejo Pylappan wrote:
> On Friday, February 14, 2003, at 05:10 PM, meena wrote:
>
> >> Are you fetching it in a session and then setting it as a
> >> universal user?
> > Yes, this is exactly what I am doing. After fetching the IA_User
> > object
> > in the session's defaultEditingContext, I am storing this object at the
> > Application level.
>
> There thats the problem. The session timeout will finalize the
> editingcontext which is the one needed by your IA_User.
>
> > a. How can I initialize such application objects if it should not
> > done be
> > through a session ?
> > b. Is there a way to physically copy such objects from the session to
> > the
> > application level so that it is available even after the session is
> > terminated ?
>
> You can either do the fetch in the Application after creating a new
> editingContext:
>
> private EOEditingContext applicationEditingContext = new
> EOEditingContext();
>
> and using this in your Application.java initializer to fetch.
>
> If you have to want to wait till your first session is created in the
> app to get the IA_User then you can create the editingContext in the
> Application.java like above and then when you set the EO from the
> session in the Application you can make a local instance of the EO in
> the Application's editingContext with:
>
> IA_User aUser =
> applicationEditingContext.localInstanceOfObject(sessionIAUser);
>
> this will create a EO using your Application's editingContext.
>
> -Seejo
>
> > Thanks in advance,
> > Meena.
_______________________________________________
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.