Current thread has no bound DataContext (zk integration)

From: mambo (ikonicpattern..mail.com)
Date: Fri Aug 22 2008 - 12:01:00 EDT

  • Next message: Tiho Lupak: "Re: Handling of database NULL - default value column to modeler?"

    I've been looking through the mailing list and I can't find a definite
    answer. I'm using ZK, I have added:
    <filter>
                <filter-name>CayenneFilter</filter-name>
                
    <filter-class>org.apache.cayenne.conf.WebApplicationContextFilter</filter-class>
           
            </filter>
            <filter-mapping>
                 <filter-name>CayenneFilter</filter-name>
                 <url-pattern>/*</url-pattern>
      </filter-mapping>

    to my web.xml. When I try "DataContext context =
    DataContext.getThreadDataContext();" I get an exception that says
    "Current thread has no bound DataContext". I'm figuring this is because
    ZK is multi threaded. I'm pretty new to Java so I'm not really
    comfortable trying to hack the cayanne source to get things to run. Is
    there a solution for this? If i created a new Datacontext with each
    Database request, how badly would that affect performance of my web app?



    This archive was generated by hypermail 2.0.0 : Sat Aug 23 2008 - 07:59:56 EDT