• 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: Different Database Connection per session for the same model
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Different Database Connection per session for the same model


  • Subject: Re: Different Database Connection per session for the same model
  • From: Mike Gargano <email@hidden>
  • Date: Mon, 18 Jun 2012 17:09:37 -0400

it is.  this is what i'm basically doing to on a per session basis

-mike

Sent from my iPhone

On Jun 18, 2012, at 2:53 PM, Henrique Prange <email@hidden> wrote:

> Paul,
>
> Maybe this project can be helpful. I created it following Chuck's advice. It's very experimental, but works. Sorry for the lack of comments in the source code.
>
> https://github.com/hprange/multi-tenant-prototype
>
> Cheers,
>
> Henrique
>
> On 18/06/2012, at 15:13, Chuck Hill wrote:
>
>> I have never done this, but I think it can be done.  You will need to create new EOModelGroups, load/copy the models from the default group, set the connection information, and create a new EOObjectStoreCoordinator from that new model group.  You need to be very careful in your code (and in any Wonder code that you call) to NOT call default* methods as most use the OSC for the default model group.  Not what you want.  Then in each session/page, create an editing context in the desired OSC.  Again, avoid use of the defaultEditingContext to avoid confusion.
>>
>>
>> Chuck
>>
>>
>> On 2012-06-18, at 9:32 AM, Paul Dunkler wrote:
>>
>>> Hi List,
>>>
>>> is there any way to have different database connections per session? I need this in an application for giving the user the ability to change between several different copies of the database to work on.
>>>
>>> I always tried to copy EOModels and so on, read some mails from the list but not really found an answer for that problem. I know that what i trying to do will cause a bit memory overhead but i do not want to provide ~25 applications just because they need different database connections.
>>>
>>> Would be nice to get some suggestions...
>>>
>>> --
>>> With best regards
>>> Paul Dunkler
>>> _______________________________________________
>>> 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
>>
>> --
>> 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/gvc/practical_webobjects
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> 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
>
>
> _______________________________________________
> 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
 _______________________________________________
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

References: 
 >Different Database Connection per session for the same model (From: Paul Dunkler <email@hidden>)
 >Re: Different Database Connection per session for the same model (From: Chuck Hill <email@hidden>)
 >Re: Different Database Connection per session for the same model (From: Henrique Prange <email@hidden>)

  • Prev by Date: Re: Different Database Connection per session for the same model
  • Next by Date: Re: Different Database Connection per session for the same model
  • Previous by thread: Re: Different Database Connection per session for the same model
  • Next by thread: Re: Different Database Connection per session for the same model
  • Index(es):
    • Date
    • Thread