More to the point ... The two ways to instantiate DataContext
provided by Cayenne framework that are using DataContextFactory
behind the scenes (DataContext.createDataContext() and
WebApplicationContextFilter) may need to be migrated to something
that returns ObjectContext instead. But keep in mind that those are
just utilities and you don't have to use them (and
DataContextFactory). You can create your own context in your code,
skipping the factory.
Andrus
On Aug 16, 2007, at 9:13 AM, Andrus Adamchik wrote:
On 16/08/2007, at 9:02 PM, Adrian Wiesmann wrote:
Could anybody please help me out with an example of how to use
ObjectContextFactory, ObjectContext and ObjectContextDecorator?
I would
like to write some code which makes sure that every
ObjectContext created
in my application is created by my own factory which
automatically adds a
decorator (and idirectly lifecycle callbacks). I am mostly
interested to
see how my own factory could first call the "base"
implementation (not
sure what and where the "base" is). I got it working with
DataContextFactory but ObjectContext seems to be a little bit
different to
that.