cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Borut Bolčina <borut.bolc...@gmail.com>
Subject Re: Old web application needs a second database
Date Mon, 03 May 2010 12:56:25 GMT
I am looking forward to this configuration merging feature - if that is what
you mean. Is there some draft document about what you want to do?

-Borut

2010/5/3 Andrus Adamchik <andrus@objectstyle.org>

> Just to add some perspective (and hopefully not to confuse things further),
> our direction in Cayenne 3.1 is towards scenario #2, and getting rid of #1
> completely. This way a user decides where his Cayenne stack (or multiple
> Cayenne stacks) is stored and how it is accessed.
>
> Andrus
>
>
>
> On May 3, 2010, at 3:19 PM, Andrus Adamchik wrote:
>
>
>> On May 3, 2010, at 3:12 PM, Borut Bolčina wrote:
>>
>>  There will be cayenne.xml (with node A) and
>>> my-cayenne.xml (with node A and B) on the classpath. Is that why?
>>>
>>
>> Yes.
>>
>>  I am not sure how to initialize.
>>>
>>
>> #1 is created implicitly when you call DataContext.createDataContext().
>> That's the one returned from Configuration.getSharedConfiguration().
>>
>> #2 you will have to create yourself and store somewhere. E.g. in a
>> ServletContext attribute.
>>
>> DefaultConfiguration conf = new DefaultConfiguration("my-cayenne.xml");
>> // store it for the app duration soemwhere
>> ...
>>
>> // later when you need a new context:
>> Configuration conf = .. // get it from ServletContext or from where you
>> put it
>> return conf.getDomain().createDataContext();
>>
>> Andrus
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message