svn commit: r1584593 - in /tomcat/trunk: java/org/apache/coyote/http11/ java/org/apache/tomcat/util/net/ java/org/apache/tomcat/util/net/res/ webapps/docs/

2014-04-04 Thread remm
Author: remm
Date: Fri Apr  4 10:10:28 2014
New Revision: 1584593

URL: http://svn.apache.org/r1584593
Log:
Code cleanups and i18n in NIO2.

Modified:
tomcat/trunk/java/org/apache/coyote/http11/Http11Nio2Processor.java
tomcat/trunk/java/org/apache/coyote/http11/InternalNio2InputBuffer.java
tomcat/trunk/java/org/apache/coyote/http11/InternalNio2OutputBuffer.java
tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Channel.java
tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java
tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Nio2Processor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11Nio2Processor.java?rev=1584593&r1=1584592&r2=1584593&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11Nio2Processor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11Nio2Processor.java Fri Apr 
 4 10:10:28 2014
@@ -455,7 +455,7 @@ public class Http11Nio2Processor extends
 .getSslImplementation().getSSLSupport(
 engine.getSession());
 } catch (IOException ioe) {
-
log.warn(sm.getString("http11processor.socket.sslreneg",ioe));
+
log.warn(sm.getString("http11processor.socket.sslreneg"), ioe);
 }
 }
 

Modified: 
tomcat/trunk/java/org/apache/coyote/http11/InternalNio2InputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNio2InputBuffer.java?rev=1584593&r1=1584592&r2=1584593&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/InternalNio2InputBuffer.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalNio2InputBuffer.java Fri 
Apr  4 10:10:28 2014
@@ -755,11 +755,11 @@ public class InternalNio2InputBuffer ext
 synchronized (completionHandler) {
 if (nBytes.intValue() < 0) {
 failed(new 
EOFException(sm.getString("iib.eof.error")), attachment);
-return;
-}
-readPending = false;
-if (!Nio2Endpoint.isInline()) {
-notify = true;
+} else {
+readPending = false;
+if (!Nio2Endpoint.isInline()) {
+notify = true;
+}
 }
 }
 if (notify) {

Modified: 
tomcat/trunk/java/org/apache/coyote/http11/InternalNio2OutputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNio2OutputBuffer.java?rev=1584593&r1=1584592&r2=1584593&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/InternalNio2OutputBuffer.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalNio2OutputBuffer.java 
Fri Apr  4 10:10:28 2014
@@ -118,7 +118,6 @@ public class InternalNio2OutputBuffer ex
 synchronized (completionHandler) {
 if (nBytes.intValue() < 0) {
 failed(new 
EOFException(sm.getString("iob.failedwrite")), attachment);
-return;
 } else if (bufferedWrites.size() > 0) {
 // Continue writing data using a gathering write
 ArrayList arrayList = new ArrayList<>();
@@ -172,7 +171,6 @@ public class InternalNio2OutputBuffer ex
 synchronized (completionHandler) {
 if (nBytes.longValue() < 0) {
 failed(new 
EOFException(sm.getString("iob.failedwrite")), attachment);
-return;
 } else if (bufferedWrites.size() > 0 || 
arrayHasData(attachment)) {
 // Continue writing data
 ArrayList arrayList = new ArrayList<>();

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Channel.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Channel.java?rev=1584593&r1=1584592&r2=1584593&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Channel.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Channel.java Fri Apr  4 
10:10:28 2014
@@ -39,13 +39,9 @@ public class Nio2Channel implements Asyn
 
 protected AsynchronousSocketChannel sc = null;
 protected SocketWrapper soc

[Bug 56334] Double Backslash Escaping in Attributes

2014-04-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56334

--- Comment #2 from Markus  ---
A binary search through recent 7.0.x Tomcat versions shows that this bug has
been introduced with 7.0.52, i.e. 7.0.50 shows correct behaviour while .52 is
broken.

-- 
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 56334] Double Backslash Escaping in Attributes

2014-04-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56334

--- Comment #3 from Markus  ---
(In reply to Markus from comment #2)
> A binary search through recent 7.0.x Tomcat versions shows that this bug has
> been introduced with 7.0.52, i.e. 7.0.50 shows correct behaviour while .52
> is broken.

Off-by-one: 47 works, 50 is broken. Sorry.

-- 
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: r1584662 - in /tomcat/trunk/java/org/apache/tomcat/util/net: SecureNioChannel.java res/LocalStrings.properties

2014-04-04 Thread remm
Author: remm
Date: Fri Apr  4 13:26:11 2014
New Revision: 1584662

URL: http://svn.apache.org/r1584662
Log:
Port i18n to the NIO1 connector, for consistency.

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

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SecureNioChannel.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SecureNioChannel.java?rev=1584662&r1=1584661&r2=1584662&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/SecureNioChannel.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/SecureNioChannel.java Fri Apr  
4 13:26:11 2014
@@ -29,6 +29,8 @@ import javax.net.ssl.SSLEngineResult;
 import javax.net.ssl.SSLEngineResult.HandshakeStatus;
 import javax.net.ssl.SSLEngineResult.Status;
 
+import org.apache.tomcat.util.res.StringManager;
+
 /**
  *
  * Implementation of a secure socket channel
@@ -37,6 +39,8 @@ import javax.net.ssl.SSLEngineResult.Sta
 
 public class SecureNioChannel extends NioChannel  {
 
+protected static final StringManager sm = 
StringManager.getManager("org.apache.tomcat.util.net.res");
+
 protected ByteBuffer netInBuffer;
 protected ByteBuffer netOutBuffer;
 
@@ -161,7 +165,7 @@ public class SecureNioChannel extends Ni
 switch ( handshakeStatus ) {
 case NOT_HANDSHAKING: {
 //should never happen
-throw new IOException("NOT_HANDSHAKING during handshake");
+throw new 
IOException(sm.getString("channel.nio.ssl.notHandshaking"));
 }
 case FINISHED: {
 //we are complete if we have delivered the last package
@@ -177,7 +181,7 @@ public class SecureNioChannel extends Ni
 handshakeStatus = tasks();
 } else {
 //wrap should always work with our buffers
-throw new IOException("Unexpected status:" + 
handshake.getStatus() + " during handshake WRAP.");
+throw new 
IOException(sm.getString("channel.nio.ssl.unexpectedStatusDuringWrap", 
handshake.getStatus()));
 }
 if ( handshakeStatus != HandshakeStatus.NEED_UNWRAP || 
(!flush(netOutBuffer)) ) {
 //should actually return OP_READ if we have NEED_UNWRAP
@@ -197,7 +201,7 @@ public class SecureNioChannel extends Ni
 //read more data, reregister for OP_READ
 return SelectionKey.OP_READ;
 } else {
-throw new IOException("Invalid handshake 
status:"+handshakeStatus+" during handshake UNWRAP.");
+throw new 
IOException(sm.getString("channel.nio.ssl.unexpectedStatusDuringWrap", 
handshakeStatus));
 }//switch
 break;
 }
@@ -205,7 +209,7 @@ public class SecureNioChannel extends Ni
 handshakeStatus = tasks();
 break;
 }
-default: throw new IllegalStateException("Invalid handshake 
status:"+handshakeStatus);
+default: throw new 
IllegalStateException(sm.getString("channel.nio.ssl.invalidStatus", 
handshakeStatus));
 }//switch
 }//while
 //return 0 if we are complete, otherwise reregister for any activity 
that
@@ -224,10 +228,10 @@ public class SecureNioChannel extends Ni
 @SuppressWarnings("null") // key cannot be null
 public void rehandshake(long timeout) throws IOException {
 //validate the network buffers are empty
-if (netInBuffer.position() > 0 && 
netInBuffer.position() 0 && 
netOutBuffer.position()0 && 
getBufHandler().getReadBuffer().position()0 && 
getBufHandler().getWriteBuffer().position() 0 && 
netInBuffer.position() 0 && 
netOutBuffer.position()0 && 
getBufHandler().getReadBuffer().position()0 && 
getBufHandler().getWriteBuffer().position()= timeout)) {
-throw new SocketTimeoutException("Handshake 
operation timed out.");
+throw new 
SocketTimeoutException(sm.getString("channel.nio.ssl.timeoutDuringHandshake"));
 }
 isReadable = key.isReadable();
 isWriteable = key.isWritable();
@@ -323,7 +327,7 @@ public class SecureNioChannel extends Ni
 if ( doread )  {
 //if we have data to read, read it
 int read = sc.read(netInBuffer);
-if (read == -1) throw new IOException("EOF encountered during 
handshake.");
+if (read == -1) throw new 
IOException(sm.getString("channel.nio.ssl.eofDuringHandshake"));
 }
 SSLEngineResult result;
 boolean cont = false;
@@ -36

[Bug 56318] Oracle DB cursors are leaking when using org.apache.tomcat.jdbc.pool.DataSourceFactory

2014-04-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56318

Filip Hanik  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |---

--- Comment #15 from Filip Hanik  ---
Reopening since the patch is a new fix

-- 
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 56348] New: ReadListener reading stream on different thread very slow

2014-04-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56348

Bug ID: 56348
   Summary: ReadListener reading stream on different thread very
slow
   Product: Tomcat 8
   Version: 8.0.5
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: yann.simon...@gmail.com

In a ReadListener, if the servlet input stream is read with another thread as
the servlet thread, the upload is very slow.

The following sample application reproduces the problem:
https://github.com/yanns/servlet31_async/tree/async-perf

/upload2 reads the input stream in the servlet thread
/upload forks a new thread that reads the servlet input stream

My measurements:

With tomcat 8.0.5
/upload: 2 minutes
/upload2: 3,8 s

It is expected that /upload is more slow that /upload2, but not with that
difference.

The same tests with jetty:
/upload: 9,5 s
/upload2: 3,7s

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



[GUMP@vmgump]: Project tomcat-tc7.0.x-validate (in module tomcat-7.0.x) failed

2014-04-04 Thread Bill Barker
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at gene...@gump.apache.org.

Project tomcat-tc7.0.x-validate has an issue affecting its community 
integration.
This issue affects 1 projects.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-tc7.0.x-validate :  Tomcat 7.x, a web server implementing Java 
Servlet 3.0,
...


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-7.0.x/tomcat-tc7.0.x-validate/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on checkstyle exists, no need to add for property 
checkstyle.jar.
 -INFO- Failed with reason build failed



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-7.0.x/tomcat-tc7.0.x-validate/gump_work/build_tomcat-7.0.x_tomcat-tc7.0.x-validate.html
Work Name: build_tomcat-7.0.x_tomcat-tc7.0.x-validate (Type: Build)
Work ended in a state of : Failed
Elapsed: 20 secs
Command Line: /usr/lib/jvm/java-7-oracle/bin/java -Djava.awt.headless=true 
-Dbuild.sysclasspath=only org.apache.tools.ant.Main 
-Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Dcheckstyle.jar=/srv/gump/public/workspace/checkstyle/target/checkstyle-5.7-SNAPSHOT.jar
 -Dexecute.validate=true validate 
[Working Directory: /srv/gump/public/workspace/tomcat-7.0.x]
CLASSPATH: 
/usr/lib/jvm/java-7-oracle/lib/tools.jar:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/packages/antlr/antlr-3.1.3.jar:/srv/gump/public/workspace/checkstyle/target/checkstyle-5.7-SNAPSHOT.jar:/srv/gump/public/workspace/apache-commons/beanutils/dist/commons-beanutils-20140404.jar:/srv/gump/public/workspace/apache-commons/cli/target/commons-cli-1.3-SNAPSHOT.jar:/srv/gump/public/workspace/commons-collections-3.x/target/commons-collections-3.3-SNAPSHOT.jar:/srv/gump/public/workspace/apache-commons/exec/tar
 
get/commons-exec-1.3-SNAPSHOT.jar:/srv/gump/public/workspace/apache-commons/logging/target/commons-logging-20140404.jar:/srv/gump/public/workspace/apache-commons/logging/target/commons-logging-api-20140404.jar:/srv/gump/public/workspace/apache-commons/validator/dist/commons-validator-20140404.jar:/srv/gump/public/workspace/google-guava/guava/target/guava-17.0-SNAPSHOT.jar
-
Buildfile: /srv/gump/public/workspace/tomcat-7.0.x/build.xml

build-prepare:
   [delete] Deleting directory 
/srv/gump/public/workspace/tomcat-7.0.x/output/build/temp
[mkdir] Created dir: 
/srv/gump/public/workspace/tomcat-7.0.x/output/build/temp

compile-prepare:

download-validate:

proxyflags:

setproxy:

testexist:
 [echo] Testing  for 
/srv/gump/public/workspace/checkstyle/target/checkstyle-5.7-SNAPSHOT.jar

downloadzip:

validate:
[mkdir] Created dir: 
/srv/gump/public/workspace/tomcat-7.0.x/output/res/checkstyle
[checkstyle] Running Checkstyle 5.7-SNAPSHOT on 2584 files
[checkstyle] 
/srv/gump/public/workspace/tomcat-7.0.x/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java:729:17:
 File contains tab characters (this is the first instance).

BUILD FAILED
/srv/gump/public/workspace/tomcat-7.0.x/build.xml:493: Got 1 errors and 0 
warnings.

Total time: 20 seconds
-

To subscribe to this information via syndicated feeds:
- RSS: 
http://vmgump.apache.org/gump/public/tomcat-7.0.x/tomcat-tc7.0.x-validate/rss.xml
- Atom: 
http://vmgump.apache.org/gump/public/tomcat-7.0.x/tomcat-tc7.0.x-validate/atom.xml

== Gump Tracking Only ===
Produced by Apache Gump(TM) version 2.3.
Gump Run 20140404120004, vmgump.apache.org:vmgump:20140404120004
Gump E-mail Identifier (unique within run) #1.

--
Apache Gump
http://gump.apache.org/ [Instance: vmgump]

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



svn commit: r1584791 - /tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java

2014-04-04 Thread kkolinko
Author: kkolinko
Date: Fri Apr  4 16:21:06 2014
New Revision: 1584791

URL: http://svn.apache.org/r1584791
Log:
Followup to r1584513:
tabs -> spaces, as reminded by checkstyle

Modified:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java?rev=1584791&r1=1584790&r2=1584791&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java 
Fri Apr  4 16:21:06 2014
@@ -726,7 +726,7 @@ public class SimpleTcpCluster extends Li
 log.debug("Invoking addValve on " + getContainer()
 + " with class=" + valve.getClass().getName());
 if (valve != null) {
-   container.getPipeline().addValve(valve);
+container.getPipeline().addValve(valve);
 valve.setCluster(this);
 }
 }
@@ -743,7 +743,7 @@ public class SimpleTcpCluster extends Li
 log.debug("Invoking removeValve on " + getContainer()
 + " with class=" + valve.getClass().getName());
 if (valve != null) {
-   container.getPipeline().removeValve(valve);
+container.getPipeline().removeValve(valve);
 valve.setCluster(null);
 }
 }



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



svn commit: r1584800 - in /tomcat/tc6.0.x/trunk: ./ java/org/apache/catalina/startup/ java/org/apache/jasper/compiler/ res/maven/ webapps/docs/

2014-04-04 Thread kkolinko
Author: kkolinko
Date: Fri Apr  4 16:34:31 2014
New Revision: 1584800

URL: http://svn.apache.org/r1584800
Log:
Fix http://issues.apache.org/bugzilla/show_bug.cgi?id=56283
Add Java 8 support to Jasper's default configuration

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/build.properties.default
tomcat/tc6.0.x/trunk/eclipse.classpath
tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/TldConfig.java
tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/JDTCompiler.java
tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java
tomcat/tc6.0.x/trunk/res/maven/jasper.pom
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1584800&r1=1584799&r2=1584800&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Apr  4 16:34:31 2014
@@ -49,24 +49,6 @@ PATCHES PROPOSED TO BACKPORT:
   remm: no need to add i18n for something that will not happen
   -1:
 
-* Fix http://issues.apache.org/bugzilla/show_bug.cgi?id=56283
-  Add Java 8 support to Jasper's default configuration
-  http://people.apache.org/~markt/patches/2014-03-19-Jasper-Java8-tc6-v1.patch
-  
http://people.apache.org/~markt/patches/2014-03-23-Jasper-Java8-tc6-part2-v1.patch
-  +1: markt, remm
-  +1: kkolinko:
-   - See r1557990. There are noTldJars lists in TldConfig, 
TldLocationsCache
- that have to be updated. Maybe add support for "ecj-*.jar" pattern
- there? (If not, then just add "4.3.2" and "P20140317-1600" versions).
-
-   - Technically CompilerOptions.VERSION_1_8 is a String constant "1.8",
- so it will be inlined at compile time. At runtime Jasper will be
- compatible with any earlier versions of ecj 4.3.x.
- Thus I am OK with this change.
-  markt: Additional patch added
-  kkolinko: Thank you. Changing the vote to +1.
-  -1:
-
 
 PATCHES/ISSUES THAT ARE STALLED:
 

Modified: tomcat/tc6.0.x/trunk/build.properties.default
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/build.properties.default?rev=1584800&r1=1584799&r2=1584800&view=diff
==
--- tomcat/tc6.0.x/trunk/build.properties.default (original)
+++ tomcat/tc6.0.x/trunk/build.properties.default Fri Apr  4 16:34:31 2014
@@ -106,8 +106,8 @@ wsdl4j-lib.jar=${wsdl4j-lib.home}/wsdl4j
 # - noTldJars in o.a.j.compiler.TldLocationsCache
 # - res/maven/jasper.pom
 # - eclipse.classpath
-jdt.version=4.3.1
-jdt.release=R-4.3.1-201309111000
+jdt.version=P20140317-1600
+jdt.release=P20140317-1600
 jdt.home=${base.path}/ecj-${jdt.version}
 jdt.jar=${jdt.home}/ecj-${jdt.version}.jar
 # The download will be moved to the archive area eventually. We are taking 
care of that in advance.

Modified: tomcat/tc6.0.x/trunk/eclipse.classpath
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/eclipse.classpath?rev=1584800&r1=1584799&r2=1584800&view=diff
==
--- tomcat/tc6.0.x/trunk/eclipse.classpath (original)
+++ tomcat/tc6.0.x/trunk/eclipse.classpath Fri Apr  4 16:34:31 2014
@@ -20,7 +20,7 @@



-   
+   




Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/TldConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/TldConfig.java?rev=1584800&r1=1584799&r2=1584800&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/TldConfig.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/TldConfig.java Fri 
Apr  4 16:34:31 2014
@@ -94,6 +94,8 @@ public final class TldConfig  implements
 noTldJars.add("ecj-4.2.1.jar");
 noTldJars.add("ecj-4.2.2.jar");
 noTldJars.add("ecj-4.3.1.jar");
+noTldJars.add("ecj-4.3.2.jar");
+noTldJars.add("ecj-P20140317-1600.jar");
 noTldJars.add("jsp-api.jar");
 noTldJars.add("servlet-api.jar");
 noTldJars.add("tomcat-coyote.jar");

Modified: tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/JDTCompiler.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/JDTCompiler.java?rev=1584800&r1=1584799&r2=1584800&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/JDTCompiler.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/JDTCompiler.java Fri 
Apr  4 16:34:31 2014
@@ -310,6 +310,9 @@ public class JDTCompiler extends org.apa
 } else if(opt.equals("1.7")) {
 settings.put(CompilerOptions.OPTION_Source,

buildbot failure in ASF Buildbot on tomcat-6-trunk

2014-04-04 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-6-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-6-trunk/builds/676

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/tc6.0.x/trunk] 1584800
Blamelist: kkolinko

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot




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



svn commit: r1584806 - in /tomcat/tc6.0.x/trunk: ./ java/org/apache/catalina/startup/ java/org/apache/jasper/compiler/ res/maven/ webapps/docs/

2014-04-04 Thread kkolinko
Author: kkolinko
Date: Fri Apr  4 16:46:37 2014
New Revision: 1584806

URL: http://svn.apache.org/r1584806
Log:
Revert r1584800.
It was:
Fix http://issues.apache.org/bugzilla/show_bug.cgi?id=56283
Add Java 8 support to Jasper's default configuration

It does not compile with JDK 1.5.0_20:
There is a problem with org.eclipse.jdt.core.compiler.IProblem class (imported 
by Jasper's JDTCompiler)
[javac] class file has wrong version 50.0, should be 49.0

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/build.properties.default
tomcat/tc6.0.x/trunk/eclipse.classpath
tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/TldConfig.java
tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/JDTCompiler.java
tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java
tomcat/tc6.0.x/trunk/res/maven/jasper.pom
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1584806&r1=1584805&r2=1584806&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Apr  4 16:46:37 2014
@@ -49,6 +49,24 @@ PATCHES PROPOSED TO BACKPORT:
   remm: no need to add i18n for something that will not happen
   -1:
 
+* Fix http://issues.apache.org/bugzilla/show_bug.cgi?id=56283
+  Add Java 8 support to Jasper's default configuration
+  http://people.apache.org/~markt/patches/2014-03-19-Jasper-Java8-tc6-v1.patch
+  
http://people.apache.org/~markt/patches/2014-03-23-Jasper-Java8-tc6-part2-v1.patch
+  +1: markt, remm
+  +1: kkolinko:
+   - See r1557990. There are noTldJars lists in TldConfig, 
TldLocationsCache
+ that have to be updated. Maybe add support for "ecj-*.jar" pattern
+ there? (If not, then just add "4.3.2" and "P20140317-1600" versions).
+
+   - Technically CompilerOptions.VERSION_1_8 is a String constant "1.8",
+ so it will be inlined at compile time. At runtime Jasper will be
+ compatible with any earlier versions of ecj 4.3.x.
+ Thus I am OK with this change.
+  markt: Additional patch added
+  kkolinko: Thank you. Changing the vote to +1.
+  -1:
+
 
 PATCHES/ISSUES THAT ARE STALLED:
 

Modified: tomcat/tc6.0.x/trunk/build.properties.default
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/build.properties.default?rev=1584806&r1=1584805&r2=1584806&view=diff
==
--- tomcat/tc6.0.x/trunk/build.properties.default (original)
+++ tomcat/tc6.0.x/trunk/build.properties.default Fri Apr  4 16:46:37 2014
@@ -106,8 +106,8 @@ wsdl4j-lib.jar=${wsdl4j-lib.home}/wsdl4j
 # - noTldJars in o.a.j.compiler.TldLocationsCache
 # - res/maven/jasper.pom
 # - eclipse.classpath
-jdt.version=P20140317-1600
-jdt.release=P20140317-1600
+jdt.version=4.3.1
+jdt.release=R-4.3.1-201309111000
 jdt.home=${base.path}/ecj-${jdt.version}
 jdt.jar=${jdt.home}/ecj-${jdt.version}.jar
 # The download will be moved to the archive area eventually. We are taking 
care of that in advance.

Modified: tomcat/tc6.0.x/trunk/eclipse.classpath
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/eclipse.classpath?rev=1584806&r1=1584805&r2=1584806&view=diff
==
--- tomcat/tc6.0.x/trunk/eclipse.classpath (original)
+++ tomcat/tc6.0.x/trunk/eclipse.classpath Fri Apr  4 16:46:37 2014
@@ -20,7 +20,7 @@



-   
+   




Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/TldConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/TldConfig.java?rev=1584806&r1=1584805&r2=1584806&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/TldConfig.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/TldConfig.java Fri 
Apr  4 16:46:37 2014
@@ -94,8 +94,6 @@ public final class TldConfig  implements
 noTldJars.add("ecj-4.2.1.jar");
 noTldJars.add("ecj-4.2.2.jar");
 noTldJars.add("ecj-4.3.1.jar");
-noTldJars.add("ecj-4.3.2.jar");
-noTldJars.add("ecj-P20140317-1600.jar");
 noTldJars.add("jsp-api.jar");
 noTldJars.add("servlet-api.jar");
 noTldJars.add("tomcat-coyote.jar");

Modified: tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/JDTCompiler.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/JDTCompiler.java?rev=1584806&r1=1584805&r2=1584806&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/JDTCompiler.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/J

buildbot success in ASF Buildbot on tomcat-6-trunk

2014-04-04 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-6-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-6-trunk/builds/677

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/tc6.0.x/trunk] 1584806
Blamelist: kkolinko

Build succeeded!

sincerely,
 -The Buildbot





[Bug 56283] Add support for Java 8 to Jasper

2014-04-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56283

--- Comment #2 from Konstantin Kolinko  ---
Note 1.

Technically CompilerOptions.VERSION_1_8 is a String constant "1.8", so it will
be inlined at compile time.

At runtime Tomcat/Jasper will be compatible with any other version of ECJ
4.3.x, e.g. 4.3.1.

Note 2.

All 547 classes in ecj-P20140317-1600.jar have format version 50.0 (Java 1.6).
As such, this jar cannot be used to build Tomcat 6.

For historical record, I applied the change to Tomcat 6 in r1584800 but had to
revert it right away in r1584806.

-- 
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 commit: r1584806 - in /tomcat/tc6.0.x/trunk: ./ java/org/apache/catalina/startup/ java/org/apache/jasper/compiler/ res/maven/ webapps/docs/

2014-04-04 Thread Mark Thomas
On 04/04/2014 17:46, kkoli...@apache.org wrote:
> Author: kkolinko
> Date: Fri Apr  4 16:46:37 2014
> New Revision: 1584806
> 
> URL: http://svn.apache.org/r1584806
> Log:
> Revert r1584800.
> It was:
> Fix http://issues.apache.org/bugzilla/show_bug.cgi?id=56283
> Add Java 8 support to Jasper's default configuration
> 
> It does not compile with JDK 1.5.0_20:
> There is a problem with org.eclipse.jdt.core.compiler.IProblem class 
> (imported by Jasper's JDTCompiler)
> [javac] class file has wrong version 50.0, should be 49.0

Hmm. That is annoying. We can't build or ship Tomcat 6 with this version
of JDT. However, I wonder if we can make all the other changes apart
from changing the JDT JAR so that users that want to use Tomcat 6 with
Java 8 can do so by replacing the JDT JAR.

On the other hand, if someone is going to update the JVM to Java 8 then
they may as well update Tomcat to 7.0.x or later at the same time. On
that basis I wonder if there is much point in trying to support Java 8
in Tomcat 6 at all.

Thoughts?

Mark


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



[Bug 56283] Add support for Java 8 to Jasper

2014-04-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56283

--- Comment #3 from Konstantin Kolinko  ---
Created attachment 31476
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31476&action=edit
2014-04-04_56283_tc6_v2.patch

Patch for Tomcat 6:
Add support for running Tomcat 6 with ecj-P20140317-1600.jar (as drop-in
replacement for ecj-4.3.1.jar). Add support for value "1.8" for the
compilerSourceVM and compilerTargetVM options.

Note that, per previous comments, ecj-P20140317-1600.jar can only be used when
running with Java 6 or later. The "1.8" options make sense only when running
with Java 8 (or later).

-- 
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 commit: r1584806 - in /tomcat/tc6.0.x/trunk: ./ java/org/apache/catalina/startup/ java/org/apache/jasper/compiler/ res/maven/ webapps/docs/

2014-04-04 Thread Konstantin Kolinko
2014-04-04 23:10 GMT+04:00 Mark Thomas :
> On 04/04/2014 17:46, kkoli...@apache.org wrote:
>> Author: kkolinko
>> Date: Fri Apr  4 16:46:37 2014
>> New Revision: 1584806
>>
>> URL: http://svn.apache.org/r1584806
>> Log:
>> Revert r1584800.
>> It was:
>> Fix http://issues.apache.org/bugzilla/show_bug.cgi?id=56283
>> Add Java 8 support to Jasper's default configuration
>>
>> It does not compile with JDK 1.5.0_20:
>> There is a problem with org.eclipse.jdt.core.compiler.IProblem class 
>> (imported by Jasper's JDTCompiler)
>> [javac] class file has wrong version 50.0, should be 49.0
>
> Hmm. That is annoying. We can't build or ship Tomcat 6 with this version
> of JDT. However, I wonder if we can make all the other changes apart
> from changing the JDT JAR so that users that want to use Tomcat 6 with
> Java 8 can do so by replacing the JDT JAR.
>

I attached the patch ("v2") to Bugzilla.

It does compile etc., but I have not tested it with Java 8 yet.

> On the other hand, if someone is going to update the JVM to Java 8 then
> they may as well update Tomcat to 7.0.x or later at the same time. On
> that basis I wonder if there is much point in trying to support Java 8
> in Tomcat 6 at all.

It makes sense to support dropping-in of later versions of ECJ, in
case the current version has some bugs.

I see little practical sense in supporting
compilerSourceVM/compilerTargetVM = 1.8 in Tomcat 6, but technically I
have no objections if somebody wants this feature.

For the record:
ECJ 4.3.2 is OK to be used as replacement for 4.3.1 - it has the same
mix of 1.2/1.6 classes.

ECJ 4.4M6 uses 1.6 for all classes.

https://people.apache.org/~kkolinko/patches/jarcheck/

Best regards,
Konstantin Kolinko


>
> Thoughts?
>
> Mark
>
>
> -
> 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



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

2014-04-04 Thread markt
Author: markt
Date: Fri Apr  4 20:25:31 2014
New Revision: 1584888

URL: http://svn.apache.org/r1584888
Log:
Tweak the proposal to address the concern raised.

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=1584888&r1=1584887&r2=1584888&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Apr  4 20:25:31 2014
@@ -47,6 +47,12 @@ PATCHES PROPOSED TO BACKPORT:
   Those are input streams that are read, not written. Nothing
   should really happen when those are closed.
   remm: no need to add i18n for something that will not happen
+  markt: Not logging exceptions on close is consistent with the code prior
+ to this patch. While I'm not convinced of the need, I'm happy to
+ replace each of those two // Ignore lines with these three lines:
+ if (debug > 10) {
+ log(e.getMessage(), e);
+ }
   -1:
 
 * Fix http://issues.apache.org/bugzilla/show_bug.cgi?id=56283



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



svn commit: r1584899 - /tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

2014-04-04 Thread kkolinko
Author: kkolinko
Date: Fri Apr  4 20:33:50 2014
New Revision: 1584899

URL: http://svn.apache.org/r1584899
Log:
Reorder by issue number

Modified:
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=1584899&r1=1584898&r2=1584899&view=diff
==
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Fri Apr  4 20:33:50 2014
@@ -47,16 +47,16 @@
   
 
   
+56082: Fix a concurrency bug in JULI's LogManager
+implementation. (markt)
+  
+  
 56236: Enable Tomcat to work with alternative Servlet and
 JSP API JARs that package the XML schemas in such as way as to require
 a dependency on the JSP API before enabling validation for web.xml.
 Tomcat has no such dependency. (markt)
   
   
-56082: Fix a concurrency bug in JULI's LogManager
-implementation. (markt)
-  
-  
 Change the default value of the xmlBlockExternal attribute
 of Context elements. It is now true. (kkolinko) 
   



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



svn commit: r1584904 - in /tomcat/trunk: java/org/apache/coyote/http11/Http11Nio2Processor.java java/org/apache/coyote/http11/InternalNio2InputBuffer.java java/org/apache/coyote/http11/InternalNio2Out

2014-04-04 Thread remm
Author: remm
Date: Fri Apr  4 20:48:55 2014
New Revision: 1584904

URL: http://svn.apache.org/r1584904
Log:
Fix trigger of the read event (so registerForEvent is actually useful).

Modified:
tomcat/trunk/java/org/apache/coyote/http11/Http11Nio2Processor.java
tomcat/trunk/java/org/apache/coyote/http11/InternalNio2InputBuffer.java
tomcat/trunk/java/org/apache/coyote/http11/InternalNio2OutputBuffer.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Nio2Processor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11Nio2Processor.java?rev=1584904&r1=1584903&r2=1584904&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11Nio2Processor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11Nio2Processor.java Fri Apr 
 4 20:48:55 2014
@@ -144,8 +144,12 @@ public class Http11Nio2Processor extends
 
 @Override
 protected void registerForEvent(boolean read, boolean write) {
-// Nothing to do here, the appropriate operations should
-// already be pending
+if (read) {
+((InternalNio2InputBuffer) inputBuffer).registerReadInterest();
+}
+if (write) {
+((InternalNio2OutputBuffer) outputBuffer).registerWriteInterest();
+}
 }
 
 

Modified: 
tomcat/trunk/java/org/apache/coyote/http11/InternalNio2InputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNio2InputBuffer.java?rev=1584904&r1=1584903&r2=1584904&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/InternalNio2InputBuffer.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalNio2InputBuffer.java Fri 
Apr  4 20:48:55 2014
@@ -153,6 +153,11 @@ public class InternalNio2InputBuffer ext
 private int socketReadBufferSize;
 
 /**
+ * Track write interest
+ */
+protected volatile boolean interest = false;
+
+/**
  * The completion handler used for asynchronous read operations
  */
 private CompletionHandler> 
completionHandler;
@@ -202,6 +207,7 @@ public class InternalNio2InputBuffer ext
 headerData.recycle();
 readPending = false;
 flipped = false;
+interest = false;
 e = null;
 }
 
@@ -222,6 +228,7 @@ public class InternalNio2InputBuffer ext
 parsingRequestLineStart = 0;
 parsingRequestLineQPos = -1;
 headerData.recycle();
+interest = false;
 }
 
 /**
@@ -757,7 +764,8 @@ public class InternalNio2InputBuffer ext
 failed(new 
EOFException(sm.getString("iib.eof.error")), attachment);
 } else {
 readPending = false;
-if (!Nio2Endpoint.isInline()) {
+if ((request.getReadListener() == null || interest) && 
!Nio2Endpoint.isInline()) {
+interest = false;
 notify = true;
 }
 }
@@ -892,6 +900,18 @@ public class InternalNio2InputBuffer ext
 }
 
 
+public void registerReadInterest() {
+synchronized (completionHandler) {
+if (readPending) {
+interest = true;
+} else {
+// If no write is pending, notify
+endpoint.processSocket(socket, SocketStatus.OPEN_READ, true);
+}
+}
+}
+
+
 // - InputStreamInputBuffer Inner Class
 
 

Modified: 
tomcat/trunk/java/org/apache/coyote/http11/InternalNio2OutputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNio2OutputBuffer.java?rev=1584904&r1=1584903&r2=1584904&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/InternalNio2OutputBuffer.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalNio2OutputBuffer.java 
Fri Apr  4 20:48:55 2014
@@ -474,7 +474,7 @@ public class InternalNio2OutputBuffer ex
 
 
 @Override
-protected void registerWriteInterest() throws IOException {
+public void registerWriteInterest() {
 synchronized (completionHandler) {
 if (writePending.availablePermits() == 0) {
 interest = true;

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1584904&r1=1584903&r2=1584904&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Apr  4 20:48:55 2014
@@ -86,6 +86,9 @@
   
 Code cleanups and i18n in NIO2. (remm

[Bug 56339] session listener invalidate session

2014-04-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56339

Mark Thomas  changed:

   What|Removed |Added

 Status|NEEDINFO|NEW

--- Comment #3 from Mark Thomas  ---
There should be no need to call session.invalidate() from the session destroyed
event. However, entering an infinite loop if application code does do this is
far from ideal.

This is a side-effect of the fix for bug 55521. I'll look into a fix.

-- 
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: r1584915 - in /tomcat/trunk: java/org/apache/catalina/session/StandardSession.java webapps/docs/changelog.xml

2014-04-04 Thread markt
Author: markt
Date: Fri Apr  4 21:19:58 2014
New Revision: 1584915

URL: http://svn.apache.org/r1584915
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56339
Avoid an infinite loop if an application calls session.invalidate() from the 
session destroyed event for that session.

Modified:
tomcat/trunk/java/org/apache/catalina/session/StandardSession.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/session/StandardSession.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/StandardSession.java?rev=1584915&r1=1584914&r2=1584915&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/session/StandardSession.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/session/StandardSession.java Fri Apr  
4 21:19:58 2014
@@ -808,7 +808,9 @@ public class StandardSession implements 
 synchronized (this) {
 // Check again, now we are inside the sync so this code only runs 
once
 // Double check locking - isValid needs to be volatile
-if (!isValid)
+// The check of expiring is to ensure that an infinite loop is not
+// entered as per bug 56339
+if (expiring || !isValid)
 return;
 
 if (manager == null)

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1584915&r1=1584914&r2=1584915&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Apr  4 21:19:58 2014
@@ -70,6 +70,11 @@
 the expanded directory is deleted first, any attempt to load a new 
class
 during undeploy will fail. (markt)
   
+  
+56339: Avoid an infinite loop if an application calls
+session.invalidate() from the session destroyed event for
+that session. (markt)
+  
 
   
   



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



svn commit: r1584919 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/session/StandardSession.java webapps/docs/changelog.xml

2014-04-04 Thread markt
Author: markt
Date: Fri Apr  4 21:24:31 2014
New Revision: 1584919

URL: http://svn.apache.org/r1584919
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56339
Avoid an infinite loop if an application calls session.invalidate() from the 
session destroyed event for that session.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/session/StandardSession.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1584915

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/session/StandardSession.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/session/StandardSession.java?rev=1584919&r1=1584918&r2=1584919&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/session/StandardSession.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/session/StandardSession.java 
Fri Apr  4 21:24:31 2014
@@ -760,7 +760,9 @@ public class StandardSession implements 
 synchronized (this) {
 // Check again, now we are inside the sync so this code only runs 
once
 // Double check locking - isValid needs to be volatile
-if (!isValid)
+// The check of expiring is to ensure that an infinite loop is not
+// entered as per bug 56339
+if (expiring || !isValid)
 return;
 
 if (manager == null)

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1584919&r1=1584918&r2=1584919&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Fri Apr  4 21:24:31 2014
@@ -73,6 +73,11 @@
 the expanded directory is deleted first, any attempt to load a new 
class
 during undeploy will fail. (markt)
   
+  
+56339: Avoid an infinite loop if an application calls
+session.invalidate() from the session destroyed event for
+that session. (markt)
+  
 
   
   



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



[Bug 56339] session listener invalidate session

2014-04-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56339

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Mark Thomas  ---
This has been fixed in 8.0.x for 8.0.6 onwards and in 7.0.x 7.0.54 onwards.

-- 
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: r1584922 - in /tomcat/trunk: java/org/apache/tomcat/websocket/WsWebSocketContainer.java webapps/docs/changelog.xml

2014-04-04 Thread markt
Author: markt
Date: Fri Apr  4 21:36:41 2014
New Revision: 1584922

URL: http://svn.apache.org/r1584922
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56343
Avoid NPE if WebSocket API JAR from RI is used.

Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: 
tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java?rev=1584922&r1=1584921&r2=1584922&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java Fri 
Apr  4 21:36:41 2014
@@ -190,8 +190,12 @@ public class WsWebSocketContainer
 }
 }
 
-ClientEndpointConfig config = ClientEndpointConfig.Builder.create().
-configurator(configurator).
+ClientEndpointConfig.Builder builder = 
ClientEndpointConfig.Builder.create();
+// Avoid NPE when using RI API JAR - see BZ 56343
+if (configurator != null) {
+builder.configurator(configurator);
+}
+ClientEndpointConfig config = builder.
 decoders(Arrays.asList(annotation.decoders())).
 encoders(Arrays.asList(annotation.encoders())).
 build();

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1584922&r1=1584921&r2=1584922&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Apr  4 21:36:41 2014
@@ -138,6 +138,15 @@
   
 
   
+  
+
+  
+56343: Avoid a NPE if Tomcat's Java WebSocket 1.0
+implementation is used with the Java WebSocket 1.0 API JAR from the
+reference implementation. (markt)
+  
+
+  
   
 
   



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



[Bug 56343] NPE in org.apache.tomcat.websocket.WsWebSocketContainer.connectToServer

2014-04-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56343

Mark Thomas  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

--- Comment #9 from Mark Thomas  ---
This has been fixed in 8.0.x for 8.0.6 onwards and in 7.0.x 7.0.54 onwards.

-- 
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: r1584924 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/websocket/WsWebSocketContainer.java webapps/docs/changelog.xml

2014-04-04 Thread markt
Author: markt
Date: Fri Apr  4 21:38:01 2014
New Revision: 1584924

URL: http://svn.apache.org/r1584924
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56343
Avoid NPE if WebSocket API JAR from RI is used.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1584922

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java?rev=1584924&r1=1584923&r2=1584924&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java 
Fri Apr  4 21:38:01 2014
@@ -193,8 +193,12 @@ public class WsWebSocketContainer
 }
 }
 
-ClientEndpointConfig config = ClientEndpointConfig.Builder.create().
-configurator(configurator).
+ClientEndpointConfig.Builder builder = 
ClientEndpointConfig.Builder.create();
+// Avoid NPE when using RI API JAR - see BZ 56343
+if (configurator != null) {
+builder.configurator(configurator);
+}
+ClientEndpointConfig config = builder.
 decoders(Arrays.asList(annotation.decoders())).
 encoders(Arrays.asList(annotation.encoders())).
 build();

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1584924&r1=1584923&r2=1584924&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Fri Apr  4 21:38:01 2014
@@ -114,6 +114,15 @@
   
 
   
+  
+
+  
+56343: Avoid a NPE if Tomcat's Java WebSocket 1.0
+implementation is used with the Java WebSocket 1.0 API JAR from the
+reference implementation. (markt)
+  
+
+  
   
 
   



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



svn commit: r1584925 - in /tomcat/trunk: java/org/apache/catalina/mbeans/ServiceMBean.java webapps/docs/changelog.xml

2014-04-04 Thread markt
Author: markt
Date: Fri Apr  4 21:42:51 2014
New Revision: 1584925

URL: http://svn.apache.org/r1584925
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56327
Enable AJP as well as HTTP connectors to be created via JMX. Patch by kiran.

Modified:
tomcat/trunk/java/org/apache/catalina/mbeans/ServiceMBean.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/mbeans/ServiceMBean.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/ServiceMBean.java?rev=1584925&r1=1584924&r2=1584925&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/mbeans/ServiceMBean.java (original)
+++ tomcat/trunk/java/org/apache/catalina/mbeans/ServiceMBean.java Fri Apr  4 
21:42:51 2014
@@ -59,14 +59,12 @@ public class ServiceMBean extends BaseMo
 } catch (InvalidTargetObjectTypeException e) {
 throw new MBeanException(e);
 }
-
-Connector connector = new Connector();
+String protocol = isAjp ? "AJP/1.3" : "HTTP/1.1";
+Connector connector = new Connector(protocol);
 if ((address!=null) && (address.length()>0)) {
 connector.setProperty("address", address);
 }
-
 connector.setPort(port);
-connector.setProtocol(isAjp ? "AJP/1.3" : "HTTP/1.1");
 connector.setSecure(isSSL);
 connector.setScheme(isSSL ? "https" : "http");
 

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1584925&r1=1584924&r2=1584925&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Apr  4 21:42:51 2014
@@ -71,6 +71,10 @@
 during undeploy will fail. (markt)
   
   
+56327: Enable AJP as well as HTTP connectors to be created
+via JMX. Patch by kiran. (markt)
+  
+  
 56339: Avoid an infinite loop if an application calls
 session.invalidate() from the session destroyed event for
 that session. (markt)



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



[Bug 56327] Adding non HTTP (e.g AJP) connector using MBeans is not possible

2014-04-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56327

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from Mark Thomas  ---
Thanks for the report and the fix.

Patches should be provided in diff -u format rather than as full files as this
makes them easier to review.

The patch has been applied to 8.0.x and will be included in 8.0.6 onwards.

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