Re: Database Connection Question
Re: Database Connection Question
- Subject: Re: Database Connection Question
- From: Gennady Kushnir <email@hidden>
- Date: Tue, 30 Nov 2010 13:59:19 +0300
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
>>>> 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?
So the modelGroup is going to be the root of EOF stack, not the
DatabaseContext this time?
And by the way, what is this method intended for after all?
_______________________________________________
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