cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Version 3.2 - createChildContext()
Date Tue, 06 Aug 2013 13:41:06 GMT
The answer depends on how you are getting a hold of ObjectContext (i.e. how Cayenne is bootstrapped).
If you are using CayenneFilter, you can do this:

import org.apache.cayenne.configuration.web.WebUtil;
...
CayenneRuntime r = WebUtil.getCayenneRuntime(servletContext);

Andrus

On Aug 6, 2013, at 4:35 PM, Markus Reich <markus.reich@markusreich.at> wrote:
> Hi,
> 
> I'm currently switching to 3.2 version. I now got a problem with
> ObjectContext.createChildContext() as mentioned in the API docu, you should
> use instead CayenneRuntime.getContext(DataChannel)
> http://cayenne.apache.org/docs/3.1/api/org/apache/cayenne/ObjectContext.html
> But I'm not sure how to get in my webapp the Runtime instance?
> 
> best regards
> Meex


Mime
View raw message