FAQ
Hello,

how can I create a child context in 3.2?

class ObjectContext in 3.0 the method createChildContext is deprecated and
CayenneRuntime.getContext(DataChannel) should be used.

How can I receive the CayenneRuntime object in my webapplication, where no
ServerRuntime instance is available directly?

Regards Johannes

Search Discussions

  • Andrus Adamchik at Jan 14, 2014 at 12:08 pm
    How you access various app services depends on your app. If you are using injection, it is declarative and fairly trivial. If not, you can either use a static singleton, or look things up in ServletContext. E.g. if you are using CayenneFilter to bootstrap Cayenne, you’d do this:

    ServletContext servletContext = ..
    CayenneRuntime r = WebUtil.getCayenneRuntime(servletContext);

    Andrus

    On Jan 14, 2014, at 12:43 PM, jotpe wrote:
    Hello,

    how can I create a child context in 3.2?

    class ObjectContext in 3.0 the method createChildContext is deprecated and
    CayenneRuntime.getContext(DataChannel) should be used.

    How can I receive the CayenneRuntime object in my webapplication, where no
    ServerRuntime instance is available directly?

    Regards Johannes

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriescayenne
postedJan 14, '14 at 10:48a
activeJan 14, '14 at 12:08p
posts2
users2
websitecayenne.apache.org

2 users in discussion

Andrus Adamchik: 1 post Jotpe: 1 post

People

Translate

site design / logo © 2021 Grokbase