cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Configuration Class?
Date Mon, 25 Jul 2011 14:54:55 GMT
Hi Christian,

the approach is essentially the same (until we switch transaction factory to DI that is) -
you need a hold of DataDomain instance, and use it to create transactions. In 3.1 You'd get
DataDomain from ServerRuntime:

ServerRuntime r = ...
DataDomain d = r.getDataDomain();

Of course how you get a hold of ServerRuntime is application-specific.

Cheers,
Andrus

On Jul 25, 2011, at 5:50 PM, Christian Grobmeier wrote:

> Hi
> 
> what is the correct approach here?
> http://cayenne.apache.org/doc/understanding-transactions.html
> 
> DataDomain domain = Configuration.getSharedConfiguration().getDomain();
> Transaction tx = domain.createTransaction();
> 
> The Configuration class is not in my jar anymore (3.1M2) so I guess it
> has changed recently
> 
> Cheers,
> Christian
> 


Mime
View raw message