svn commit: r741579 - /tomcat/tc6.0.x/trunk/STATUS.txt

2009-02-06 Thread jfclere
Author: jfclere
Date: Fri Feb  6 14:47:22 2009
New Revision: 741579

URL: http://svn.apache.org/viewvc?rev=741579&view=rev
Log:
Propose my patch.

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=741579&r1=741578&r2=741579&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Feb  6 14:47:22 2009
@@ -151,3 +151,8 @@
   http://svn.apache.org/viewvc?rev=740684&view=rev
   +1: markt
   -1: 
+
+* Make sure the 400 is returned to the browser. (like other connectors).
+  http://people.apache.org/~jfclere/patches/patch400.txt
+  +1: jfclere
+  -1:



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn repo layout for modules

2009-02-06 Thread Filip Hanik - Dev Lists

Remy Maucherat wrote:

On Fri, 2009-01-30 at 17:44 -0700, Filip Hanik - Dev Lists wrote:
  

I would suggest

https://svn.apache.org/repos/asf/tomcat/
  - site
  - tc6.0.x
  - trunk
  - modules  <-- ADD THIS
- jdbc-pool
  - trunk
  - tags
  - branches
- bayeux
  - trunk
  - tags
  - branches
   
and move it away and out of (and get rid of) the tomcat/modules folder, 
and let tomcat be tomcat.



My suggestion is to dump modules as much as possible, this is messy.
JDBC should really be developed elsewhere beyond the experimental stage
(Tomcat is not a DB project, thanks) and Bayeux should go to the main
tree (if it works).
  
That is a contradictory statement. Tomcat is not a DB project, nor is it 
a Bayeux project.

So the reasoning above doesn't make any sense if you look at it that way.

Tomcat is no longer the reference implementation either.

So there is nothing that prevents us from providing value add components 
as long as we are willing to  maintain it.


ASF is community over code, its hard to grow the community if you never 
add any code.
Tomcat JDBC would actually make TC 7 even more light weight since it is 
smaller than DBCP.
Tomcat JDBC is not experimental either, its actually way more stable 
than expected. Run it through let me know if you find any bugs.


So for modules, they are a good idea if we want to encourage people to 
contribute to more areas.
as for the two modules, jdbc-pool and bayeux, I think they should still 
be modules if we want to keep the core light and by being modules let us 
fix bugs faster without releasing new versions of tomcat.


So from a code perspective you are right, from a community perspective 
its not good at all to keep everything minimalistic.
Especially since you mentioned you wouldn't involve yourself in trunk, 
then we are down by one resource. I would of course like for you to take 
back that statement and rejoin in the efforts, despite differences, the 
more is still the merrier


So I suggest to keep the modules here, mostly to encourage new 
contributions to this project.


Filip

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r741660 - /tomcat/tc6.0.x/trunk/STATUS.txt

2009-02-06 Thread remm
Author: remm
Date: Fri Feb  6 18:20:07 2009
New Revision: 741660

URL: http://svn.apache.org/viewvc?rev=741660&view=rev
Log:
- Votes.

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=741660&r1=741659&r2=741660&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Feb  6 18:20:07 2009
@@ -131,28 +131,28 @@
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46564
   Make page encoding test case insensitive
-  +1: markt
+  +1: markt, remm
   -1:
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46606
   Make max depth configurable for WebDAV servlet
   http://svn.apache.org/viewvc?rev=740635&view=rev
-  +1: markt
+  +1: markt, remm
   -1:
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=38197
   Take account of jsp:attribute elements when naming tag pools
   http://svn.apache.org/viewvc?rev=740675&view=rev
-  +1: markt
+  +1: markt, remm
   -1: 
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=38553
   Return 401 rather than 400 if client presents no certs for CLIENT-CERT auth
   http://svn.apache.org/viewvc?rev=740684&view=rev
-  +1: markt
+  +1: markt, remm
   -1: 
 
 * Make sure the 400 is returned to the browser. (like other connectors).
   http://people.apache.org/~jfclere/patches/patch400.txt
-  +1: jfclere
+  +1: jfclere, remm
   -1:



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn repo layout for modules

2009-02-06 Thread Remy Maucherat
On Fri, 2009-02-06 at 10:37 -0700, Filip Hanik - Dev Lists wrote:
> ASF is community over code, its hard to grow the community if you never 
> add any code.
> Tomcat JDBC would actually make TC 7 even more light weight since it is 
> smaller than DBCP.
> Tomcat JDBC is not experimental either, its actually way more stable 
> than expected. Run it through let me know if you find any bugs.

Tomcat does Comet, so Bayeux is really directly related. You can still
move it if you think it is not appropriate, though.

OTOH, it seems obvious a DB pool is purely a database project. There is
a DB project at the ASF already, and there's also commons, where you can
propose your project as DBCP.next. Tomcat then ships it, replacing DBCP,
which results in the same value for users.

I think you can add code which is Servlet or JSP related, rather than
about anything which could get shipped with Tomcat.

Rémy



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r741668 - /tomcat/tc6.0.x/trunk/STATUS.txt

2009-02-06 Thread funkman
Author: funkman
Date: Fri Feb  6 18:44:13 2009
New Revision: 741668

URL: http://svn.apache.org/viewvc?rev=741668&view=rev
Log:
votes


Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=741668&r1=741667&r2=741668&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Feb  6 18:44:13 2009
@@ -126,33 +126,34 @@
 
 * Align installer licenses with main license file
   http://svn.apache.org/viewvc?rev=734743&view=rev
-  +1: markt, fhanik
+  +1: markt, fhanik, funkman
   -1: 
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46564
   Make page encoding test case insensitive
   +1: markt, remm
+  +0: funkman: Where's the patch?
   -1:
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46606
   Make max depth configurable for WebDAV servlet
   http://svn.apache.org/viewvc?rev=740635&view=rev
-  +1: markt, remm
+  +1: markt, remm, funkman
   -1:
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=38197
   Take account of jsp:attribute elements when naming tag pools
   http://svn.apache.org/viewvc?rev=740675&view=rev
-  +1: markt, remm
+  +1: markt, remm, funkman
   -1: 
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=38553
   Return 401 rather than 400 if client presents no certs for CLIENT-CERT auth
   http://svn.apache.org/viewvc?rev=740684&view=rev
-  +1: markt, remm
+  +1: markt, remm, funkman
   -1: 
 
 * Make sure the 400 is returned to the browser. (like other connectors).
   http://people.apache.org/~jfclere/patches/patch400.txt
-  +1: jfclere, remm
+  +1: jfclere, remm, funkman
   -1:



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r741747 - in /tomcat/trunk/modules/jdbc-pool: java/org/apache/tomcat/jdbc/pool/ java/org/apache/tomcat/jdbc/pool/jmx/ test/org/apache/tomcat/jdbc/test/

2009-02-06 Thread fhanik
Author: fhanik
Date: Fri Feb  6 21:49:36 2009
New Revision: 741747

URL: http://svn.apache.org/viewvc?rev=741747&view=rev
Log:
Make sure thread starvation doesn't exist during reclamation of connections

Added:

tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/StarvationTest.java
   (with props)
Modified:

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PooledConnection.java

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java

Modified: 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java?rev=741747&r1=741746&r2=741747&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
 Fri Feb  6 21:49:36 2009
@@ -98,7 +98,12 @@
  * reference to mbean
  */
 protected org.apache.tomcat.jdbc.pool.jmx.ConnectionPool jmxPool = null;
-
+
+/**
+ * counter to track how many threads are waiting for a connection
+ */
+protected AtomicInteger waitcount = new AtomicInteger(0);
+
 
//===
 // PUBLIC METHODS
 
//===
@@ -142,6 +147,14 @@
 public String getName() {
 return getPoolProperties().getPoolName();
 }
+
+/**
+ * Return the number of threads waiting for a connection
+ * @return number of threads waiting for a connection
+ */
+public int getWaitCount() {
+return waitcount.get();
+}
 
 /**
  * Returns the pool properties associated with this connection pool
@@ -397,6 +410,9 @@
 
jmxPool.notify(org.apache.tomcat.jdbc.pool.jmx.ConnectionPool.NOTIFY_ABANDON, 
trace);
 }
 con.abandon();
+//we've asynchronously reduced the number of connections
+//we could have threads stuck in idle.poll(timeout) that will 
never be notified
+if (waitcount.get()>0) idle.offer(new 
PooledConnection(poolProperties,this));
 } finally {
 con.unlock();
 }
@@ -457,11 +473,17 @@
 maxWait = 
(getPoolProperties().getMaxWait()<=0)?Long.MAX_VALUE:getPoolProperties().getMaxWait();
 }
 long timetowait = Math.max(0, maxWait - 
(System.currentTimeMillis() - now));
+waitcount.incrementAndGet();
 try {
 //retrieve an existing connection
 con = idle.poll(timetowait, TimeUnit.MILLISECONDS);
 } catch (InterruptedException ex) {
-Thread.interrupted();
+Thread.interrupted();//clear the flag, and bail out
+SQLException sx = new SQLException("Pool wait interrupted.");
+sx.initCause(ex);
+throw sx;
+} finally {
+waitcount.decrementAndGet();
 }
 if (maxWait==0 && con == null) { //no wait, return one if we have 
one
 throw new SQLException("[" + 
Thread.currentThread().getName()+"] " +
@@ -529,6 +551,9 @@
 boolean setToNull = false;
 try {
 con.lock();
+if (!con.isDiscarded() && !con.isInitialized()) {
+con.connect();
+}
 if ((!con.isDiscarded()) && 
con.validate(PooledConnection.VALIDATE_BORROW)) {
 //set the timestamp
 con.setTimestamp(now);
@@ -647,7 +672,6 @@
 if ((now - time) > con.getAbandonTimeout()) {
 busy.remove(con);
 abandon(con);
-release(con);
 setToNull = true;
 } else {
 //do nothing

Modified: 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PooledConnection.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PooledConnection.java?rev=741747&r1=741746&r2=741747&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PooledConnection.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PooledConnection.java
 Fri Feb  6 21:49:36 2009
@@ -53,8 +53,8 @@
 protected ConnectionPool parent;
 
 protected WeakReference handler = null;
-
-public PooledConnection(PoolProperties prop, ConnectionPool parent) throws 
SQLException {
+
+publ

Re: svn repo layout for modules

2009-02-06 Thread Filip Hanik - Dev Lists

Remy Maucherat wrote:

On Fri, 2009-02-06 at 10:37 -0700, Filip Hanik - Dev Lists wrote:
  
ASF is community over code, its hard to grow the community if you never 
add any code.
Tomcat JDBC would actually make TC 7 even more light weight since it is 
smaller than DBCP.
Tomcat JDBC is not experimental either, its actually way more stable 
than expected. Run it through let me know if you find any bugs.



Tomcat does Comet, so Bayeux is really directly related. You can still
move it if you think it is not appropriate, though.

OTOH, it seems obvious a DB pool is purely a database project. There is
a DB project at the ASF already, and there's also commons, where you can
propose your project as DBCP.next. Tomcat then ships it, replacing DBCP,
which results in the same value for users.
  

that discussion does exist if you look back into the archives
what has changed since then?
Filip

I think you can add code which is Servlet or JSP related, rather than
about anything which could get shipped with Tomcat.

Rémy



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org


  



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 46666] Why is disableUploadTimeout and KeepAliveTimeout correlated in Http11 Connector?

2009-02-06 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=4


Doug Drechsel  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO




-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 46666] Why is disableUploadTimeout and KeepAliveTimeout correlated in Http11 Connector?

2009-02-06 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=4


Doug Drechsel  changed:

   What|Removed |Added

 Status|NEEDINFO|NEW




-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn repo layout for modules

2009-02-06 Thread Remy Maucherat
On Fri, 2009-02-06 at 14:59 -0700, Filip Hanik - Dev Lists wrote:
> that discussion does exist if you look back into the archives
> what has changed since then?

The proposed module layout looks so-so to me, and apparently others feel
the same, so a solution is to remove the modules.

Rémy



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn repo layout for modules

2009-02-06 Thread Costin Manolache
On Fri, Feb 6, 2009 at 3:07 PM, Remy Maucherat  wrote:

> On Fri, 2009-02-06 at 14:59 -0700, Filip Hanik - Dev Lists wrote:
> > that discussion does exist if you look back into the archives
> > what has changed since then?
>
> The proposed module layout looks so-so to me, and apparently others feel
> the same, so a solution is to remove the modules.


Can we just leave the modules as they are - it really doesn't matter that
much.
Tagging is possible ( just tag the whole tree ), release is possible. The
question of
scope remains - but I see no problem with having a tomcat-specific jdbc pool
or other
components ( like we have juli and many other things that could fit commons
better ),
it it is maintained ( which makes it quite simple - if code is maintained
mostly by tomcat,
why not leave it in tomcat ? )

I'm going to push the lite 'module' as well - modules dir seems a good
middle ground.

Costin


svn commit: r741836 - /tomcat/tc6.0.x/trunk/STATUS.txt

2009-02-06 Thread fhanik
Author: fhanik
Date: Sat Feb  7 03:22:15 2009
New Revision: 741836

URL: http://svn.apache.org/viewvc?rev=741836&view=rev
Log:
votes

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=741836&r1=741835&r2=741836&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Sat Feb  7 03:22:15 2009
@@ -150,10 +150,10 @@
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=38553
   Return 401 rather than 400 if client presents no certs for CLIENT-CERT auth
   http://svn.apache.org/viewvc?rev=740684&view=rev
-  +1: markt, remm, funkman
+  +1: markt, remm, funkman, fhanik
   -1: 
 
 * Make sure the 400 is returned to the browser. (like other connectors).
   http://people.apache.org/~jfclere/patches/patch400.txt
-  +1: jfclere, remm, funkman
+  +1: jfclere, remm, funkman, fhanik
   -1:



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r741843 - /tomcat/tc6.0.x/trunk/STATUS.txt

2009-02-06 Thread billbarker
Author: billbarker
Date: Sat Feb  7 05:18:37 2009
New Revision: 741843

URL: http://svn.apache.org/viewvc?rev=741843&view=rev
Log:
voting

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=741843&r1=741842&r2=741843&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Sat Feb  7 05:18:37 2009
@@ -151,9 +151,12 @@
   Return 401 rather than 400 if client presents no certs for CLIENT-CERT auth
   http://svn.apache.org/viewvc?rev=740684&view=rev
   +1: markt, remm, funkman, fhanik
+   0: billbarker With the JIO connector, this won't do anything since the 
connection is already dropped
+ Haven't checked what the other ones will do
   -1: 
 
 * Make sure the 400 is returned to the browser. (like other connectors).
   http://people.apache.org/~jfclere/patches/patch400.txt
   +1: jfclere, remm, funkman, fhanik
-  -1:
+  -1: billbarker Even though I'm already out voted, this needs to go through 
the ActionHook to 
+ prevent confusing Apache with multiple END_RESPONSE messages



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn repo layout for modules

2009-02-06 Thread Peter Rossbach

What we and user need, is a real plugin and tool contribution area.

+1 to start the modules plugin system to create more value of the  
tomcat project


regards,
Peter



Am 07.02.2009 um 01:18 schrieb Costin Manolache:

On Fri, Feb 6, 2009 at 3:07 PM, Remy Maucherat   
wrote:



On Fri, 2009-02-06 at 14:59 -0700, Filip Hanik - Dev Lists wrote:

that discussion does exist if you look back into the archives
what has changed since then?


The proposed module layout looks so-so to me, and apparently  
others feel

the same, so a solution is to remove the modules.



Can we just leave the modules as they are - it really doesn't  
matter that

much.
Tagging is possible ( just tag the whole tree ), release is  
possible. The

question of
scope remains - but I see no problem with having a tomcat-specific  
jdbc pool

or other
components ( like we have juli and many other things that could fit  
commons

better ),
it it is maintained ( which makes it quite simple - if code is  
maintained

mostly by tomcat,
why not leave it in tomcat ? )

I'm going to push the lite 'module' as well - modules dir seems a good
middle ground.

Costin