Re[2]: pooled connection

From: Andrus (andru..bjectstyle.org)
Date: Sat Jan 04 2003 - 18:50:35 EST

  • Next message: Andrus: "Re[2]: pooled connection"

    At 03:45 AM 1/5/2003 +0500, ti..e7en.ru wrote:
    >Hello Andrus,
    >
    >that i have in controller class (struts framework)
    >
    >private DataContext createContext() {
    > Configuration.bootstrapSharedConfig(this.getClass());
    > DataDomain sharedDomain = Configuration.getSharedConfig().getDomain();
    > return sharedDomain.createDataContext();
    >}
    >
    >and when i want to work with DB i make this:
    >
    > if( this.ctxt == null ) this.ctxt = createContext();
    >
    >but if the web-application (under tomcat) is started for a long time
    >ctxt is not 'null' and access to him causes an error

    I see... any specific exception? Do you have a stack trace? It will be
    helpful to pinpoint the problem.

    Another question - is it possible that while Tomcat is running, MySQL is
    restarted independently from Tomcat?

    This seems a likely cause of this problem. Of course this may need a better
    handling in Cayenne internal connection pool and I really need to do some
    testing of this scenario.

    Cheers,
    Andrus



    This archive was generated by hypermail 2.0.0 : Sat Jan 04 2003 - 18:49:25 EST