cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lon Varscsak <lon.varsc...@gmail.com>
Subject Access to JDBC Connection
Date Tue, 14 Oct 2014 22:54:27 GMT
Hey all,

I have some code that executes some raw SQL and historically (with EOF) I
just get the connection that would normally be used for that editing
context.  No problems.  So I'm trying to implement that similarly in
Cayenne, and I'm getting the DataNode's DataSource's connection, and it
works, but then any subsequent calls (at least within the same request) I
get a timeout because it's like the connection is being used (even though
I'm done executing my query) and unavailable to the pool (error:  Can't
obtain connection. Request timed out. Total used connections: 1)

I've been using this code with a JDBC Connection for a very long time, and
I think I'm releasing the resources I create (the Statement).  What could I
be missing here?  Is there a better way to "checkout" and then "release"
the connection?

Thanks,

Lon

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message