Re: APR, WebSocket and Servlet 3.1 NIO refactoring

2013-01-16 Thread Mark Thomas
On 16/01/2013 06:50, Mladen Turk wrote:
 On 01/15/2013 02:29 PM, Mark Thomas wrote:
 Hi,

 3. Currently, we have no record of which Poller a socket is registered
 with. This makes 2) more expensive as we have to iterate through the
 Pollers to find the socket. Tracking the current poller used by a socket
 would make 2) a cheaper operation.
 
 Think this can be done with relative ease.
 I recently made some changes to native pollset performance
 (removing multiple linear scans for sockets if they are in the pollset)
 which can reference the pollset with socket.
 
 In theory this allows to remove the socket from 'any' pollset which
 means that you can remove the socket from pollset without knowing to
 which one it belongs.
 
 If there is a need for reconfigure (different signaling events)
 we can add an extra API call that would allow that, without the need
 to know for which pollset this is.

That would be really nice. What I'd need is this:

int removeFromPollset(long socket)

where the return value is either -ve for an error code or +ve for the
current flags.

Looking at the code, by the time I have finished the other changes the
change above would be a nice to have but not essential.

One of the changes that will help (Remy already did this in his fork) is
to move from:
1 pollset - 1 poller, 1 endpoint - multiple pollers
to:
1 endpoint - 1 poller, multiple pollsets - 1 poller

This is next on my todo list.

Mark


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



[RESULT] [VOTE] Release Apache Tomcat 7.0.35

2013-01-16 Thread Mark Thomas
Votes were as follows:

+1 (binding): kkolinko, rjung, yoavs, olamy, markt

No other votes were cast.

The vote therefore passes.

I'll publish the binaries and announce later today once the mirrors have
caught up.

Mark

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



svn commit: r1248 - /dev/tomcat/tomcat-7/v7.0.35/ /release/tomcat/tomcat-7/v7.0.35/

2013-01-16 Thread markt
Author: markt
Date: Wed Jan 16 09:42:49 2013
New Revision: 1248

Log:
Release 7.0.35

Added:
release/tomcat/tomcat-7/v7.0.35/
  - copied from r1247, dev/tomcat/tomcat-7/v7.0.35/
Removed:
dev/tomcat/tomcat-7/v7.0.35/


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



svn commit: r1248 - /dev/tomcat/tomcat-7/v7.0.35/ /release/tomcat/tomcat-7/v7.0.35/

2013-01-16 Thread markt
Author: markt
Date: Wed Jan 16 09:42:49 2013
New Revision: 1248

Log:
Release 7.0.35

Added:
release/tomcat/tomcat-7/v7.0.35/
  - copied from r1247, dev/tomcat/tomcat-7/v7.0.35/
Removed:
dev/tomcat/tomcat-7/v7.0.35/


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



Re: APR, WebSocket and Servlet 3.1 NIO refactoring

2013-01-16 Thread Remy Maucherat
On Wed, 2013-01-16 at 07:50 +0100, Mladen Turk wrote:
 On 01/15/2013 02:29 PM, Mark Thomas wrote:
  Hi,
 
  3. Currently, we have no record of which Poller a socket is registered
  with. This makes 2) more expensive as we have to iterate through the
  Pollers to find the socket. Tracking the current poller used by a socket
  would make 2) a cheaper operation.
 
 Think this can be done with relative ease.
 I recently made some changes to native pollset performance
 (removing multiple linear scans for sockets if they are in the pollset)
 which can reference the pollset with socket.
 
 In theory this allows to remove the socket from 'any' pollset which
 means that you can remove the socket from pollset without knowing to
 which one it belongs.
 
 If there is a need for reconfigure (different signaling events)
 we can add an extra API call that would allow that, without the need
 to know for which pollset this is.

Yes, remove [and add as well, but hopefully this was never a big issue]
performance is essential, because write events mean more events, and
flags also need to be updated. So a lot more operations overall.

Rémy



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



Re: APR, WebSocket and Servlet 3.1 NIO refactoring

2013-01-16 Thread Remy Maucherat
On Wed, 2013-01-16 at 09:35 +, Mark Thomas wrote:
 That would be really nice. What I'd need is this:
 
 int removeFromPollset(long socket)
 
 where the return value is either -ve for an error code or +ve for the
 current flags.
 
 Looking at the code, by the time I have finished the other changes the
 change above would be a nice to have but not essential.
 
 One of the changes that will help (Remy already did this in his fork) is
 to move from:
 1 pollset - 1 poller, 1 endpoint - multiple pollers
 to:
 1 endpoint - 1 poller, multiple pollsets - 1 poller
 
 This is next on my todo list.

Using multiple pollsets is only needed on some platforms (Windows ...),
and it is possible it is not supposed to be mandatory now (Windows
should be able to handle large pollsets now). So if you accept to drop
support for running production on older things (ex: XP), it can be
simplified. To be confirmed though ;)

Rémy



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



Re: APR, WebSocket and Servlet 3.1 NIO refactoring

2013-01-16 Thread Mark Thomas
On 16/01/2013 10:43, Remy Maucherat wrote:
 On Wed, 2013-01-16 at 09:35 +, Mark Thomas wrote:
 That would be really nice. What I'd need is this:

 int removeFromPollset(long socket)

 where the return value is either -ve for an error code or +ve for the
 current flags.

 Looking at the code, by the time I have finished the other changes the
 change above would be a nice to have but not essential.

 One of the changes that will help (Remy already did this in his fork) is
 to move from:
 1 pollset - 1 poller, 1 endpoint - multiple pollers
 to:
 1 endpoint - 1 poller, multiple pollsets - 1 poller

 This is next on my todo list.
 
 Using multiple pollsets is only needed on some platforms (Windows ...),
 and it is possible it is not supposed to be mandatory now (Windows
 should be able to handle large pollsets now). So if you accept to drop
 support for running production on older things (ex: XP), it can be
 simplified. To be confirmed though ;)

Tempting...

XP is still my primary development environment and only this week I
found the solution to the hardware compatibility issue that was stopping
me upgrading.

If XP has an issue (which doesn't surprise me at all) then I suspect
Server 2003 will have the same problem. That is supported until (at
least) July 2015 so I think dropping support (as much as I like deleting
code) is a little premature.

Mark


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



Re: APR, WebSocket and Servlet 3.1 NIO refactoring

2013-01-16 Thread Remy Maucherat
On Wed, 2013-01-16 at 11:43 +, Mark Thomas wrote:
  Using multiple pollsets is only needed on some platforms (Windows ...),
  and it is possible it is not supposed to be mandatory now (Windows
  should be able to handle large pollsets now). So if you accept to drop
  support for running production on older things (ex: XP), it can be
  simplified. To be confirmed though ;)
 
 Tempting...
 
 XP is still my primary development environment and only this week I
 found the solution to the hardware compatibility issue that was stopping
 me upgrading.
 
 If XP has an issue (which doesn't surprise me at all) then I suspect
 Server 2003 will have the same problem. That is supported until (at
 least) July 2015 so I think dropping support (as much as I like deleting
 code) is a little premature.

It is not really a bug: only the newer Windows (Vista+) have efficient
polling. With previous versions, small pollsets have to be used because
(apparently) it can only poll over 64 sockets at a time. If the size is
over 1000, there is a big performance impact. It is supposed to be
handled well in APR (using the new APIs if available).

Source: Mladen some time ago. Hopefully, I understood everything
correctly ;)

Rémy



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



Re: APR, WebSocket and Servlet 3.1 NIO refactoring

2013-01-16 Thread Mark Thomas
On 16/01/2013 12:05, Remy Maucherat wrote:
 On Wed, 2013-01-16 at 11:43 +, Mark Thomas wrote:
 Using multiple pollsets is only needed on some platforms (Windows ...),
 and it is possible it is not supposed to be mandatory now (Windows
 should be able to handle large pollsets now). So if you accept to drop
 support for running production on older things (ex: XP), it can be
 simplified. To be confirmed though ;)

 Tempting...

 XP is still my primary development environment and only this week I
 found the solution to the hardware compatibility issue that was stopping
 me upgrading.

 If XP has an issue (which doesn't surprise me at all) then I suspect
 Server 2003 will have the same problem. That is supported until (at
 least) July 2015 so I think dropping support (as much as I like deleting
 code) is a little premature.
 
 It is not really a bug: only the newer Windows (Vista+) have efficient
 polling. With previous versions, small pollsets have to be used because
 (apparently) it can only poll over 64 sockets at a time. If the size is
 over 1000, there is a big performance impact. It is supposed to be
 handled well in APR (using the new APIs if available).
 
 Source: Mladen some time ago. Hopefully, I understood everything
 correctly ;)

It looks like lifting your new Poller implementation (and associated
supporting classes) will be the quickest way forward at this point. Am I
correct in assuming you are happy for me to do that?

Cheers,

Mark

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



svn commit: r1433908 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

2013-01-16 Thread markt
Author: markt
Date: Wed Jan 16 12:10:35 2013
New Revision: 1433908

URL: http://svn.apache.org/viewvc?rev=1433908view=rev
Log:
Trivial comment corrections

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1433908r1=1433907r2=1433908view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Wed Jan 16 
12:10:35 2013
@@ -1125,8 +1125,6 @@ public class AprEndpoint extends Abstrac
 public static final int FLAGS_READ = Poll.APR_POLLIN;
 public static final int FLAGS_WRITE  = Poll.APR_POLLOUT;
 
-// Need two pollsets since the socketTimeout and the keep-alive timeout
-// can have different values.
 private long connectionPollset = 0;
 private long pool = 0;
 private long[] desc;
@@ -1328,7 +1326,7 @@ public class AprEndpoint extends Abstrac
 continue;
 }
 
-// Check timeouts (much less frequently that polling)
+// Check timeouts (much less frequently than polling)
 if (maintainTime  100L  running) {
 maintainTime = 0;
 if (socketProperties.getSoTimeout()  0) {



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



Re: APR, WebSocket and Servlet 3.1 NIO refactoring

2013-01-16 Thread Mladen Turk

On 01/16/2013 01:05 PM, Remy Maucherat wrote:

On Wed, 2013-01-16 at 11:43 +, Mark Thomas wrote:

It is not really a bug: only the newer Windows (Vista+) have efficient
polling. With previous versions, small pollsets have to be used because
(apparently) it can only poll over 64 sockets at a time. If the size is
over 1000, there is a big performance impact. It is supposed to be
handled well in APR (using the new APIs if available).

Source: Mladen some time ago. Hopefully, I understood everything
correctly ;)



Yeah, correct.
Since Vista (2003R2) MS has added a WSAPoll to winsock API
which allows unlimited number of sockets (I tested that with 12K sockets)
Before that select call has to be used, which is limited by a
#define FD_SIZE 1024 at compile time.
Meaning  1024 sockets per poller. Beyond that point it's just unusable.

Contemporary APR's have code which does automatic winsock API detection,
so 1000 sockets/pollset is not a limit if running on post XP boxes.

I think we even try to create 5000 socket pollset and if it fails
we create 5 pollsets with 1000 sockets. If support for XP is needed
I'm afraid we'll have to have that dual implementation.


Regards
--
^TM

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



Re: APR, WebSocket and Servlet 3.1 NIO refactoring

2013-01-16 Thread Remy Maucherat
On Wed, 2013-01-16 at 12:08 +, Mark Thomas wrote:
  It is not really a bug: only the newer Windows (Vista+) have efficient
  polling. With previous versions, small pollsets have to be used because
  (apparently) it can only poll over 64 sockets at a time. If the size is
  over 1000, there is a big performance impact. It is supposed to be
  handled well in APR (using the new APIs if available).
  
  Source: Mladen some time ago. Hopefully, I understood everything
  correctly ;)
 
 It looks like lifting your new Poller implementation (and associated
 supporting classes) will be the quickest way forward at this point. Am I
 correct in assuming you are happy for me to do that?

Yes, I think you should use that poller code (at least a little bit),
it's rather tricky.

Rémy



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



Re: APR, WebSocket and Servlet 3.1 NIO refactoring

2013-01-16 Thread Mark Thomas
On 16/01/2013 13:19, Remy Maucherat wrote:
 On Wed, 2013-01-16 at 12:08 +, Mark Thomas wrote:
 It is not really a bug: only the newer Windows (Vista+) have efficient
 polling. With previous versions, small pollsets have to be used because
 (apparently) it can only poll over 64 sockets at a time. If the size is
 over 1000, there is a big performance impact. It is supposed to be
 handled well in APR (using the new APIs if available).

 Source: Mladen some time ago. Hopefully, I understood everything
 correctly ;)

 It looks like lifting your new Poller implementation (and associated
 supporting classes) will be the quickest way forward at this point. Am I
 correct in assuming you are happy for me to do that?
 
 Yes, I think you should use that poller code (at least a little bit),
 it's rather tricky.

Thanks. Looking at it now.

Mark


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



svn commit: r1433928 - /tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties

2013-01-16 Thread markt
Author: markt
Date: Wed Jan 16 13:26:40 2013
New Revision: 1433928

URL: http://svn.apache.org/viewvc?rev=1433928view=rev
Log:
Re-order

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties?rev=1433928r1=1433927r2=1433928view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties 
Wed Jan 16 13:26:40 2013
@@ -14,10 +14,16 @@
 # limitations under the License.
 
 # net resources
+endpoint.err.close=Caught exception trying to close socket
 endpoint.err.handshake=Handshake failed
 endpoint.err.unexpected=Unexpected error processing socket
+endpoint.warn.noExector=Failed to process socket [{0}] in state [{1}] because 
the executor had already been shutdown
+endpoint.warn.noHonorCipherOrder='Honor cipher order' option is not supported 
by the SSL library {0}
+endpoint.warn.noInsecureReneg=Secure re-negotiation is not supported by the 
SSL library {0}
+endpoint.warn.unlockAcceptorFailed=Acceptor thread [{0}] failed to unlock. 
Forcing hard socket shutdown.
+endpoint.debug.channelCloseFail=Failed to close channel
+endpoint.debug.socketCloseFail=Failed to close socket
 endpoint.debug.unlock=Caught exception trying to unlock accept on port {0}
-endpoint.err.close=Caught exception trying to close socket
 endpoint.init.bind=Socket bind failed: [{0}] {1}
 endpoint.init.listen=Socket listen failed: [{0}] {1}
 endpoint.init.notavail=APR not available
@@ -30,12 +36,6 @@ endpoint.poll.error=Unexpected poller er
 endpoint.process.fail=Error allocating socket processor
 endpoint.sendfile.error=Unexpected sendfile error
 endpoint.sendfile.addfail=Sendfile failure: [{0}] {1}
-endpoint.warn.noInsecureReneg=Secure re-negotiation is not supported by the 
SSL library {0}
-endpoint.warn.unlockAcceptorFailed=Acceptor thread [{0}] failed to unlock. 
Forcing hard socket shutdown.
-endpoint.warn.noHonorCipherOrder='Honor cipher order' option is not supported 
by the SSL library {0}
-endpoint.debug.channelCloseFail=Failed to close channel
-endpoint.debug.socketCloseFail=Failed to close socket
 endpoint.apr.noSslCertFile=Connector attribute SSLCertificateFile must be 
defined when using SSL with APR
 endpoint.apr.invalidSslProtocol=An invalid value [{0}] was provided for the 
SSLProtocol attribute
 endpoint.nio.selectorCloseFail=Failed to close selector when closing the poller
-endpoint.warn.noExector=Failed to process socket [{0}] in state [{1}] because 
the executor had already been shutdown



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



Re: svn commit: r1433976 - in /tomcat/trunk/java/org/apache: coyote/ajp/AjpAprProtocol.java coyote/http11/Http11AprProtocol.java tomcat/util/net/AprEndpoint.java tomcat/util/net/res/LocalStrings.prope

2013-01-16 Thread Remy Maucherat
On Wed, 2013-01-16 at 15:14 +, ma...@apache.org wrote:
 This is untested (I don't have an OSX build of the native lib handy right 
 now). I'll test later today.

I'm not sure native on OS X is 100% stable, for whatever reason (due to
apparent concurrency issues with the poller once read + write polling is
used). It could depend on the APR / Tomcat Native version used and be
fixed now, but certainly there were issues on OS X that didn't occur on
Linux (or Windows, ...) at the time. I didn't test or investigate
myself, so I don't know more than that, good luck with the testing.

Rémy



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



Re: svn commit: r1433976 - in /tomcat/trunk/java/org/apache: coyote/ajp/AjpAprProtocol.java coyote/http11/Http11AprProtocol.java tomcat/util/net/AprEndpoint.java tomcat/util/net/res/LocalStrings.prope

2013-01-16 Thread jean-frederic clere

On 01/16/2013 04:53 PM, Remy Maucherat wrote:

On Wed, 2013-01-16 at 15:14 +, ma...@apache.org wrote:

This is untested (I don't have an OSX build of the native lib handy right now). 
I'll test later today.


I'm not sure native on OS X is 100% stable, for whatever reason (due to
apparent concurrency issues with the poller once read + write polling is
used). It could depend on the APR / Tomcat Native version used and be
fixed now,


I plan to test later too, with apr 1.4.6, openssl 1.0.1c  and 
tc-native-1.1.x.


Cheers

Jean-Frederic

 but certainly there were issues on OS X that didn't occur on

Linux (or Windows, ...) at the time. I didn't test or investigate
myself, so I don't know more than that, good luck with the testing.

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



Re: svn commit: r1433976 - in /tomcat/trunk/java/org/apache: coyote/ajp/AjpAprProtocol.java coyote/http11/Http11AprProtocol.java tomcat/util/net/AprEndpoint.java tomcat/util/net/res/LocalStrings.prope

2013-01-16 Thread Mark Thomas
On 16/01/2013 16:12, jean-frederic clere wrote:
 On 01/16/2013 04:53 PM, Remy Maucherat wrote:
 On Wed, 2013-01-16 at 15:14 +, ma...@apache.org wrote:
 This is untested (I don't have an OSX build of the native lib handy
 right now). I'll test later today.

 I'm not sure native on OS X is 100% stable, for whatever reason (due to
 apparent concurrency issues with the poller once read + write polling is
 used). It could depend on the APR / Tomcat Native version used and be
 fixed now,
 
 I plan to test later too, with apr 1.4.6, openssl 1.0.1c  and
 tc-native-1.1.x.

I meant that I'd test on Windows later :)

Once we have a 1.1.25 build I'll see if I can find some time to test on OSX.

Mark


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



svn commit: r1434050 - /tomcat/maven-plugin/trunk/pom.xml

2013-01-16 Thread olamy
Author: olamy
Date: Wed Jan 16 17:17:23 2013
New Revision: 1434050

URL: http://svn.apache.org/viewvc?rev=1434050view=rev
Log:
use tomcat 7.0.35 artifacts

Modified:
tomcat/maven-plugin/trunk/pom.xml

Modified: tomcat/maven-plugin/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/pom.xml?rev=1434050r1=1434049r2=1434050view=diff
==
--- tomcat/maven-plugin/trunk/pom.xml (original)
+++ tomcat/maven-plugin/trunk/pom.xml Wed Jan 16 17:17:23 2013
@@ -72,7 +72,7 @@
 its.ajp.port2001/its.ajp.port
 !-- server port for it tests --
 its.server.port2008/its.server.port
-tomcat7Version7.0.34/tomcat7Version
+tomcat7Version7.0.35/tomcat7Version
 
 !-- to prevent isssues with last apache parent pom --
 arguments /



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



svn commit: r1434051 - /tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml

2013-01-16 Thread olamy
Author: olamy
Date: Wed Jan 16 17:17:42 2013
New Revision: 1434051

URL: http://svn.apache.org/viewvc?rev=1434051view=rev
Log:
use last cxf 2.6.5 in archetype

Modified:

tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml

Modified: 
tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml?rev=1434051r1=1434050r2=1434051view=diff
==
--- 
tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml
 (original)
+++ 
tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml
 Wed Jan 16 17:17:42 2013
@@ -150,7 +150,7 @@
   dependency
 groupIdorg.apache.cxf/groupId
 artifactIdcxf-bundle-jaxrs/artifactId
-version2.6.4/version
+version2.6.5/version
 exclusions
   exclusion
 groupIdorg.eclipse.jetty/groupId



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



[jira] [Commented] (MTOMCAT-46) Plugins tomcat:run and tomcat:run-war are not loading the Provided and Runtime dependencies.

2013-01-16 Thread Ludwig Magnusson (JIRA)

[ 
https://issues.apache.org/jira/browse/MTOMCAT-46?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13555387#comment-13555387
 ] 

Ludwig Magnusson commented on MTOMCAT-46:
-

I encountered this error as well when I had a multi module project and my war 
project had a runtime dependency to another module. The dependency was not 
included when executing tomcat:run which it should be, they are included in the 
packaging right? Although I agree that provided scope dependencies should not 
be included.


 Plugins tomcat:run and tomcat:run-war are not loading the Provided and 
 Runtime dependencies.
 

 Key: MTOMCAT-46
 URL: https://issues.apache.org/jira/browse/MTOMCAT-46
 Project: Apache Tomcat Maven Plugin
  Issue Type: Improvement
Affects Versions: 1.0-beta-1
Reporter: Bernardo Gomez Palacio
  Labels: notabug

 User Story: Developers checkout a Web Application from our SCM 
 Repository(SVN) and through the tomcat:run (or tomcat:run-war) plugin can 
 bootstrap and start a Tomcat Server and test the Web Application locally 
 without even having Tomcat instances previously deployed either locally or 
 remotely.
 To fulfill such User Story I started with the tomcat:run plugin but had 
 issues with the Provided and Runtime dependencies. I then jumped to the 
 tomcat:run-war using my own tomcat configuration files but had similar 
 issues. I see that the tomcat:run-war plugin doesn't create a ClassLoader for 
 the Catalina container in a similar way Tomcat's Bootstrap class does. I 
 downloaded the code of the tomcat plugin and I am working in the fix but I 
 need to share some thoughts about this... 
 Approach A) Use a similar schema as the Tomcat Bootstrap in the Run*Mojos, 
 let the developer provide those dependencies through the 
 dependency:copy-dependencies to lets say target/tomcat/lib and load them from 
 there. So the User controls what is deployed in lib.
 Approach B) Use a similar schema as the Tomcat Bootstrap in the Run*Mojos, 
 the dependencies will be fetched using the dependencies defined in the 
 pom.xml file (including transitive dependency resolution) and added to the 
 ClassLoader.
 Thoughts and ideas are welcomed.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[Bug 54437] New: Update PoolProperties javadoc for ConnectState interceptor-managed defaults

2013-01-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54437

Bug ID: 54437
   Summary: Update PoolProperties javadoc for ConnectState
interceptor-managed defaults
   Product: Tomcat Modules
   Version: unspecified
  Hardware: All
OS: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: jdbc-pool
  Assignee: dev@tomcat.apache.org
  Reporter: asf.bugzi...@chris.pimlott.net
Classification: Unclassified

Certain PoolProperties defaults are normally only set on connection creation,
not on connection reuse, unless the ConnectionState interceptor is also
explicitly configured (it's not by default).  The necessity of this second step
is easy to overlook.  It would be nice if the javadoc for these settings
(defaultAutoCommit, defaultTransactionIsolation, defaultReadOnly,
defaultCatalog) pointed out this behavior and made a mention to the
ConnectionState interceptor.

-- 
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



[Bug 54437] Update PoolProperties javadoc for ConnectState interceptor-managed defaults

2013-01-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54437

--- Comment #1 from Chris Pimlott asf.bugzi...@chris.pimlott.net ---
There's an existing example in removeAbandonedTimeout setter/getter, which
reference the ResetAbandonedTimer interceptor.

-- 
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



[jira] [Commented] (MTOMCAT-200) Tomcat7:redeploy

2013-01-16 Thread Glen Mazza (JIRA)

[ 
https://issues.apache.org/jira/browse/MTOMCAT-200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13555430#comment-13555430
 ] 

Glen Mazza commented on MTOMCAT-200:


I think this can be Resolved/Fixed -- it is already in 2.1-SNAPSHOT.

 Tomcat7:redeploy
 

 Key: MTOMCAT-200
 URL: https://issues.apache.org/jira/browse/MTOMCAT-200
 Project: Apache Tomcat Maven Plugin
  Issue Type: Improvement
  Components: tomcat7
Affects Versions: 2.0
 Environment: Macos
Reporter: Ed Pichler
Assignee: Olivier Lamy (*$^¨%`£)
 Fix For: 2.1

   Original Estimate: 504h
  Remaining Estimate: 504h

 Please, add support for tomcat7:redeploy function.
 This is crucial to we put our continuous delivery environment functional.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Closed] (MTOMCAT-200) Tomcat7:redeploy

2013-01-16 Thread *$^¨%`£

 [ 
https://issues.apache.org/jira/browse/MTOMCAT-200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Olivier Lamy (*$^¨%`£) closed MTOMCAT-200.
--

Resolution: Fixed

 Tomcat7:redeploy
 

 Key: MTOMCAT-200
 URL: https://issues.apache.org/jira/browse/MTOMCAT-200
 Project: Apache Tomcat Maven Plugin
  Issue Type: Improvement
  Components: tomcat7
Affects Versions: 2.0
 Environment: Macos
Reporter: Ed Pichler
Assignee: Olivier Lamy (*$^¨%`£)
 Fix For: 2.1

   Original Estimate: 504h
  Remaining Estimate: 504h

 Please, add support for tomcat7:redeploy function.
 This is crucial to we put our continuous delivery environment functional.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



svn commit: r1434380 - in /tomcat/site/trunk/docs/tomcat-7.0-doc: ./ api/ api/org/apache/catalina/ api/org/apache/catalina/ant/ api/org/apache/catalina/ant/jmx/ api/org/apache/catalina/authenticator/

2013-01-16 Thread markt
Author: markt
Date: Wed Jan 16 20:48:07 2013
New Revision: 1434380

URL: http://svn.apache.org/viewvc?rev=1434380view=rev
Log:
Update docs for 7.0.35


[This commit notification would consist of 58 parts, 
which exceeds the limit of 50 ones, so it was shortened to the summary.]

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



svn commit: r1434385 - in /tomcat/site/trunk: ./ docs/ xdocs/

2013-01-16 Thread markt
Author: markt
Date: Wed Jan 16 20:53:54 2013
New Revision: 1434385

URL: http://svn.apache.org/viewvc?rev=1434385view=rev
Log:
Update site for 7.0.35 release.

Modified:
tomcat/site/trunk/build.properties.default
tomcat/site/trunk/docs/doap_Tomcat.rdf
tomcat/site/trunk/docs/download-70.html
tomcat/site/trunk/docs/index.html
tomcat/site/trunk/docs/migration-7.html
tomcat/site/trunk/docs/oldnews.html
tomcat/site/trunk/docs/whichversion.html
tomcat/site/trunk/xdocs/doap_Tomcat.rdf
tomcat/site/trunk/xdocs/download-70.xml
tomcat/site/trunk/xdocs/index.xml
tomcat/site/trunk/xdocs/migration-7.xml
tomcat/site/trunk/xdocs/oldnews.xml
tomcat/site/trunk/xdocs/whichversion.xml

Modified: tomcat/site/trunk/build.properties.default
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/build.properties.default?rev=1434385r1=1434384r2=1434385view=diff
==
--- tomcat/site/trunk/build.properties.default (original)
+++ tomcat/site/trunk/build.properties.default Wed Jan 16 20:53:54 2013
@@ -37,7 +37,7 @@ tomcat.loc=http://www.apache.org/dist/to
 
 # - Tomcat versions -
 tomcat60=6.0.36
-tomcat70=7.0.34
+tomcat70=7.0.35
 
 
 # - Download destination -

Modified: tomcat/site/trunk/docs/doap_Tomcat.rdf
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/doap_Tomcat.rdf?rev=1434385r1=1434384r2=1434385view=diff
==
--- tomcat/site/trunk/docs/doap_Tomcat.rdf (original)
+++ tomcat/site/trunk/docs/doap_Tomcat.rdf Wed Jan 16 20:53:54 2013
@@ -57,8 +57,8 @@
 release
   Version
 nameLatest Stable 7.0.x Release/name
-created2012-12-12/created
-revision7.0.34/revision
+created2013-01-16/created
+revision7.0.35/revision
   /Version
 /release
 release

Modified: tomcat/site/trunk/docs/download-70.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-70.html?rev=1434385r1=1434384r2=1434385view=diff
==
--- tomcat/site/trunk/docs/download-70.html (original)
+++ tomcat/site/trunk/docs/download-70.html Wed Jan 16 20:53:54 2013
@@ -212,8 +212,8 @@
 blockquote
 
 a href=http://www.apache.org/dist/tomcat/tomcat-7/KEYS;KEYS/a |
-a href=#7.0.347.0.34/a |
-a href=[preferred]tomcat/tomcat-7/v7.0.34 rel=nofollowBrowse/a 
|
+a href=#7.0.357.0.35/a |
+a href=[preferred]tomcat/tomcat-7/v7.0.35 rel=nofollowBrowse/a 
|
 a href=http://archive.apache.org/dist/tomcat/tomcat-7;Archives/a
   
 /blockquote
@@ -301,7 +301,7 @@
 /table
 table border=0 cellspacing=0 cellpadding=2 width=100%
 tr
-td bgcolor=#525D76font color=#ff face=arial,helvetica,sanserifa 
name=7.0.34strong7.0.34/strong/a/font/td
+td bgcolor=#525D76font color=#ff face=arial,helvetica,sanserifa 
name=7.0.35strong7.0.35/strong/a/font/td
 /tr
 tr
 td
@@ -310,8 +310,8 @@
   
 p
   
-a name=7.0.34Please/a see the 
-  a href=[preferred]tomcat/tomcat-7/v7.0.34/README.html 
rel=nofollowREADME/a
+a name=7.0.35Please/a see the 
+  a href=[preferred]tomcat/tomcat-7/v7.0.35/README.html 
rel=nofollowREADME/a
   file for packaging information.  It explains what every distribution 
contains.
   /p
 
@@ -332,44 +332,44 @@
   
 li
 
-a href=[preferred]tomcat/tomcat-7/v7.0.34/bin/apache-tomcat-7.0.34.zip 
rel=nofollowzip/a 
-(a 
href=http://www.apache.org/dist/tomcat/tomcat-7/v7.0.34/bin/apache-tomcat-7.0.34.zip.asc;pgp/a,
 
-a 
href=http://www.apache.org/dist/tomcat/tomcat-7/v7.0.34/bin/apache-tomcat-7.0.34.zip.md5;md5/a)
+a href=[preferred]tomcat/tomcat-7/v7.0.35/bin/apache-tomcat-7.0.35.zip 
rel=nofollowzip/a 
+(a 
href=http://www.apache.org/dist/tomcat/tomcat-7/v7.0.35/bin/apache-tomcat-7.0.35.zip.asc;pgp/a,
 
+a 
href=http://www.apache.org/dist/tomcat/tomcat-7/v7.0.35/bin/apache-tomcat-7.0.35.zip.md5;md5/a)
   /li
   
 li
 
-a href=[preferred]tomcat/tomcat-7/v7.0.34/bin/apache-tomcat-7.0.34.tar.gz 
rel=nofollowtar.gz/a 
-(a 
href=http://www.apache.org/dist/tomcat/tomcat-7/v7.0.34/bin/apache-tomcat-7.0.34.tar.gz.asc;pgp/a,
 
-a 
href=http://www.apache.org/dist/tomcat/tomcat-7/v7.0.34/bin/apache-tomcat-7.0.34.tar.gz.md5;md5/a)
+a href=[preferred]tomcat/tomcat-7/v7.0.35/bin/apache-tomcat-7.0.35.tar.gz 
rel=nofollowtar.gz/a 
+(a 
href=http://www.apache.org/dist/tomcat/tomcat-7/v7.0.35/bin/apache-tomcat-7.0.35.tar.gz.asc;pgp/a,
 
+a 
href=http://www.apache.org/dist/tomcat/tomcat-7/v7.0.35/bin/apache-tomcat-7.0.35.tar.gz.md5;md5/a)
   /li
   
 li
 
-a 
href=[preferred]tomcat/tomcat-7/v7.0.34/bin/apache-tomcat-7.0.34-windows-x86.zip
 rel=nofollow32-bit Windows zip/a 
-(a 

[ANN] Apache Tomcat 7.0.35 released

2013-01-16 Thread Mark Thomas
The Apache Tomcat team announces the immediate availability of Apache
Tomcat 7.0.35.
Apache Tomcat is an open source software implementation of the Java
Servlet and JavaServer Pages technologies.

This release contains a small number of bug fixes and improvements
compared to version 7.0.34. The notable changes include:
- Integrate documentation of Tomcat 7 with Apache Comments System.
  People can leave their comments when reading the documentation online.
- Improve detection of JAVA_HOME on OSX.
- Add support for auto-detection and configuration of JARs on the
  classpath that provide tag plug-in implementations. Based on a patch
  by Sheldon Shao.

Please refer to the change log for the complete list of changes:
http://tomcat.apache.org/tomcat-7.0-doc/changelog.html

Note: This version has 4 zip binaries: a generic one and three
  bundled with Tomcat native binaries for Windows operating systems
  running on different CPU architectures.

Note: If you use the APR/native AJP or HTTP connector you *must* upgrade
  to version 1.1.24 or later of the AJP/native library

Downloads:
http://tomcat.apache.org/download-70.cgi

Migration guides from Apache Tomcat 5.5.x and 6.0.x:
http://tomcat.apache.org/migration.html

Thank you,

-- The Apache Tomcat Team

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



svn commit: r1434403 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

2013-01-16 Thread markt
Author: markt
Date: Wed Jan 16 21:12:20 2013
New Revision: 1434403

URL: http://svn.apache.org/viewvc?rev=1434403view=rev
Log:
Ensure sockets are always destroyed via destroySocket(). A single place
for actions on socket destroy will make later changes simpler.

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1434403r1=1434402r2=1434403view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Wed Jan 16 
21:12:20 2013
@@ -1391,7 +1391,7 @@ public class AprEndpoint extends Abstrac
 while (info != null) {
 if (!event || (event  !processSocket(
 info.socket, SocketStatus.STOP))) {
-Socket.destroy(info.socket);
+destroySocket(info.socket);
 }
 info = addList.get();
 }
@@ -1403,7 +1403,7 @@ public class AprEndpoint extends Abstrac
 for (int n = 0; n  rv; n++) {
 if (!event || (event  !processSocket(
 desc[n*2+1], SocketStatus.STOP))) {
-Socket.destroy(desc[n*2+1]);
+destroySocket(desc[n*2+1]);
 }
 }
 }
@@ -1442,7 +1442,7 @@ public class AprEndpoint extends Abstrac
 // Can't do anything: close the socket right away
 if (!event || (event  !processSocket(
 socket, SocketStatus.ERROR))) {
-Socket.destroy(socket);
+destroySocket(socket);
 }
 }
 }
@@ -1484,7 +1484,7 @@ public class AprEndpoint extends Abstrac
 // Can't do anything: close the socket right away
 if (!event || (event  !processSocket(
 socket, SocketStatus.ERROR))) {
-Socket.destroy(socket);
+destroySocket(socket);
 }
 }
 }
@@ -1543,7 +1543,7 @@ public class AprEndpoint extends Abstrac
 removeFromPoller(socket);
 if (!event || (event  !processSocket(
 socket, SocketStatus.TIMEOUT))) {
-Socket.destroy(socket);
+destroySocket(socket);
 }
 socket = timeouts.check(date);
 }
@@ -1631,7 +1631,7 @@ public class AprEndpoint extends Abstrac
 // away
 if (!event || (event  !processSocket(
 info.socket, SocketStatus.ERROR))) 
{
-Socket.destroy(info.socket);
+destroySocket(info.socket);
 }
 } else {
 timeouts.add(info.socket,
@@ -1641,7 +1641,7 @@ public class AprEndpoint extends Abstrac
 } else {
 // Should never happen.
 timeouts.remove(info.socket);
-Socket.destroy(info.socket);
+destroySocket(info.socket);
 getLog().warn(sm.getString(
 endpoint.apr.pollAddInvalid, info));
 }
@@ -1674,17 +1674,17 @@ public class AprEndpoint extends Abstrac
 || ((desc[n*2]  
Poll.APR_POLLNVAL) == Poll.APR_POLLNVAL)) {
 if (!processSocket(desc[n*2+1], 
SocketStatus.ERROR)) {
 // Close socket and clear pool
-Socket.destroy(desc[n*2+1]);
+destroySocket(desc[n*2+1]);
 }
 } else if ((desc[n*2]  Poll.APR_POLLIN) 
== Poll.APR_POLLIN) {
 if (!processSocket(desc[n*2+1], 
SocketStatus.OPEN_READ)) {
 // Close socket and clear pool
-Socket.destroy(desc[n*2+1]);
+destroySocket(desc[n*2+1]);
 }
 } else if ((desc[n*2]  Poll.APR_POLLOUT) 
== Poll.APR_POLLOUT) {
 if (!processSocket(desc[n*2+1], 

[Bug 54438] New: Bug fix 52953 introduces NullPointerException in RealBase.java line 409 when user not found in JDBC

2013-01-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54438

Bug ID: 54438
   Summary: Bug fix 52953 introduces NullPointerException in
RealBase.java line 409 when user not found in JDBC
   Product: Tomcat 7
   Version: 7.0.27
  Hardware: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: br...@iris.washington.edu
Classification: Unclassified

The fix to bug 52953 introduces a NullPointerException at line 409
in RealBase.java

For example compare:
http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_26/java/org/apache/catalina/realm/RealmBase.java

and 
http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_27/java/org/apache/catalina/realm/RealmBase.java


String md5a1 = getDigest(username, realm);
was changed to
String md5a1 = getDigest(username, realm).toLowerCase(Locale.ENGLISH);

If getDigest(username,realm) returns null if the user is not found
and as a result you get a NPE when toLowerCase() is invoked on the null.

I looked in the trunk, and the code hasn't changed.

Seems like there should already be a bug posted on this as it makes digest
authentication useless, but I can't find one!

-- 
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



[Bug 54438] Bug fix 52953 introduces NullPointerException in RealBase.java line 409 when user not found in JDBC

2013-01-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54438

bruce weertman br...@iris.washington.edu changed:

   What|Removed |Added

 OS||All

--- Comment #1 from bruce weertman br...@iris.washington.edu ---
There's also an issue with logging and this bug as the NullPointerException
is not logged in any of the standard log file (catalina.out etc).

For example, this is what is returned in a web browser, but no mention of this 
is found in any of the log files.

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error that prevented it from
fulfilling this request.

exception

java.lang.NullPointerException
org.apache.catalina.realm.RealmBase.authenticate(RealmBase.java:409)
   
org.apache.catalina.realm.CombinedRealm.authenticate(CombinedRealm.java:111)
org.apache.catalina.realm.LockOutRealm.authenticate(LockOutRealm.java:150)
   
org.apache.catalina.authenticator.DigestAuthenticator$DigestInfo.authenticate(DigestAuthenticator.java:720)
   
org.apache.catalina.authenticator.DigestAuthenticator.authenticate(DigestAuthenticator.java:294)
   
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:544)
   
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
   
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
   
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
   
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
   
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
java.lang.Thread.run(Thread.java:680)
note The full stack trace of the root cause is available in the Apache
Tomcat/7.0.34 logs.

-- 
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



[Bug 54438] Bug fix 52953 introduces NullPointerException in RealBase.java line 409 when user not found in JDBC

2013-01-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54438

bruce weertman br...@iris.washington.edu changed:

   What|Removed |Added

 CC||br...@iris.washington.edu

-- 
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



svn commit: r1434428 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

2013-01-16 Thread markt
Author: markt
Date: Wed Jan 16 21:52:58 2013
New Revision: 1434428

URL: http://svn.apache.org/viewvc?rev=1434428view=rev
Log:
APR/native refactoring
- Remove SocketEventProcessor
- Align code with JIO connector (with a view to further refactoring)

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1434428r1=1434427r2=1434428view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Wed Jan 16 
21:52:58 2013
@@ -825,7 +825,7 @@ public class AprEndpoint extends Abstrac
  * Process given socket. Called in non-comet mode, typically keep alive
  * or upgraded protocol.
  */
-protected boolean processSocket(long socket) {
+public boolean processSocket(long socket, SocketStatus status) {
 try {
 Executor executor = getExecutor();
 if (executor == null) {
@@ -834,7 +834,7 @@ public class AprEndpoint extends Abstrac
 } else {
 SocketWrapperLong wrapper =
 new SocketWrapper(Long.valueOf(socket));
-executor.execute(new SocketProcessor(wrapper, null));
+executor.execute(new SocketProcessor(wrapper, status));
 }
 } catch (RejectedExecutionException x) {
 log.warn(Socket processing request was rejected for:+socket,x);
@@ -850,33 +850,6 @@ public class AprEndpoint extends Abstrac
 }
 
 
-/**
- * Process given socket for an event.
- */
-public boolean processSocket(long socket, SocketStatus status) {
-try {
-Executor executor = getExecutor();
-if (executor == null) {
-log.warn(sm.getString(endpoint.warn.noExector,
-Long.valueOf(socket), status));
-} else {
-SocketWrapperLong wrapper =
-new SocketWrapper(Long.valueOf(socket));
-executor.execute(new SocketEventProcessor(wrapper, status));
-}
-} catch (RejectedExecutionException x) {
-log.warn(Socket processing request was rejected for:+socket,x);
-return false;
-} catch (Throwable t) {
-ExceptionUtils.handleThrowable(t);
-// This means we got an OOM or similar creating a thread, or that
-// the pool and its queue are full
-log.error(sm.getString(endpoint.process.fail), t);
-return false;
-}
-return true;
-}
-
 public boolean processSocketAsync(SocketWrapperLong socket,
 SocketStatus status) {
 try {
@@ -1702,7 +1675,7 @@ public class AprEndpoint extends Abstrac
 // Close socket and clear pool
 destroySocket(desc[n*2+1]);
 } else if ((desc[n*2]  Poll.APR_POLLIN) == 
Poll.APR_POLLIN) {
-if (!processSocket(desc[n*2+1])) {
+if (!processSocket(desc[n*2+1], 
SocketStatus.OPEN_READ)) {
 // Close socket and clear pool
 destroySocket(desc[n*2+1]);
 }
@@ -2175,6 +2148,10 @@ public class AprEndpoint extends Abstrac
 public SocketProcessor(SocketWrapperLong socket,
 SocketStatus status) {
 this.socket = socket;
+if (status == null) {
+// Should never happen
+throw new NullPointerException();
+}
 this.status = status;
 }
 
@@ -2182,12 +2159,7 @@ public class AprEndpoint extends Abstrac
 public void run() {
 synchronized (socket) {
 // Process the request from this socket
-SocketState state = SocketState.OPEN;
-if (status == null) {
-state = handler.process(socket,SocketStatus.OPEN_READ);
-} else {
-state = handler.process(socket, status);
-}
+SocketState state = handler.process(socket, status);
 if (state == Handler.SocketState.CLOSED) {
 // Close socket and pool
 destroySocket(socket.getSocket().longValue());
@@ -2199,7 +2171,8 @@ public class AprEndpoint extends Abstrac
 }
 } else if (state == Handler.SocketState.ASYNC_END) {
 socket.access();
-SocketProcessor proc = new SocketProcessor(socket, 
SocketStatus.OPEN_READ);
+SocketProcessor proc = new 

[Bug 54439] New: Undeploy unable to remove JAR files

2013-01-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54439

Bug ID: 54439
   Summary: Undeploy unable to remove JAR files
   Product: Tomcat 7
   Version: 7.0.32
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: manfred.r...@oracle.com
Classification: Unclassified

See http://java.net/jira/browse/JAVASERVERFACES-2684. The Tomcat runtime is not
cleaning up JAR files when undeploy happens. Note this is a container specific
issue since Glassfish does not suffer from this problem.

-- 
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



svn commit: r1434438 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

2013-01-16 Thread markt
Author: markt
Date: Wed Jan 16 22:11:53 2013
New Revision: 1434438

URL: http://svn.apache.org/viewvc?rev=1434438view=rev
Log:
APR/native refactoring
- Clean-up

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1434438r1=1434437r2=1434438view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Wed Jan 16 
22:11:53 2013
@@ -1385,6 +1385,7 @@ public class AprEndpoint extends Abstrac
 connectionCount = 0;
 }
 
+
 /**
  * Add specified socket and associated pool to the poller. The socket
  * will be added to a temporary array, and polled first after a maximum
@@ -2142,8 +2143,8 @@ public class AprEndpoint extends Abstrac
  */
 protected class SocketProcessor implements Runnable {
 
-protected SocketWrapperLong socket = null;
-protected SocketStatus status = null;
+private final SocketWrapperLong socket;
+private final SocketStatus status;
 
 public SocketProcessor(SocketWrapperLong socket,
 SocketStatus status) {
@@ -2163,7 +2164,6 @@ public class AprEndpoint extends Abstrac
 if (state == Handler.SocketState.CLOSED) {
 // Close socket and pool
 destroySocket(socket.getSocket().longValue());
-socket = null;
 } else if (state == Handler.SocketState.LONG) {
 socket.access();
 if (socket.async) {



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



[Bug 54438] Bug fix 52953 introduces NullPointerException in RealmBase.java line 409 when user not found in JDBC

2013-01-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54438

bruce weertman br...@iris.washington.edu changed:

   What|Removed |Added

Summary|Bug fix 52953 introduces|Bug fix 52953 introduces
   |NullPointerException in |NullPointerException in
   |RealBase.java line 409 when |RealmBase.java line 409
   |user not found in JDBC  |when user not found in JDBC

-- 
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



svn commit: r1434447 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

2013-01-16 Thread markt
Author: markt
Date: Wed Jan 16 22:22:22 2013
New Revision: 1434447

URL: http://svn.apache.org/viewvc?rev=1434447view=rev
Log:
Ensure maxKeepAliveRequests is honoured by the APR/native connector.

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1434447r1=1434446r2=1434447view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Wed Jan 16 
22:22:22 2013
@@ -22,6 +22,8 @@ import java.security.PrivilegedAction;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.concurrent.Executor;
 import java.util.concurrent.RejectedExecutionException;
@@ -97,6 +99,9 @@ public class AprEndpoint extends Abstrac
 protected ConcurrentLinkedQueueSocketWrapperLong waitingRequests =
 new ConcurrentLinkedQueue();
 
+private MapLong,SocketWrapperLong connections =
+new ConcurrentHashMap();
+
 //  Constructor
 
 public AprEndpoint() {
@@ -675,6 +680,7 @@ public class AprEndpoint extends Abstrac
 // Ignore
 }
 poller = null;
+connections.clear();
 try {
 cometPoller.destroy();
 } catch (Exception e) {
@@ -805,6 +811,8 @@ public class AprEndpoint extends Abstrac
 if (running) {
 SocketWrapperLong wrapper =
 new SocketWrapper(Long.valueOf(socket));
+wrapper.setKeepAliveLeft(getMaxKeepAliveRequests());
+connections.put(Long.valueOf(socket), wrapper);
 getExecutor().execute(new SocketWithOptionsProcessor(wrapper));
 }
 } catch (RejectedExecutionException x) {
@@ -833,7 +841,7 @@ public class AprEndpoint extends Abstrac
 Long.valueOf(socket), null));
 } else {
 SocketWrapperLong wrapper =
-new SocketWrapper(Long.valueOf(socket));
+connections.get(Long.valueOf(socket));
 executor.execute(new SocketProcessor(wrapper, status));
 }
 } catch (RejectedExecutionException x) {
@@ -907,6 +915,7 @@ public class AprEndpoint extends Abstrac
 // countDownConnection(). Once the connector is stopped, the latch is
 // removed so it does not matter that destroySocket() does not call
 // countDownConnection() in that case
+connections.remove(Long.valueOf(socket));
 destroySocket(socket, running);
 }
 



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



svn commit: r1434456 - in /tomcat/trunk/java/org/apache: coyote/http11/Http11AprProtocol.java tomcat/util/net/AprEndpoint.java tomcat/util/net/NioEndpoint.java tomcat/util/net/SocketWrapper.java

2013-01-16 Thread markt
Author: markt
Date: Wed Jan 16 22:40:40 2013
New Revision: 1434456

URL: http://svn.apache.org/viewvc?rev=1434456view=rev
Log:
APR/native refactoring
- Pull up comet flag to SocketWrappoer
- Remove dedicated Comet Poller

Modified:
tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java?rev=1434456r1=1434455r2=1434456view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java Wed Jan 
16 22:40:40 2013
@@ -294,7 +294,8 @@ public class Http11AprProtocol extends A
 } else if (processor.isComet()) {
 // Comet
 if (proto.endpoint.isRunning()) {
-((AprEndpoint) proto.endpoint).getCometPoller().add(
+socket.setComet(true);
+((AprEndpoint) proto.endpoint).getPoller().add(
 socket.getSocket().longValue(),
 proto.endpoint.getSoTimeout(), true, false);
 } else {

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1434456r1=1434455r2=1434456view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Wed Jan 16 
22:40:40 2013
@@ -195,15 +195,6 @@ public class AprEndpoint extends Abstrac
 
 
 /**
- * The socket poller used for Comet support.
- */
-protected Poller cometPoller = null;
-public Poller getCometPoller() {
-return cometPoller;
-}
-
-
-/**
  * The static file sender.
  */
 protected Sendfile sendfile = null;
@@ -600,22 +591,13 @@ public class AprEndpoint extends Abstrac
 initializeConnectionLatch();
 
 // Start poller thread
-poller = new Poller(false);
+poller = new Poller();
 poller.init();
 Thread pollerThread = new Thread(poller, getName() + -Poller);
 pollerThread.setPriority(threadPriority);
 pollerThread.setDaemon(true);
 pollerThread.start();
 
-// Start comet poller thread
-cometPoller = new Poller(true);
-cometPoller.init();
-Thread cometPollerThread =
-new Thread(cometPoller, getName() + -CometPoller);
-cometPollerThread.setPriority(threadPriority);
-cometPollerThread.setDaemon(true);
-cometPollerThread.start();
-
 // Start sendfile thread
 if (useSendfile) {
 sendfile = new Sendfile();
@@ -681,12 +663,6 @@ public class AprEndpoint extends Abstrac
 }
 poller = null;
 connections.clear();
-try {
-cometPoller.destroy();
-} catch (Exception e) {
-// Ignore
-}
-cometPoller = null;
 if (useSendfile) {
 try {
 sendfile.destroy();
@@ -935,7 +911,6 @@ public class AprEndpoint extends Abstrac
 return log;
 }
 
-
 // --- Acceptor Inner Class
 /**
  * The background thread that listens for incoming TCP/IP connections and
@@ -1272,11 +1247,6 @@ public class AprEndpoint extends Abstrac
 protected SocketList localAddList = null;
 
 /**
- * Event mode flag.
- */
-protected boolean event = true;
-
-/**
  * Structure used for storing timeouts.
  */
 protected SocketTimeouts timeouts = null;
@@ -1294,9 +1264,6 @@ public class AprEndpoint extends Abstrac
 protected int connectionCount = 0;
 public int getConnectionCount() { return connectionCount; }
 
-public Poller(boolean event) {
-this.event = event;
-}
 
 /**
  * Create the poller. With some versions of APR, the maximum poller 
size
@@ -1371,7 +1338,9 @@ public class AprEndpoint extends Abstrac
 // Close all sockets in the add queue
 SocketInfo info = addList.get();
 while (info != null) {
-if (!event || (event  !processSocket(
+boolean comet =
+

svn commit: r1434463 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

2013-01-16 Thread markt
Author: markt
Date: Wed Jan 16 22:51:11 2013
New Revision: 1434463

URL: http://svn.apache.org/viewvc?rev=1434463view=rev
Log:
APR/native refactoring
- Add an endpoint implementation specific SocketWrapper
- Track poller flags in new wrapper

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1434463r1=1434462r2=1434463view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Wed Jan 16 
22:51:11 2013
@@ -99,8 +99,7 @@ public class AprEndpoint extends Abstrac
 protected ConcurrentLinkedQueueSocketWrapperLong waitingRequests =
 new ConcurrentLinkedQueue();
 
-private MapLong,SocketWrapperLong connections =
-new ConcurrentHashMap();
+private MapLong,AprSocketWrapper connections = new ConcurrentHashMap();
 
 //  Constructor
 
@@ -785,8 +784,8 @@ public class AprEndpoint extends Abstrac
 try {
 // During shutdown, executor may be null - avoid NPE
 if (running) {
-SocketWrapperLong wrapper =
-new SocketWrapper(Long.valueOf(socket));
+AprSocketWrapper wrapper =
+new AprSocketWrapper(Long.valueOf(socket));
 wrapper.setKeepAliveLeft(getMaxKeepAliveRequests());
 connections.put(Long.valueOf(socket), wrapper);
 getExecutor().execute(new SocketWithOptionsProcessor(wrapper));
@@ -1548,8 +1547,7 @@ public class AprEndpoint extends Abstrac
 // Ignore
 }
 }
-// Check timeouts for suspended connections if the poller is
-// empty
+// Check timeouts if the poller is empty
 while (connectionCount  1  addList.size()  1) {
 // Reset maintain time.
 try {
@@ -1579,16 +1577,17 @@ public class AprEndpoint extends Abstrac
 SocketInfo info = localAddList.get();
 while (info != null) {
 if (info.read() || info.write()) {
-boolean comet = connections.get(
-Long.valueOf(info.socket)).isComet();
+AprSocketWrapper wrapper = connections.get(
+Long.valueOf(info.socket));
+boolean comet = wrapper.isComet();
 // Store timeout
 if (comet) {
 removeFromPoller(info.socket);
 }
-int events =
+wrapper.pollerFlags = wrapper.pollerFlags |
 (info.read() ? Poll.APR_POLLIN : 0) |
 (info.write() ? Poll.APR_POLLOUT : 0);
-if (!addToPoller(info.socket, events)) {
+if (!addToPoller(info.socket, 
wrapper.pollerFlags)) {
 // Can't do anything: close the socket 
right
 // away
 if (!comet || (comet  !processSocket(
@@ -1628,8 +1627,11 @@ public class AprEndpoint extends Abstrac
 connectionCount -= rv;
 for (int n = 0; n  rv; n++) {
 timeouts.remove(desc[n*2+1]);
+AprSocketWrapper wrapper = connections.get(
+Long.valueOf(desc[n*2+1]));
+wrapper.pollerFlags = wrapper.pollerFlags  
~((int) desc[n*2]);
 // Check for failed sockets and hand this 
socket off to a worker
-if 
(connections.get(Long.valueOf(desc[n*2+1])).isComet()) {
+if (wrapper.isComet()) {
 // Event processes either a read or a 
write depending on what the poller returns
 if (((desc[n*2]  Poll.APR_POLLHUP) == 
Poll.APR_POLLHUP)
 || ((desc[n*2]  Poll.APR_POLLERR) 
== Poll.APR_POLLERR)
@@ -2168,6 +2170,17 @@ public class AprEndpoint extends Abstrac
 }
 
 
+private static class AprSocketWrapper extends SocketWrapperLong {
+
+// This field should only be used by Poller#run()
+private int pollerFlags = 0;
+
+

svn commit: r1434500 - in /tomcat/trunk/java/org/apache: coyote/http11/Http11AprProtocol.java coyote/http11/upgrade/AprProcessor.java coyote/http11/upgrade/AprServletOutputStream.java tomcat/util/net/

2013-01-16 Thread markt
Author: markt
Date: Wed Jan 16 23:43:23 2013
New Revision: 1434500

URL: http://svn.apache.org/viewvc?rev=1434500view=rev
Log:
Final parts of the puzzle to get APR/native to support the JSR356 WebSocket. 
There are a small number of Autobahn failures still. I'll look at those next.

Modified:
tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
tomcat/trunk/java/org/apache/coyote/http11/upgrade/AprProcessor.java

tomcat/trunk/java/org/apache/coyote/http11/upgrade/AprServletOutputStream.java
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java?rev=1434500r1=1434499r2=1434500view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java Wed Jan 
16 23:43:23 2013
@@ -340,7 +340,8 @@ public class Http11AprProtocol extends A
 SocketWrapperLong socket,
 ProtocolHandler httpUpgradeProcessor)
 throws IOException {
-return new AprProcessor(socket, httpUpgradeProcessor);
+return new AprProcessor(socket, httpUpgradeProcessor,
+(AprEndpoint) proto.endpoint);
 }
 }
 }

Modified: tomcat/trunk/java/org/apache/coyote/http11/upgrade/AprProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/upgrade/AprProcessor.java?rev=1434500r1=1434499r2=1434500view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/upgrade/AprProcessor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/upgrade/AprProcessor.java Wed 
Jan 16 23:43:23 2013
@@ -19,6 +19,7 @@ package org.apache.coyote.http11.upgrade
 import javax.servlet.http.ProtocolHandler;
 
 import org.apache.tomcat.jni.Socket;
+import org.apache.tomcat.util.net.AprEndpoint;
 import org.apache.tomcat.util.net.SocketWrapper;
 
 public class AprProcessor extends AbstractProcessorLong {
@@ -26,10 +27,10 @@ public class AprProcessor extends Abstra
 private static final int INFINITE_TIMEOUT = -1;
 
 public AprProcessor(SocketWrapperLong wrapper,
-ProtocolHandler httpUpgradeProcessor) {
+ProtocolHandler httpUpgradeProcessor, AprEndpoint endpoint) {
 super(httpUpgradeProcessor,
 new AprServletInputStream(wrapper),
-new AprServletOutputStream(wrapper));
+new AprServletOutputStream(wrapper, endpoint));
 
 Socket.timeoutSet(wrapper.getSocket().longValue(), INFINITE_TIMEOUT);
 }

Modified: 
tomcat/trunk/java/org/apache/coyote/http11/upgrade/AprServletOutputStream.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/upgrade/AprServletOutputStream.java?rev=1434500r1=1434499r2=1434500view=diff
==
--- 
tomcat/trunk/java/org/apache/coyote/http11/upgrade/AprServletOutputStream.java 
(original)
+++ 
tomcat/trunk/java/org/apache/coyote/http11/upgrade/AprServletOutputStream.java 
Wed Jan 16 23:43:23 2013
@@ -22,16 +22,21 @@ import java.util.concurrent.locks.Reentr
 import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
 
 import org.apache.tomcat.jni.Socket;
+import org.apache.tomcat.jni.Status;
+import org.apache.tomcat.util.net.AprEndpoint;
 import org.apache.tomcat.util.net.SocketWrapper;
 
 public class AprServletOutputStream extends AbstractServletOutputStream {
 
+private final AprEndpoint endpoint;
 private final SocketWrapperLong wrapper;
 private final long socket;
 private final Lock blockingStatusReadLock;
 private final WriteLock blockingStatusWriteLock;
 
-public AprServletOutputStream(SocketWrapperLong wrapper) {
+public AprServletOutputStream(SocketWrapperLong wrapper,
+AprEndpoint endpoint) {
+this.endpoint = endpoint;
 this.wrapper = wrapper;
 this.socket = wrapper.getSocket().longValue();
 ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
@@ -79,12 +84,20 @@ public class AprServletOutputStream exte
 }
 }
 
-if (result  0) {
-throw new IOException(sm.getString(apr.write.error,
-Integer.valueOf(-result)));
+if (result = 0) {
+if (result  len) {
+endpoint.getPoller().add(socket, -1, false, true);
+}
+return result;
+}
+else if (-result == Status.EAGAIN) {
+endpoint.getPoller().add(socket, -1, false, true);
+return 0;
 }
 
-return result;
+throw new IOException(sm.getString(apr.write.error,
+   

[Bug 54440] New: TagPluginManager.init() throws NPE when used in Ant jasper task

2013-01-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54440

Bug ID: 54440
   Summary: TagPluginManager.init() throws NPE when used in Ant
jasper task
   Product: Tomcat 7
   Version: 7.0.35
  Hardware: Macintosh
Status: NEW
  Severity: normal
  Priority: P2
 Component: Jasper
  Assignee: dev@tomcat.apache.org
  Reporter: sro...@apache.org
Classification: Unclassified

In 7.0.35, I see the following NPE when compiling JSPX files via the jasper
Ant task:

   [jasper] java.lang.NullPointerException
   [jasper] at
org.apache.jasper.compiler.TagPluginManager.init(TagPluginManager.java:83)
   [jasper] at
org.apache.jasper.compiler.TagPluginManager.apply(TagPluginManager.java:57)
   [jasper] at
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:240)
   [jasper] at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
   [jasper] at org.apache.jasper.JspC.processFile(JspC.java:1179)
   [jasper] at org.apache.jasper.JspC.execute(JspC.java:1329)
   [jasper] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
   [jasper] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
   [jasper] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   [jasper] at java.lang.reflect.Method.invoke(Method.java:601)
   [jasper] at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
   [jasper] at org.apache.tools.ant.Task.perform(Task.java:348)
   [jasper] at org.apache.tools.ant.Target.execute(Target.java:390)
   [jasper] at org.apache.tools.ant.Target.performTasks(Target.java:411)
   [jasper] at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
   [jasper] at
org.apache.tools.ant.Project.executeTarget(Project.java:1368)
   [jasper] at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
   [jasper] at
org.apache.tools.ant.Project.executeTargets(Project.java:1251)
   [jasper] at org.apache.tools.ant.Main.runBuild(Main.java:809)
   [jasper] at org.apache.tools.ant.Main.startAnt(Main.java:217)
   [jasper] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
   [jasper] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

This didn't happen in 7.0.34.

Given the line and change from 7.0.34
(http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/TagPluginManager.java?r1=1402119r2=1431228diff_format=h)
I assume that in...

urls = ctxt.getClassLoader().getResources(
84  META_INF_JASPER_TAG_PLUGINS_XML);

the ClassLoader is null, since ctxt was used here before and evidently not
null.

Fall back to Thread.currentThread().getContextClassLoader() in this case?


My Ant snippet:

import file=${tomcat.home}/bin/catalina-tasks.xml/
...
jasper validateXml=false
failonerror=true
listerrors=true
trimspaces=true
uriroot=${module.web.basedir}/docs
outputDir=${module.web.basedir}/gen
package=*
xpoweredBy=false/

-- 
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