svn commit: r1358560 - in /tomcat/trunk: java/org/apache/catalina/connector/ java/org/apache/coyote/ java/org/apache/coyote/http11/ test/org/apache/catalina/nonblocking/ webapps/docs/

2012-07-07 Thread markt
Author: markt
Date: Sat Jul  7 13:02:37 2012
New Revision: 1358560

URL: http://svn.apache.org/viewvc?rev=1358560&view=rev
Log:
Fix checkstyle errors

Modified:
tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
tomcat/trunk/java/org/apache/coyote/Response.java
tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java
tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=1358560&r1=1358559&r2=1358560&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Sat Jul  
7 13:02:37 2012
@@ -20,7 +20,6 @@ import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.nio.charset.Charset;
 import java.util.EnumSet;
-import java.util.concurrent.atomic.AtomicBoolean;
 
 import javax.servlet.RequestDispatcher;
 import javax.servlet.SessionTrackingMode;

Modified: tomcat/trunk/java/org/apache/coyote/Response.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/Response.java?rev=1358560&r1=1358559&r2=1358560&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/Response.java (original)
+++ tomcat/trunk/java/org/apache/coyote/Response.java Sat Jul  7 13:02:37 2012
@@ -21,10 +21,8 @@ import java.io.IOException;
 import java.io.StringReader;
 import java.util.Locale;
 
-import javax.servlet.ReadListener;
 import javax.servlet.WriteListener;
 
-import org.apache.coyote.http11.AbstractInputBuffer;
 import org.apache.coyote.http11.AbstractOutputBuffer;
 import org.apache.tomcat.util.buf.ByteChunk;
 import org.apache.tomcat.util.http.MimeHeaders;

Modified: 
tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java?rev=1358560&r1=1358559&r2=1358560&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java Sat 
Jul  7 13:02:37 2012
@@ -21,9 +21,7 @@ import java.io.IOException;
 import java.nio.ByteBuffer;
 import java.nio.channels.SelectionKey;
 import java.nio.channels.Selector;
-import java.util.Collections;
 import java.util.Iterator;
-import java.util.LinkedList;
 import java.util.concurrent.LinkedBlockingDeque;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;

Modified: 
tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java?rev=1358560&r1=1358559&r2=1358560&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java 
Sat Jul  7 13:02:37 2012
@@ -16,9 +16,7 @@
  */
 package org.apache.catalina.nonblocking;
 
-import java.io.BufferedInputStream;
 import java.io.IOException;
-import java.io.InputStream;
 import java.io.OutputStream;
 import java.net.HttpURLConnection;
 import java.net.URL;
@@ -39,6 +37,9 @@ import javax.servlet.annotation.WebServl
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.junit.Assert;
+import org.junit.Test;
+
 import org.apache.catalina.Wrapper;
 import org.apache.catalina.core.StandardContext;
 import org.apache.catalina.startup.BytesStreamer;
@@ -48,8 +49,6 @@ import org.apache.catalina.startup.Tomca
 import org.apache.coyote.http11.Http11NioProtocol;
 import org.apache.tomcat.util.buf.ByteChunk;
 import org.apache.tomcat.util.buf.ByteChunk.ByteOutputChannel;
-import org.junit.Assert;
-import org.junit.Test;
 
 public class TestNonBlockingAPI extends TomcatBaseTest {
 

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1358560&r1=1358559&r2=1358560&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Sat Jul  7 13:02:37 2012
@@ -85,13 +85,13 @@
   
 
   
-The default connector is now the Java NIO connector 
-even when specifying HTTP/1.1 as protocol (fhanik)
+The default connector is now the Java NIO connector even when 
spe

Re: svn commit: r1358055 - in /tomcat/trunk: java/org/apache/catalina/connector/ java/org/apache/catalina/core/ java/org/apache/coyote/ java/org/apache/coyote/ajp/ java/org/apache/coyote/http11/ java/

2012-07-07 Thread Mark Thomas
On 06/07/2012 17:35, Filip Hanik (mailing lists) wrote:
> Turning on Java 7 does change the test landscape.
> Right now, I can get the test suite to run fine on Java 6, but lots of errors 
> on Java 7

Hmm. Not good (that it worked with Java 6 but not Java 7).


I've tracked down the first of these issues. Calling

java.nio.channels.SocketChannel.socket().setTrafficClass()

after

socketChannel.connect()

has been called triggers a SocketException. Moving the setTrafficClass()
call to before connect() fixes the issue.

Tests on Java 6 show that the setTrafficClass() was having no effect if
called after connect(). It looks like Java 7 has started to throw an
exception when the setter has no effect.

On this basis, I' say that this particular issue is a long standing bug
that was masked by Java 6 and is now visible with Java 7.

I'll do a code review and move the setTrafficClass() calls as necessary.

Mark

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



svn commit: r1358586 - in /tomcat/trunk/java/org/apache/catalina/tribes/transport/nio: NioReceiver.java NioSender.java

2012-07-07 Thread markt
Author: markt
Date: Sat Jul  7 15:09:10 2012
New Revision: 1358586

URL: http://svn.apache.org/viewvc?rev=1358586&view=rev
Log:
Java 7 throws an exception when a socket option cannot be set.
Move option setting to before connection is completed since at least one option 
(traffic class) can not be set after the connection is completed.

For NioReceiver, I don't see a way to set traffic class on an accepted 
connection so simply remove it (it is ignored when using Java 6)

Modified:
tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java
tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioSender.java

Modified: 
tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java?rev=1358586&r1=1358585&r2=1358586&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java 
Sat Jul  7 15:09:10 2012
@@ -130,13 +130,19 @@ public class NioReceiver extends Receive
 //set up the datagram channel
 if (this.getUdpPort()>0) {
 datagramChannel = DatagramChannel.open();
-datagramChannel.configureBlocking(false);
+configureDatagraChannel();
 //bind to the address to avoid security checks
 bindUdp(datagramChannel.socket(),getUdpPort(),getAutoBind());
 }
+}
 
-
-
+private void configureDatagraChannel() throws IOException {
+datagramChannel.configureBlocking(false);
+datagramChannel.socket().setSendBufferSize(getUdpTxBufSize());
+datagramChannel.socket().setReceiveBufferSize(getUdpRxBufSize());
+datagramChannel.socket().setReuseAddress(getSoReuseAddress());
+datagramChannel.socket().setSoTimeout(getTimeout());
+datagramChannel.socket().setTrafficClass(getSoTrafficClass());
 }
 
 public void addEvent(Runnable event) {
@@ -242,11 +248,6 @@ public class NioReceiver extends Receive
 
 if (selector!=null && datagramChannel!=null) {
 ObjectReader oreader = new ObjectReader(MAX_UDP_SIZE); //max size 
for a datagram packet
-datagramChannel.socket().setSendBufferSize(getUdpTxBufSize());
-datagramChannel.socket().setReceiveBufferSize(getUdpRxBufSize());
-datagramChannel.socket().setReuseAddress(getSoReuseAddress());
-datagramChannel.socket().setSoTimeout(getTimeout());
-datagramChannel.socket().setTrafficClass(getSoTrafficClass());
 
registerChannel(selector,datagramChannel,SelectionKey.OP_READ,oreader);
 }
 
@@ -279,14 +280,13 @@ public class NioReceiver extends Receive
 if (key.isAcceptable()) {
 ServerSocketChannel server = (ServerSocketChannel) 
key.channel();
 SocketChannel channel = server.accept();
-channel.socket().setReceiveBufferSize(getRxBufSize());
+channel.socket().setReceiveBufferSize(getTxBufSize());
 channel.socket().setSendBufferSize(getTxBufSize());
 channel.socket().setTcpNoDelay(getTcpNoDelay());
 channel.socket().setKeepAlive(getSoKeepAlive());
 channel.socket().setOOBInline(getOoBInline());
 channel.socket().setReuseAddress(getSoReuseAddress());
 
channel.socket().setSoLinger(getSoLingerOn(),getSoLingerTime());
-channel.socket().setTrafficClass(getSoTrafficClass());
 channel.socket().setSoTimeout(getTimeout());
 Object attach = new ObjectReader(channel);
 registerChannel(selector,

Modified: 
tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioSender.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioSender.java?rev=1358586&r1=1358585&r2=1358586&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioSender.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioSender.java 
Sat Jul  7 15:09:10 2012
@@ -20,7 +20,6 @@ package org.apache.catalina.tribes.trans
 import java.io.EOFException;
 import java.io.IOException;
 import java.net.InetSocketAddress;
-import java.net.SocketException;
 import java.nio.ByteBuffer;
 import java.nio.channels.DatagramChannel;
 import java.nio.channels.SelectionKey;
@@ -132,13 +131,9 @@ public class NioSender extends AbstractS
 return false;
 }
 
-private void completeConnect() throws SocketException {
-//we connected, register ourse

svn commit: r1358590 - /tomcat/trunk/webapps/docs/config/cluster-receiver.xml

2012-07-07 Thread markt
Author: markt
Date: Sat Jul  7 15:26:51 2012
New Revision: 1358590

URL: http://svn.apache.org/viewvc?rev=1358590&view=rev
Log:
Note soTrafficClass is ignored for nio

Modified:
tomcat/trunk/webapps/docs/config/cluster-receiver.xml

Modified: tomcat/trunk/webapps/docs/config/cluster-receiver.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/cluster-receiver.xml?rev=1358590&r1=1358589&r2=1358590&view=diff
==
--- tomcat/trunk/webapps/docs/config/cluster-receiver.xml (original)
+++ tomcat/trunk/webapps/docs/config/cluster-receiver.xml Sat Jul  7 15:26:51 
2012
@@ -145,7 +145,8 @@
 
  Sets the traffic class level for the socket, the value is between 0 and 
255.
  Different values are defined in http://docs.oracle.com/javase/6/docs/api/java/net/Socket.html#setTrafficClass(int)">
- java.net.Socket#setTrafficClass(int).
+ java.net.Socket#setTrafficClass(int). Note that this option is ignored
+ for the NioReceiver implementation.
 
 
  Boolean value for the socket TCP_NODELAY option. Possible values are 
true or false.



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



svn commit: r1358591 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/tribes/transport/nio/NioReceiver.java java/org/apache/catalina/tribes/transport/nio/NioSender.java webapps/docs/changelog.x

2012-07-07 Thread markt
Author: markt
Date: Sat Jul  7 15:27:33 2012
New Revision: 1358591

URL: http://svn.apache.org/viewvc?rev=1358591&view=rev
Log:
Java 7 throws an exception when a socket option cannot be set.
Move option setting to before connection is completed since at least one option 
(traffic class) can not be set after the connection is completed.
For NioReceiver, I don't see a way to set traffic class on an accepted 
connection so simply remove it (it is ignored when using Java 6)

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

tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java

tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/NioSender.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc7.0.x/trunk/webapps/docs/config/cluster-receiver.xml

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1358586,1358590

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java?rev=1358591&r1=1358590&r2=1358591&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java
 Sat Jul  7 15:27:33 2012
@@ -149,13 +149,19 @@ public class NioReceiver extends Receive
 //set up the datagram channel
 if (this.getUdpPort()>0) {
 datagramChannel = DatagramChannel.open();
-datagramChannel.configureBlocking(false);
+configureDatagraChannel();
 //bind to the address to avoid security checks
 bindUdp(datagramChannel.socket(),getUdpPort(),getAutoBind());
 }
+}
 
-
-
+private void configureDatagraChannel() throws IOException {
+datagramChannel.configureBlocking(false);
+datagramChannel.socket().setSendBufferSize(getUdpTxBufSize());
+datagramChannel.socket().setReceiveBufferSize(getUdpRxBufSize());
+datagramChannel.socket().setReuseAddress(getSoReuseAddress());
+datagramChannel.socket().setSoTimeout(getTimeout());
+datagramChannel.socket().setTrafficClass(getSoTrafficClass());
 }
 
 public void addEvent(Runnable event) {
@@ -261,11 +267,6 @@ public class NioReceiver extends Receive
 
 if (selector!=null && datagramChannel!=null) {
 ObjectReader oreader = new ObjectReader(MAX_UDP_SIZE); //max size 
for a datagram packet
-datagramChannel.socket().setSendBufferSize(getUdpTxBufSize());
-datagramChannel.socket().setReceiveBufferSize(getUdpRxBufSize());
-datagramChannel.socket().setReuseAddress(getSoReuseAddress());
-datagramChannel.socket().setSoTimeout(getTimeout());
-datagramChannel.socket().setTrafficClass(getSoTrafficClass());
 
registerChannel(selector,datagramChannel,SelectionKey.OP_READ,oreader);
 }
 
@@ -298,14 +299,13 @@ public class NioReceiver extends Receive
 if (key.isAcceptable()) {
 ServerSocketChannel server = (ServerSocketChannel) 
key.channel();
 SocketChannel channel = server.accept();
-channel.socket().setReceiveBufferSize(getRxBufSize());
+channel.socket().setReceiveBufferSize(getTxBufSize());
 channel.socket().setSendBufferSize(getTxBufSize());
 channel.socket().setTcpNoDelay(getTcpNoDelay());
 channel.socket().setKeepAlive(getSoKeepAlive());
 channel.socket().setOOBInline(getOoBInline());
 channel.socket().setReuseAddress(getSoReuseAddress());
 
channel.socket().setSoLinger(getSoLingerOn(),getSoLingerTime());
-channel.socket().setTrafficClass(getSoTrafficClass());
 channel.socket().setSoTimeout(getTimeout());
 Object attach = new ObjectReader(channel);
 registerChannel(selector,

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/NioSender.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/NioSender.java?rev=1358591&r1=1358590&r2=1358591&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/NioSender.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/NioSender.java
 Sat Jul  7 15:27:33 2012
@@ -20,7 +20,6 @@ package org.apache.catalina.tribes.trans
 import java.io.EOFException;
 imp

[Bug 53367] Database failure may cause pool to hang

2012-07-07 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53367

monteslu  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 CC||monte...@gmail.com
 Resolution|FIXED   |---

--- Comment #2 from monteslu  ---
I don't believe this is fixed.  Pulled down from svn trunk, buit, and can still
easily reproduce.

-- 
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: r1358612 - in /tomcat/trunk: java/org/apache/catalina/tribes/transport/bio/BioReceiver.java webapps/docs/config/cluster-receiver.xml

2012-07-07 Thread markt
Author: markt
Date: Sat Jul  7 18:30:50 2012
New Revision: 1358612

URL: http://svn.apache.org/viewvc?rev=1358612&view=rev
Log:
Further testing shows that this has no affect for BIO for a socket returned via 
accept()

Modified:
tomcat/trunk/java/org/apache/catalina/tribes/transport/bio/BioReceiver.java
tomcat/trunk/webapps/docs/config/cluster-receiver.xml

Modified: 
tomcat/trunk/java/org/apache/catalina/tribes/transport/bio/BioReceiver.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/transport/bio/BioReceiver.java?rev=1358612&r1=1358611&r2=1358612&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/tribes/transport/bio/BioReceiver.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/transport/bio/BioReceiver.java 
Sat Jul  7 18:30:50 2012
@@ -143,7 +143,6 @@ public class BioReceiver extends Receive
 socket.setOOBInline(getOoBInline());
 socket.setReuseAddress(getSoReuseAddress());
 socket.setSoLinger(getSoLingerOn(),getSoLingerTime());
-socket.setTrafficClass(getSoTrafficClass());
 socket.setSoTimeout(getTimeout());
 ObjectReader reader = new ObjectReader(socket);
 task.serviceSocket(socket,reader);

Modified: tomcat/trunk/webapps/docs/config/cluster-receiver.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/cluster-receiver.xml?rev=1358612&r1=1358611&r2=1358612&view=diff
==
--- tomcat/trunk/webapps/docs/config/cluster-receiver.xml (original)
+++ tomcat/trunk/webapps/docs/config/cluster-receiver.xml Sat Jul  7 18:30:50 
2012
@@ -142,12 +142,6 @@
 
  Boolean value for the socket SO_REUSEADDR option. Possible values are 
true or false.
 
-
- Sets the traffic class level for the socket, the value is between 0 and 
255.
- Different values are defined in http://docs.oracle.com/javase/6/docs/api/java/net/Socket.html#setTrafficClass(int)">
- java.net.Socket#setTrafficClass(int). Note that this option is ignored
- for the NioReceiver implementation.
-
 
  Boolean value for the socket TCP_NODELAY option. Possible values are 
true or false.
  The default value is true



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



svn commit: r1358613 - in /tomcat/trunk: java/org/apache/tomcat/util/net/SocketProperties.java res/ide-support/eclipse/start-tomcat.launch res/ide-support/eclipse/stop-tomcat.launch webapps/docs/confi

2012-07-07 Thread markt
Author: markt
Date: Sat Jul  7 18:33:16 2012
New Revision: 1358613

URL: http://svn.apache.org/viewvc?rev=1358613&view=rev
Log:
Cannot set traffic class on a socket returned from accept().
On Java 6 it is always ignored.
On Java 7 BIO ignores it, NIO throws an Exception

Removed:
tomcat/trunk/res/ide-support/eclipse/start-tomcat.launch
tomcat/trunk/res/ide-support/eclipse/stop-tomcat.launch
Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java
tomcat/trunk/webapps/docs/config/ajp.xml
tomcat/trunk/webapps/docs/config/http.xml

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java?rev=1358613&r1=1358612&r2=1358613&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java Sat Jul  
7 18:33:16 2012
@@ -139,16 +139,6 @@ public class SocketProperties {
 protected Integer soTimeout = new Integer(2);
 
 /**
- * Traffic class option, value between 0 and 255
- * IPTOS_LOWCOST (0x02)
- * IPTOS_RELIABILITY (0x04)
- * IPTOS_THROUGHPUT (0x08)
- * IPTOS_LOWDELAY (0x10)
- * JVM default used if not set
- */
-protected Integer soTrafficClass = null;
-
-/**
  * Performance preferences according to
  * 
http://docs.oracle.com/javase/1.5.0/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int)
  * All three performance attributes must be set or the JVM defaults will be
@@ -207,8 +197,6 @@ public class SocketProperties {
 socket.setSoTimeout(soTimeout.intValue());
 if (tcpNoDelay != null)
 socket.setTcpNoDelay(tcpNoDelay.booleanValue());
-if (soTrafficClass != null)
-socket.setTrafficClass(soTrafficClass.intValue());
 }
 
 public void setProperties(ServerSocket socket) throws SocketException{
@@ -271,10 +259,6 @@ public class SocketProperties {
 return soTimeout.intValue();
 }
 
-public int getSoTrafficClass() {
-return soTrafficClass.intValue();
-}
-
 public boolean getTcpNoDelay() {
 return tcpNoDelay.booleanValue();
 }
@@ -332,10 +316,6 @@ public class SocketProperties {
 this.tcpNoDelay = Boolean.valueOf(tcpNoDelay);
 }
 
-public void setSoTrafficClass(int soTrafficClass) {
-this.soTrafficClass = Integer.valueOf(soTrafficClass);
-}
-
 public void setSoTimeout(int soTimeout) {
 this.soTimeout = Integer.valueOf(soTimeout);
 }

Modified: tomcat/trunk/webapps/docs/config/ajp.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/ajp.xml?rev=1358613&r1=1358612&r2=1358613&view=diff
==
--- tomcat/trunk/webapps/docs/config/ajp.xml (original)
+++ tomcat/trunk/webapps/docs/config/ajp.xml Sat Jul  7 18:33:16 2012
@@ -479,14 +479,6 @@
 This is equivalent to standard attribute
 connectionTimeout.
   
-  
-(byte)Value between 0 and 255 for the
-traffic class on the socket. JVM default used if not set.
-Note: On some JDK versions, setting
-soTrafficClass causes a problem. A work around for 
this
-is to add the -Djava.net.preferIPv4Stack=true value to 
your
-JVM options.
-  
   
 (int)The first value for the performance settings. See
 http://docs.oracle.com/javase/6/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int)">Socket
 Performance Options

Modified: tomcat/trunk/webapps/docs/config/http.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/http.xml?rev=1358613&r1=1358612&r2=1358613&view=diff
==
--- tomcat/trunk/webapps/docs/config/http.xml (original)
+++ tomcat/trunk/webapps/docs/config/http.xml Sat Jul  7 18:33:16 2012
@@ -558,14 +558,6 @@
 This is equivalent to standard attribute
 connectionTimeout.
   
-  
-(byte)Value between 0 and 255 for the
-traffic class on the socket. JVM default used if not set.
-Note: On some JDK versions, setting
-soTrafficClass causes a problem. A work around for 
this
-is to add the -Djava.net.preferIPv4Stack=true value to 
your
-JVM options.
-  
   
 (int)The first value for the performance settings. See
 http://docs.oracle.com/javase/6/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int)">Socket
 Performance Options



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



svn commit: r1358615 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/tribes/transport/bio/BioReceiver.java webapps/docs/changelog.xml webapps/docs/config/cluster-receiver.xml

2012-07-07 Thread markt
Author: markt
Date: Sat Jul  7 18:39:48 2012
New Revision: 1358615

URL: http://svn.apache.org/viewvc?rev=1358615&view=rev
Log:
Further testing shows that this has no affect for BIO for a socket returned via 
accept()

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

tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/BioReceiver.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc7.0.x/trunk/webapps/docs/config/cluster-receiver.xml

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

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/BioReceiver.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/BioReceiver.java?rev=1358615&r1=1358614&r2=1358615&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/BioReceiver.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/BioReceiver.java
 Sat Jul  7 18:39:48 2012
@@ -143,7 +143,6 @@ public class BioReceiver extends Receive
 socket.setOOBInline(getOoBInline());
 socket.setReuseAddress(getSoReuseAddress());
 socket.setSoLinger(getSoLingerOn(),getSoLingerTime());
-socket.setTrafficClass(getSoTrafficClass());
 socket.setSoTimeout(getTimeout());
 ObjectReader reader = new ObjectReader(socket);
 task.serviceSocket(socket,reader);

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=1358615&r1=1358614&r2=1358615&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Sat Jul  7 18:39:48 2012
@@ -73,8 +73,9 @@
   
 Fix an issue when running under Java 7 which throws exceptions when
 trying to set an invalid option whereas Java 6 silently swallowed them.
-The option using the problem was soTrafficClass. Note that
-soTrafficClass is ignored for the NioReceiver. (markt)
+The option using the problem was soTrafficClass.
+Investigations showed that this option had no effect for Cluster 
Channel
+Receivers it was removed. (markt)
   
 
   

Modified: tomcat/tc7.0.x/trunk/webapps/docs/config/cluster-receiver.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/config/cluster-receiver.xml?rev=1358615&r1=1358614&r2=1358615&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/config/cluster-receiver.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/config/cluster-receiver.xml Sat Jul  7 
18:39:48 2012
@@ -142,12 +142,6 @@
 
  Boolean value for the socket SO_REUSEADDR option. Possible values are 
true or false.
 
-
- Sets the traffic class level for the socket, the value is between 0 and 
255.
- Different values are defined in http://docs.oracle.com/javase/6/docs/api/java/net/Socket.html#setTrafficClass(int)">
- java.net.Socket#setTrafficClass(int). Note that this option is ignored
- for the NioReceiver implementation.
-
 
  Boolean value for the socket TCP_NODELAY option. Possible values are 
true or false.
  The default value is true



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



Re: svn commit: r1358613 - in /tomcat/trunk: java/org/apache/tomcat/util/net/SocketProperties.java res/ide-support/eclipse/start-tomcat.launch res/ide-support/eclipse/stop-tomcat.launch webapps/docs/c

2012-07-07 Thread Mark Thomas
On 07/07/2012 19:33, ma...@apache.org wrote:
> Author: markt
> Date: Sat Jul  7 18:33:16 2012
> New Revision: 1358613
> 
> URL: http://svn.apache.org/viewvc?rev=1358613&view=rev
> Log:
> Cannot set traffic class on a socket returned from accept().
> On Java 6 it is always ignored.
> On Java 7 BIO ignores it, NIO throws an Exception
> 
> Removed:
> tomcat/trunk/res/ide-support/eclipse/start-tomcat.launch
> tomcat/trunk/res/ide-support/eclipse/stop-tomcat.launch

Whoops. That was not intentional. I'll restore those shortly.

Mark

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



svn commit: r1358617 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/net/SocketProperties.java webapps/docs/changelog.xml webapps/docs/config/ajp.xml webapps/docs/config/http.xml

2012-07-07 Thread markt
Author: markt
Date: Sat Jul  7 18:44:54 2012
New Revision: 1358617

URL: http://svn.apache.org/viewvc?rev=1358617&view=rev
Log:
Cannot set traffic class on a socket returned from accept().
On Java 6 it is always ignored.
On Java 7 BIO ignores it, NIO throws an Exception

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SocketProperties.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc7.0.x/trunk/webapps/docs/config/ajp.xml
tomcat/tc7.0.x/trunk/webapps/docs/config/http.xml

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

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SocketProperties.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SocketProperties.java?rev=1358617&r1=1358616&r2=1358617&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SocketProperties.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SocketProperties.java 
Sat Jul  7 18:44:54 2012
@@ -139,16 +139,6 @@ public class SocketProperties {
 protected Integer soTimeout = new Integer(2);
 
 /**
- * Traffic class option, value between 0 and 255
- * IPTOS_LOWCOST (0x02)
- * IPTOS_RELIABILITY (0x04)
- * IPTOS_THROUGHPUT (0x08)
- * IPTOS_LOWDELAY (0x10)
- * JVM default used if not set
- */
-protected Integer soTrafficClass = null;
-
-/**
  * Performance preferences according to
  * 
http://docs.oracle.com/javase/1.5.0/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int)
  * All three performance attributes must be set or the JVM defaults will be
@@ -207,8 +197,6 @@ public class SocketProperties {
 socket.setSoTimeout(soTimeout.intValue());
 if (tcpNoDelay != null)
 socket.setTcpNoDelay(tcpNoDelay.booleanValue());
-if (soTrafficClass != null)
-socket.setTrafficClass(soTrafficClass.intValue());
 }
 
 public void setProperties(ServerSocket socket) throws SocketException{
@@ -271,10 +259,6 @@ public class SocketProperties {
 return soTimeout.intValue();
 }
 
-public int getSoTrafficClass() {
-return soTrafficClass.intValue();
-}
-
 public boolean getTcpNoDelay() {
 return tcpNoDelay.booleanValue();
 }
@@ -332,10 +316,6 @@ public class SocketProperties {
 this.tcpNoDelay = Boolean.valueOf(tcpNoDelay);
 }
 
-public void setSoTrafficClass(int soTrafficClass) {
-this.soTrafficClass = Integer.valueOf(soTrafficClass);
-}
-
 public void setSoTimeout(int soTimeout) {
 this.soTimeout = Integer.valueOf(soTimeout);
 }

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=1358617&r1=1358616&r2=1358617&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Sat Jul  7 18:44:54 2012
@@ -68,6 +68,15 @@
   
 
   
+  
+
+  
+Remove the socket.soTrafficClass from the BIO and NIO
+HTTP and AJP connectors because any use of the option is either ignored
+or in some cases (Java 7 with NIO) throws an Exception. (mark)
+  
+
+  
   
 
   

Modified: tomcat/tc7.0.x/trunk/webapps/docs/config/ajp.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/config/ajp.xml?rev=1358617&r1=1358616&r2=1358617&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/config/ajp.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/config/ajp.xml Sat Jul  7 18:44:54 2012
@@ -479,14 +479,6 @@
 This is equivalent to standard attribute
 connectionTimeout.
   
-  
-(byte)Value between 0 and 255 for the
-traffic class on the socket. JVM default used if not set.
-Note: On some JDK versions, setting
-soTrafficClass causes a problem. A work around for 
this
-is to add the -Djava.net.preferIPv4Stack=true value to 
your
-JVM options.
-  
   
 (int)The first value for the performance settings. See
 http://docs.oracle.com/javase/6/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int)">Socket
 Performance Options

Modified: tomcat/tc7.0.x/trunk/webapps/docs/config/http.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/config/http.xml?rev=1358617&r1=1358616&r2=1358617&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/config/http.xml (ori

svn commit: r1358618 - in /tomcat/trunk/res/ide-support/eclipse: start-tomcat.launch stop-tomcat.launch

2012-07-07 Thread markt
Author: markt
Date: Sat Jul  7 18:47:12 2012
New Revision: 1358618

URL: http://svn.apache.org/viewvc?rev=1358618&view=rev
Log:
Revert accidental deletion

Added:
tomcat/trunk/res/ide-support/eclipse/start-tomcat.launch
  - copied unchanged from r1358612, 
tomcat/trunk/res/ide-support/eclipse/start-tomcat.launch
tomcat/trunk/res/ide-support/eclipse/stop-tomcat.launch
  - copied unchanged from r1358612, 
tomcat/trunk/res/ide-support/eclipse/stop-tomcat.launch


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



Re: [VOTE][RESULT] Release Apache Tomcat 7.0.29

2012-07-07 Thread Mark Thomas
The votes were as follows:

+1 (binding): markt, mturk, olamy, kkolinko
+1 (non-binding): kfujino

There were no other votes.

The vote therefore passes.

I'll move the bits to /dist and announce once the mirrors have updated.

Mark

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



svn commit: r717 - /dev/tomcat/tomcat-7/v7.0.29/ /release/tomcat/tomcat-7/v7.0.29/

2012-07-07 Thread markt
Author: markt
Date: Sat Jul  7 15:31:49 2012
New Revision: 717

Log:
Release 7.0.29

Added:
release/tomcat/tomcat-7/v7.0.29/
  - copied from r716, dev/tomcat/tomcat-7/v7.0.29/
Removed:
dev/tomcat/tomcat-7/v7.0.29/


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



svn commit: r717 - /dev/tomcat/tomcat-7/v7.0.29/ /release/tomcat/tomcat-7/v7.0.29/

2012-07-07 Thread markt
Author: markt
Date: Sat Jul  7 15:31:49 2012
New Revision: 717

Log:
Release 7.0.29

Added:
release/tomcat/tomcat-7/v7.0.29/
  - copied from r716, dev/tomcat/tomcat-7/v7.0.29/
Removed:
dev/tomcat/tomcat-7/v7.0.29/


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



svn commit: r718 - /release/tomcat/tomcat-7/v7.0.27/

2012-07-07 Thread markt
Author: markt
Date: Sat Jul  7 15:32:14 2012
New Revision: 718

Log:
Clean up

Removed:
release/tomcat/tomcat-7/v7.0.27/


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



svn commit: r718 - /release/tomcat/tomcat-7/v7.0.27/

2012-07-07 Thread markt
Author: markt
Date: Sat Jul  7 15:32:14 2012
New Revision: 718

Log:
Clean up

Removed:
release/tomcat/tomcat-7/v7.0.27/


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



Re: svn commit: r1358055 - in /tomcat/trunk: java/org/apache/catalina/connector/ java/org/apache/catalina/core/ java/org/apache/coyote/ java/org/apache/coyote/ajp/ java/org/apache/coyote/http11/ java/

2012-07-07 Thread Mark Thomas
On 07/07/2012 14:58, Mark Thomas wrote:
> On 06/07/2012 17:35, Filip Hanik (mailing lists) wrote:
>> Turning on Java 7 does change the test landscape.
>> Right now, I can get the test suite to run fine on Java 6, but lots of 
>> errors on Java 7
> 
> Hmm. Not good (that it worked with Java 6 but not Java 7).
> 
> 
> I've tracked down the first of these issues. Calling
> 
> java.nio.channels.SocketChannel.socket().setTrafficClass()
> 
> after
> 
> socketChannel.connect()
> 
> has been called triggers a SocketException. Moving the setTrafficClass()
> call to before connect() fixes the issue.
> 
> Tests on Java 6 show that the setTrafficClass() was having no effect if
> called after connect(). It looks like Java 7 has started to throw an
> exception when the setter has no effect.
> 
> On this basis, I' say that this particular issue is a long standing bug
> that was masked by Java 6 and is now visible with Java 7.
> 
> I'll do a code review and move the setTrafficClass() calls as necessary.

Having done all of this, some further research on the users list
suggests that this is a Windows XP / Server 2003 specific issue.

That means the code I deleted in the accept() case almost certainly
needs to be restored.

I have some ideas for how this might be handled but I want to check a
few things first. I should have something some time tomorrow.

Mark

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