Re: Dynamically altering external names for Entities (solution)

Chuck Hill <[email protected]> Wed, 14 May 2003 09:10:36 -0700
Newsgroups gmane.comp.web.webobjects.eof
Message-ID <[email protected]>
Yes.  I don't have the code at hand, but this can be done.  My only
caution, besides Eric's point of limited connections being allowed at the
DB, is that this can use a lot of memory.  I think (i.e. I could be wrong)
that this requires a object store per session.  That results in a lot of
data duplication and that uses a lot of memory.  You will have to consider
just how much data an average session might be fetching.  We've had
problems in the past, but each session was accessing a huge amount of data.
 Another potential problem is that the different object stores will not be
swapping update information.  So this will have the same effect WRT data
freshness as running multiple instances.


Chuck



At 08:32 AM 14/05/2003 -0500, Mark Morris wrote:
>Okay, working along those lines, can't I set up a connection per Session? 
>Something along the same lines as when you want to use the actual user's
database login and password for the connection dictionary?
>
>Thanks again for all the assistance!  :-)
>
>-- Mark
>
>On Monday, May 12, 2003, at 11:17PM, Eric Bergerson <[email protected]> wrote:
>
>>If you are working with your WOApp set up to insure that you only process 
>>one request at a time (the not-really-single-threaded-mode), then you can 
>>do this:
>>
>>When your top level takeValuesFromRequest is called, you can set the 
>>delegate before you parse anything (I don't know where you would hook this, 
>>I would do it in my parent class of all my components).  When setting the 
>>delegate, you can store the editingContext that you use for that session in 
>>the delegate.
>>
>>You can then use it when the adaptor is used during the response/request 
>>transaction.
>>
>>At the end of appendResponse, you can then reset the delegate to null, to 
>>insure safety.
>>
>>I apologize if I am getting my WO terms mixed up, I have actually stopped 
>>using WebObjects for UI last year, and I am only using EOF right for my 
>>current project.
>>
>>- Eric
>>
>>
>>--On Monday, May 12, 2003 6:21 PM -0500 [email protected] wrote:
>>
>>> Hmmm.  All I want to do is make sure I have a delegate attached to the
>>> channel.  However, when the delegate method is called, I need to do
>>> Session-specific stuff (access the table name suffix).  So there is a
>>> valid point about my implementation that Chuck is raising.  I don't have
>>> the opportunity right at this moment to look through the docs, but what I
>>> need is a way to get back to the editing context that's calling the
>>> channel, from within my delegate method.  But since it's only passing a
>>> channel and an expression, how to manage it isn't obvious....    :-(
>>>
>>> Thanks again,
>>> Mark
>>>
>

--

Chuck Hill                                 [email protected]
Global Village Consulting Inc.             http://www.global-village.net