Thanks for the explanation. This makes things clearer. So both code
examples are correct, but the one in the docs minimizes resource usage?
All db related code I have written so far looked like this:
try {
// db related code with result set loops and more
// db related code done, first poss
have any more time to consider this
today, but I'd be interested to hear other people's comments on this
topic.
Regards
Alan Chaney
Stefan Riegel wrote:
Thanks Alan, just to make the thing really clear. You propose code
like this:
public void execute() {
Connection conn
ed - see Doug Lea et.al and 'happens before' .
Personally, I feel that the correct solution is to synchronize access
to the connection object when it is retrieved and closed.
I have to go out now and I don't have any more time to consider this
today, but I'd be interes
7; by definition is ALWAYS called and that is where you
should do the tidy up...
Alan Chaney
Stefan Riegel wrote:
I guess I understood the point with the "Random Connection Closed
Exceptions" Problem.
See at the end of
http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examp
I guess I understood the point with the "Random Connection Closed
Exceptions" Problem.
See at the end of
http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html
As I understand, only the connection itself must be protected this way.
The statement and ResultSet must not. I
ckaged versions have a tendency to split things out into a gazillion
different little pieces and you may be missing a package containing the
tomcat dbcp jar. If that's the case, the logs should have something to
the effect of "ClassNotFound" when you start the service.
--David
Stefa
use the latest,
fresh, stable mysql Connector/J.
David Smith schrieb:
Can you post relevant parts of your config? Replace the username,
password and hostnames with fakes, but otherwise post exactly what you
have in your specific environment.
--David
Stefan Riegel wrote:
Hi all,
I'm tryin
Hi all,
I'm trying to connect to a MySQL database based on the Tomcat Docs
example. See the error message below.
Similar to the Problem from Krapacs Ambrose, I'm using a standard
configured Ubuntu 8.04 Server with Tomcat 5.5. I did follow all hints in
the whole thread and reproduced exactly
Hello again,
see also my unresolved problem "Cache problems with static resources"
http://www.nabble.com/Cache-problems-with-static-resources-tf3031321.html#a8422512
I did try for days to find a solution. Should I ask in the developer
list if this is a bug?
- The configuration entry should
Gregor Schneider schrieb:
yes. simply don't use meta-tags, since according to some rfc browsers
do not have to interprete them.
use http-headers instead, simples as:
Expires: (Actual date - 1 month)
Write a filter that modifies the headers of each response.
Worked for us, although it was the
Stefan Riegel schrieb:
Hello all,
we are using Apache Tomcat 5.5.16 on both a Windows (development) and
Linux (production) system. Caching of static resources works fine but
we should control the behavior. We use a filter, which transforms
static xml files and inserts some data.
The access
Hello all,
we are using Apache Tomcat 5.5.16 on both a Windows (development) and
Linux (production) system. Caching of static resources works fine but we
should control the behavior. We use a filter, which transforms static
xml files and inserts some data.
The access log shows clearly that a
12 matches
Mail list logo