• 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: close Connection of EOEditingContext
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: close Connection of EOEditingContext


  • Subject: Re: close Connection of EOEditingContext
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 03 Nov 2004 09:00:19 -0800

Yeah, at very, very worst you should create one EOF stack per _session_.
Per editing context is appicidal!


At 11:50 AM 03/11/2004 -0500, Lenny Marks wrote:
>Is there a very good reason you are using a separate EOF
>stack(EOObjectStoreCoordinator) for each editing context? Why not use
>session.defaultEditingContext()? There would be only one connection
>shared by all users in that case.
>
>-lenny
>
>On Nov 3, 2004, at 11:44 AM, Damien Lust wrote:
>
>>
>> On 03 Nov 2004, at 17:24, Ken Anderson wrote:
>>
>>> Damien,
>>>
>>> If you're saying you need to completely disconnect from the database,
>>> getting rid of the editing context is not going to do that.  In my
>>> opinion, it would be a lot easier to convince the client that you
>>> need to maintain a connection than it will be to convince EOF to
>>> disconnect from the database then reconnect.
>>>
>>> Can you share the reason they don't want a persistent connection to
>>> the database?
>>
>> That's his argument:
>>
>> If 200 users display a list, only to read content of the list,  200
>> open connections are present and no used.
>>
>>
>>
>>
>>>
>>> Ken
>>>
>>> On Nov 3, 2004, at 11:16 AM, Damien Lust wrote:
>>>
>>>>
>>>>
>>>> I use Oracle as DataBase for the development of WebObject
>>>> Application.
>>>>
>>>> When i display a page that display a list, when the list has been
>>>> displayed , no more connection (session oracle) must exist. ( It's
>>>> in the specifications of my client)
>>>>
>>>> I use the SQL script to verify that:
>>>>
>>>> SELECT s.sid,
>>>>        s.serial#,
>>>>        s.osuser,
>>>>        s.program
>>>> FROM   v$session s;
>>>>
>>>>
>>>> So my solution:
>>>>
>>>>
>>>>
>>>> I have a method that returns a  EOEditingContext for all others
>>>> methods/accessors of the page
>>>>
>>>>
>>>> public EOEditingContext editingContext() {
>>>> 	  if (editingContext==null) {
>>>> 		editingContext = new EOEditingContext(new
>>>> EOObjectStoreCoordinator());
>>>> 		editingContext.setSharedEditingContext(null);
>>>> 		editingContext.setUndoManager(null);
>>>> 	}
>>>> 	 return editingContext;
>>>> }
>>>>
>>>> EOEditingContext editingContext;
>>>>
>>>>
>>>> At the end of the appendToResponse, i try to dispose this
>>>> eoeditingContext:
>>>>
>>>> if (editingContext!=null) {
>>>> 		  editingContext.dispose();
>>>> 		  if (editingContext.parentObjectStore()!=null)
>>>> editingContext.parentObjectStore().dispose();
>>>> 		  editingContext=null;
>>>> }
>>>>
>>>>
>>>> But i have some problems:
>>>>
>>>>  - The number of oracle sessions is growing after each refresh of
>>>> the page
>>>>  -  My page use batch to navigate throw the list , i use
>>>> displayGroup , my application crashs because the editingContext of
>>>> the dislayGroup is reset and set to null ( It works if i use a
>>>> defaultEditingContext from the session)
>>>>
>>>> Any ideas?
>>>>
>>>> Thanks a lot.
>>>>
>>>>
>>>> _______________________________________________
>>>> WebObjects-dev mailing list
>>>> email@hidden
>>>> http://www.omnigroup.com/mailman/listinfo/webobjects-dev
>>>
>>
>> _______________________________________________
>> WebObjects-dev mailing list
>> email@hidden
>> http://www.omnigroup.com/mailman/listinfo/webobjects-dev
>>
>
>_______________________________________________
>WebObjects-dev mailing list
>email@hidden
>http://www.omnigroup.com/mailman/listinfo/webobjects-dev
>

--

Chuck Hill                                 email@hidden
Global Village Consulting Inc.             http://www.global-village.net
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Creating a login window
  • Next by Date: Re: Creating a login window
  • Previous by thread: Re: Creating a login window
  • Next by thread: Re: close Connection of EOEditingContext
  • Index(es):
    • Date
    • Thread