FAQ
Hi

I'm trying to setup two services each in a seperate context under tomcat. I
would like to get each
context pointing to different dataDomains.

How do I ask one context's DataContext.getThreadLocalContext() to use one
dataDomain and the
2nd context to use the 2nd dataDomain?

I am using Cayenne 3M4.

Ian

Search Discussions

  • Ian Jamieson at Jul 30, 2008 at 9:00 am
    Funny how you figure things out once u already asked the dumb question ^^.

    I ended up writing a small class to take the place of
    "WebApplicationContextFilter".
    It can create a DataContext by domainName and then use
    DataContext.bindThreadDataContext().

    Is there anything wrong with this approach ?

    Ian
    On Wed, Jul 30, 2008 at 3:59 PM, Ian Jamieson wrote:

    Hi

    I'm trying to setup two services each in a seperate context under tomcat. I
    would like to get each
    context pointing to different dataDomains.

    How do I ask one context's DataContext.getThreadLocalContext() to use one
    dataDomain and the
    2nd context to use the 2nd dataDomain?

    I am using Cayenne 3M4.

    Ian
  • Malcolm Edgar at Jul 30, 2008 at 12:06 pm
    This is exactly what I would recommend.

    regards Malcolm Edgar
    On Wed, Jul 30, 2008 at 7:00 PM, Ian Jamieson wrote:
    Funny how you figure things out once u already asked the dumb question ^^.

    I ended up writing a small class to take the place of
    "WebApplicationContextFilter".
    It can create a DataContext by domainName and then use
    DataContext.bindThreadDataContext().

    Is there anything wrong with this approach ?

    Ian
    On Wed, Jul 30, 2008 at 3:59 PM, Ian Jamieson wrote:

    Hi

    I'm trying to setup two services each in a seperate context under tomcat. I
    would like to get each
    context pointing to different dataDomains.

    How do I ask one context's DataContext.getThreadLocalContext() to use one
    dataDomain and the
    2nd context to use the 2nd dataDomain?

    I am using Cayenne 3M4.

    Ian

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriescayenne
postedJul 30, '08 at 8:00a
activeJul 30, '08 at 12:06p
posts3
users2
websitecayenne.apache.org

2 users in discussion

Ian Jamieson: 2 posts Malcolm Edgar: 1 post

People

Translate

site design / logo © 2023 Grokbase