On Nov 30, 2010, at 2:59 AM, Gennady Kushnir wrote:

> Thank you for these tips
> 
>>>>> The point is that I do use multiple EOF stacks. I clearly admit that
>>>>> each EOObjectStoreCoordinator gets its own set of db connections.
>>>> 
>>>> It only needs a single connection to work.
>>> 
>>> Let's say single connection for each used database ;)
>>> In fact that is a goal I'd like to achieve to have a single connection
>>> for a EOF stack per database.
>> 
>> That is what should happen *if* the connection dictionaries are equals() and 
>> you close the jdbc2info connections.
> Hmm. I'll put some more research into it. Strangely I do have multiple
> connections yet.
> I should find what ruins equality... if it is so

If you are using Wonder or the GVC frameworks (and likely every other major WO 
framework) there are classes to set all of this to the same dictionary as the 
models are loaded.


>>>>> I use separate EOF stack to access previous year data stored in a
>>>>> separate database with identical structure.
>>>>> That is why I employ
>>>>> EODatabaseContext.forceConnectionWithModel(model,connectionDict,ec)
>>>>> And that is why my models get identical connection dictionary.
>>>> 
>>>> I am not sure if that is the  best / right way to do this.
>>> 
>>> I did not find any other method to connect a model do different databases.
>> 
>> You need to create a new model group for the new EOF stack (the one using 
>> data from previous years), add the models, and update the connection 
>> dictionaries before using the EOF stack.
> 
> I'not sure I got it right.
> I'm using the same models to access different databases. Should I
> clone them and place copies to another model group?

That would be my first plan.


> So the modelGroup is going to be the root of EOF stack, not the
> DatabaseContext this time?

It does not change the root, just changes what the context uses to talk to the 
database.


> And by the way, what is this method intended for after all?


I am not sure.


Chuck

-- 
Chuck Hill             Senior Consultant / VP Development

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







Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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 arch...@mail-archive.com

Reply via email to