On 2/14/07, Andrus Adamchik <[EMAIL PROTECTED]> 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

Reply via email to