Hi Guys,
I ended up wrapping the JNDIDataSourceFactory, DataSource and Connection
classes and configuring this in the domain configuration file. The wrapped
Connection class sets the queryTimeout when the Statement objects are
created.
This flushed out the errors, which we are now working to
Okay, that's the issue (not calling close()). I thought what I was getting
back was a real JDBC Connection, but it looks like I'm getting back a
ConnectionWrapper, which when closed, returns the connection to pool. I
can do something conditionally with this.
Thanks,
Lon
On Tue, Oct 14, 2014 at
That's basically what I'm doing...
DataSource dataSource = serverRuntime().getDataSource(dataNodeName);
try {
return dataSource.getConnection();
} catch (SQLException sqe) {
throw new RuntimeException(sqe);
}
No exception is being throw. My query executes (a simpl
Hi Lon,
Some code samples showing how you get and release connection would help to
understand your problem better. But... You can actually bypass dealing with the
internals of Cayenne stack and work with DataSource as you would in a straight
JDBC application:
ServerRuntime r = ...
DataSource d
Yep, that's one way of doing it, though requiring to use a custom query
everywhere. A DI alternative of the same solution is to do something like this
in a custom Module:
binder.bind(OracleSniffer.class).to(MyOracleSniffer.class);
MyOracleSniffer would implement DbAdapterDetector which is a d
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