Re: programming question

2011-02-26 Thread Charles Polisher
Mark Eggers wrote: When the database is shut down, I get exception messages logged (you do log exceptions, right?). Pages that depend on database content are missing that content. When the database is started up again, a refresh of the pages displays the content coming from the database.

Re: programming question

2011-02-26 Thread Jorge Medina
If you use Oracle, some DBCP settings may not work and you may need to use Oracle connection pool classes. In particular, I was not able to use DBCP and have a loginTimeout when using Oracle. Using Oracle connection pool classes, the validation query does not work in the same way as in Apache

Re: programming question

2011-02-25 Thread Michael Ludwig
János Löbb schrieb am 24.02.2011 um 11:24 (-0500): On Feb 24, 2011, at 10:58 AM, David kerber wrote: On 2/24/2011 10:49 AM, János Löbb wrote: What is the very basic structure of a web application that is connected to a database through a connection pool, but would not require to

RE: programming question

2011-02-25 Thread Martin Gainty
+0100 From: mil...@gmx.de To: users@tomcat.apache.org Subject: Re: programming question János Löbb schrieb am 24.02.2011 um 11:24 (-0500): On Feb 24, 2011, at 10:58 AM, David kerber wrote: On 2/24/2011 10:49 AM, János Löbb wrote: What is the very basic structure of a web application

Re: programming question

2011-02-25 Thread Mark Eggers
- Original Message (edited) From: Michael Ludwig mil...@gmx.de János Löbb schrieb am 24.02.2011 um 11:24 (-0500): On Feb 24, 2011, at 10:58 AM, David kerber wrote: On 2/24/2011 10:49 AM, János Löbb wrote: What is the very basic structure of a web application that is connected

Re: programming question

2011-02-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David, On 2/24/2011 12:08 PM, David Smith wrote: With tomcat's built-in database pooling, just adding a validation query to the resource config should be all that's necessary. On each borrow of a connection, the connection is tested and closed if

programming question

2011-02-24 Thread János Löbb
Hi, What is the very basic structure of a web application that is connected to a database through a connection pool, but would not require to restart itself or restart Tomcat when the database goes down - let say for maintenance ? Telling otherwise how to write a webapp that would survive a

Re: programming question

2011-02-24 Thread David kerber
On 2/24/2011 10:49 AM, János Löbb wrote: Hi, What is the very basic structure of a web application that is connected to a database through a connection pool, but would not require to restart itself or restart Tomcat when the database goes down - let say for maintenance ? Telling otherwise

Re: programming question

2011-02-24 Thread János Löbb
On Feb 24, 2011, at 10:58 AM, David kerber wrote: On 2/24/2011 10:49 AM, János Löbb wrote: Hi, What is the very basic structure of a web application that is connected to a database through a connection pool, but would not require to restart itself or restart Tomcat when the database

Re: programming question

2011-02-24 Thread chris derham
When I mention them that their programs should handle the situation resulting from the database bounce automagically and not the dba handling the web app or Tomcat shutdowns and restarts, they look at me like I came from Mars or Saturn :-) If you code the app to use a connection pool, the

Re: programming question

2011-02-24 Thread David Smith
With tomcat's built-in database pooling, just adding a validation query to the resource config should be all that's necessary. On each borrow of a connection, the connection is tested and closed if the test fails. Failed connections are replaced with new ones. --David On 2/24/2011 10:49 AM,

Re: programming question

2011-02-24 Thread David kerber
On 2/24/2011 11:35 AM, chris derham wrote: When I mention them that their programs should handle the situation resulting from the database bounce automagically and not the dba handling the web app or Tomcat shutdowns and restarts, they look at me like I came from Mars or Saturn :-) If you

Re: org.apache.tomcat.jni.Poll programming question

2010-10-23 Thread Francesc Oller
El ds 23 de 10 de 2010 a les 03:17 +0400, en/na Konstantin Kolinko va escriure: From Poll.java of Tomcat trunk: * @param descriptors Array of signaled descriptors (output parameter) *The descriptor array must be two times the size of pollset. *and are

Re: org.apache.tomcat.jni.Poll programming question

2010-10-22 Thread Konstantin Kolinko
2010/10/21 Francesc Oller francesc.ol...@upc.edu: I cannot say that I throughly know this. Most part of the below answers is just from reading the sources: 1.- call Poll.poll fails with: Poll.poll: Unknown error 4294847295 From Poll.java of Tomcat trunk: * @param descriptors Array

Re: org.apache.tomcat.jni programming question

2010-10-20 Thread Francesc Oller
Ooopps, yes, I forgot it. Thanks, francesc El dc 20 de 10 de 2010 a les 06:50 +0200, en/na Mladen Turk va escriure: On 10/20/2010 01:21 AM, Francesc Oller wrote: Please what I am doing wrong? Socket.bind(s, addr); You need to tell the socket to listen after binding it to the

org.apache.tomcat.jni.Poll programming question

2010-10-20 Thread Francesc Oller
Again, this code doesn't work: import org.apache.tomcat.jni.*; import java.util.*; public class ExampleAPR { public static void main(String[] args) { int err = 0; try { // Initialize APR library Library.initialize(null); // Create pool long pool

org.apache.tomcat.jni programming question

2010-10-19 Thread Francesc Oller
Please what I am doing wrong? import org.apache.tomcat.jni.*; import java.util.*; public class ExampleAPR { public static void main(String[] args) { try { // Initialize APR library Library.initialize(null); // Create pool long pool = Pool.create(0);

Re: org.apache.tomcat.jni programming question

2010-10-19 Thread Mladen Turk
On 10/20/2010 01:21 AM, Francesc Oller wrote: Please what I am doing wrong? Socket.bind(s, addr); You need to tell the socket to listen after binding it to the address. eg: Socket.listen(s, 10); long ns = Socket.accept(s); Regards -- ^TM