• 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: Database Connection Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Database Connection Question


  • Subject: Re: Database Connection Question
  • From: Gennady Kushnir <email@hidden>
  • Date: Wed, 24 Nov 2010 13:18:56 +0300

>> 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.

>> 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.

>> I am quite interested if multiple models could share single db context
>> and thus lower the number of open connections.
>
> They can't share db contexts across EOF stacks.
That's quite clear. I am speaking about several models within one
stack connecting to the same database.

>> During my experimentations I have found that it is
>> EODatabaseContext.forceConnectionWithModel(...) the one who create a
>> connection for a mentioned model which does not get reused afterwards.
>> May be that is aforementioned JDBCinfo connection?
>
> Maybe or it could be a side effect or misuse of that method.  Are the models already connected in the new EOF stack before you call this?
No, they are not connected. I call this in Application constructor.
And also this method is the only place where models get correct
connection dictionary.

Gennady
 _______________________________________________
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

  • Follow-Ups:
    • Re: Database Connection Question
      • From: Chuck Hill <email@hidden>
References: 
 >Re: Database Connection Question (From: Gennady Kushnir <email@hidden>)
 >Re: Database Connection Question (From: Chuck Hill <email@hidden>)
 >Re: Database Connection Question (From: Gennady Kushnir <email@hidden>)
 >Re: Database Connection Question (From: Chuck Hill <email@hidden>)

  • Prev by Date: New JIRA project for the community
  • Next by Date: Re: ERAttachment... to-many and thumbs
  • Previous by thread: Re: Database Connection Question
  • Next by thread: Re: Database Connection Question
  • Index(es):
    • Date
    • Thread