Re: Tomcat prematurely initializing Cayenne

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Mon Jun 13 2005 - 19:11:25 EDT

  • Next message: Andrus Adamchik: "Re: context..."

    Yeah, I thought this was straightened out back in 1.0. But maybe some
    of the 1.1 stack changes resulted in reemerging of this problem.

    One way to trace it would be putting "Thread.dumpStack()" in
    DataContext.readObject() and recompiling Cayenne. At least this
    should show where and how it happens.

    Andrus

    On Jun 13, 2005, at 6:36 PM, Cris Daniluk wrote:

    > I've seen this covered a few times on the list before, but it seemed
    > to have been resolved...
    >
    > I'm running Cayenne w/HSQLDB inside a Tomcat/WebWork application. I'm
    > configuring Cayenne through an init servlet, but whenever Tomcat
    > restarts and reactivates sessions, its triggering Cayenne to start:
    >
    > INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]]
    > (org.objectstyle.cayenne.access.QueryLogger:267) - 2005-06-13
    > 18:32:56,859 Created connection pool: jdbc:hsqldb:file:application
    > Driver class: org.hsqldb.jdbcDriver
    > Min. connections in the pool: 1
    > Max. connections in the pool: 100
    > INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]]
    > (org.cadencetools.bliki.webintf.InitServlet:22) - 2005-06-13
    > 18:32:56,937 Initializing application
    > Looking for repository at: jdbc:hsqldb:file:C:/dev/home/cris/bliki/
    > application
    > INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]]
    > (org.objectstyle.cayenne.access.QueryLogger:267) - 2005-06-13
    > 18:32:56,968 Created connection pool: jdbc:hsqldb:file:application
    > Driver class: org.hsqldb.jdbcDriver
    > Min. connections in the pool: 1
    > Max. connections in the pool: 100
    > ...
    >
    > The sessions that are stored become attached to a different database
    > (since its HSQLDB, it automatically creates a new tableless db in my
    > eclipse homedir). New sessions are correct..
    >
    > I'm not sure why the DataContext isn't deferring initialization.. any
    > ideas as to how I can track down the problem?
    >
    > Thanks,
    >
    > Cris
    >
    >



    This archive was generated by hypermail 2.0.0 : Mon Jun 13 2005 - 19:11:27 EDT