Re: Random Connection Closed Exceptions - Question to the code example

2009-01-20 Thread Stefan Riegel
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

Re: Random Connection Closed Exceptions - Question to the code example

2009-01-20 Thread Stefan Riegel
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

Re: Random Connection Closed Exceptions - Question to the code example

2009-01-20 Thread Stefan Riegel
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

Re: Random Connection Closed Exceptions - Question to the code example

2009-01-19 Thread Stefan Riegel
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

Random Connection Closed Exceptions - Question to the code example

2009-01-19 Thread Stefan Riegel
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

Re: Cannot create PoolableConnectionFactory (Unexpected exception encountered during query.)

2008-12-30 Thread Stefan Riegel
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

Re: Cannot create PoolableConnectionFactory (Unexpected exception encountered during query.)

2008-12-29 Thread Stefan Riegel
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

Cannot create PoolableConnectionFactory (Unexpected exception encountered during query.)

2008-12-29 Thread Stefan Riegel
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

Why does this not work with Thunderbird 1.5.0.9?

2007-02-10 Thread Stefan Riegel
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

Re: Cache problems with static resources

2007-01-19 Thread Stefan Riegel
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

Re: Cache problems with static resources

2007-01-18 Thread Stefan Riegel
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

Cache problems with static resources

2007-01-17 Thread Stefan Riegel
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