Re: Problem with DataPort & Tomcat

From: Øyvind Harboe (oyvind.harbo..ylin.com)
Date: Wed Feb 14 2007 - 11:20:28 EST

  • Next message: Frank: "Re: OutOfMemoryErrors (solved)"

    On 2/14/07, Andrus Adamchik <andru..bjectstyle.org> wrote:
    > Just a guess without digging through the code details - a different
    > DataSource implementation in Tomcat (DBCP) does something
    > differently. Try using the same DataSource you used in Jetty.

    I changed my connection config in Tomcat as below and it worked. Thanks!

    I blithely copied something I found while googling, I don't actually
    know anything about org.objectstyle.cayenne.conn.ContainerPoolFactory,
    or why Cayenne would implement such a thing in the first place.

    I find this a bit spooky... Why would my code break with Tomcat
    connection pooling???

    I wrote connection configuration according to the examples in the Tomcat doc.

    From (fails):

      <Resource name="jdbc/qpb" auth="Container"
              type="javax.sql.DataSource"
              driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
              url="jdbc:derby:c:\workspace\qpbtapestry\testdb\demo_derby;create=true"
              username="" password="" maxActive="5" maxIdle="2"
              />

    To (which works):

      <Resource name="jdbc/qpb" auth="Container"
              type="javax.sql.DataSource"
              driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
              url="jdbc:derby:c:\workspace\qpbtapestry\testdb\demo_derby;create=true"
              username="" password="" maxActive="5" maxIdle="2"
      factory="org.objectstyle.cayenne.conn.ContainerPoolFactory"
              />

    -- 
    Øyvind Harboe
    http://www.zylin.com
    



    This archive was generated by hypermail 2.0.0 : Wed Feb 14 2007 - 11:20:56 EST