Re: Failures in Gump

2013-08-16 Thread Stefan Bodewig
On 2013-08-16, Stefan Bodewig wrote:

> It could be a classloader issue but equally well a problem with the Gump
> setup.

ant-junit4.jar was not part of the CLASSPATH, things look better now.
There still are test failures but they seem to be genuine.

Stefan

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



[Bug 55399] Request English but Response Spanish Language (Default Locale)

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

--- Comment #8 from Guillermo Grandes  ---
(In reply to Mark Thomas from comment #6)
> The error pages were simple to fix but fixing the HTTP response status line
> is going to be more invasive. That part may end up being Tomcat 8 only
> because of the internal changes required.

In that case, perhaps the logical would respond in English (ubiquitous) by
default, and set locale when requested... right?

-- 
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 55439] New: 'catalina.sh stop -force' doesn't account for empty pid file

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

Bug ID: 55439
   Summary: 'catalina.sh stop -force' doesn't account for empty
pid file
   Product: Tomcat 8
   Version: trunk
  Hardware: All
OS: Linux
Status: NEW
  Severity: minor
  Priority: P2
 Component: Packaging
  Assignee: dev@tomcat.apache.org
  Reporter: davemi...@gmail.com

When CATALINA_PID is provided to 'catalina.sh stop -force', but the script
doesn't have permission to remove the file, the script instead clears the
CATALINA_PID file's contents. The subsequent code for '-force' doesn't account
for this and attempts to call kill an empty PID argument, leading to spurious
error messages.

-- 
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: Time for 7.0.43? Looking for a new release manager

2013-08-16 Thread Violeta Georgieva
2013/8/7 Mark Thomas wrote:
>
> On 07/08/2013 06:19, Konstantin Kolinko wrote:
> > 2013/8/6 Mark Thomas :
>
> >> Feel free to make as much or as little use of this:
> >> http://wiki.apache.org/tomcat/ReleaseProcess
> >>
> >> If anything isn't clear, let me know.
> >
> > The following is missing:
> >
> > 1. At which point in time the Maven artifacts are being released from
> > the staging repository, and how?
> >
> > I guess you do it it shortly after "svn mv dev->release", a day before
> > the announcement.
>
> Yes. Added.
>
> >
https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk/res/maven/README.txt
> > says
> > [[[
> > 3 - include the repository in the VOTE thread
> > 4 - in https://repository.apache.org/index.html#stagingRepositoriesrelease 
> > it
> > ]]]
> >
> > I think 4 actually releases the artifacts. (Thus a step is missing:
> > wait for the vote to pass).
>
> I've split the instructions between the two steps.
>
> > 2. Bump version number preparing for the next release.
> > http://svn.apache.org/viewvc?view=revision&revision=1500094
>
> Added.
>
> > 3. Add release date to changelog.xml
> > (The same date as in announcement at tomcat.apache.org/index.html)
> > http://svn.apache.org/viewvc?view=revision&revision=158
>
> Added. Recently I have been using the date the files were copied to dist
> rather than the date I announce.
>
> > 4. Add version number in Bugzilla.
>
> Added.


What do you think if we release 7.0.43 once JSR-356 implementation is
back-ported?
There are no open bugs in Tomcat 7 queue for the moment.

I will have the chance to test the process in reality not only locally.

Thanks
Violeta


[Bug 55438] Non Blocking API's onAllDataRead being called twice

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

--- Comment #1 from Daniel Mikusa  ---
One additional note about the test, if you set the "streaming" argument to
"postUrl" method to "true" then the test passes.  This seems to only occur when
"streaming" is set to "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



[Bug 55438] New: Non Blocking API's onAllDataRead being called twice

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

Bug ID: 55438
   Summary: Non Blocking API's onAllDataRead being called twice
   Product: Tomcat 8
   Version: trunk
  Hardware: PC
OS: Mac OS X 10.4
Status: NEW
  Severity: minor
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: dmik...@gopivotal.com

Created attachment 30738
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=30738&action=edit
Patch against TestNonBlockingAPI.java

I have a simple echo servlet which uses the Servlet 3.1 Non-Blocking IO API. 
It creates a ReadListener, that reads the request's input, buffers it, creates
a WriteListener that takes the buffered input and echoes it back to the
response.

Most of the time this works OK, but when I send a request with no input data I
get the following error.

6-Aug-2013 11:18:09.523 INFO [main] org.apache.catalina.startup.Catalina.start
Server startup in 1452 ms
java.lang.IllegalStateException: The non-blocking write listener has already
been set
   at org.apache.coyote.Response.setWriteListener(Response.java:583)
   at
org.apache.catalina.connector.OutputBuffer.setWriteListener(OutputBuffer.java:665)
   at
org.apache.catalina.connector.CoyoteOutputStream.setWriteListener(CoyoteOutputStream.java:162)
   at
com.pivotal.demos.nbio.EchoNbioServlet$1.onAllDataRead(EchoNbioServlet.java:77)
   at
org.apache.catalina.connector.CoyoteAdapter.asyncDispatch(CoyoteAdapter.java:384)
   at
org.apache.coyote.http11.AbstractHttp11Processor.asyncDispatch(AbstractHttp11Processor.java:1607)
   at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:622)
   at
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)
   at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1592)
   at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1550)
   at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
   at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
   at java.lang.Thread.run(Thread.java:724)
16-Aug-2013 11:20:13.205 SEVERE [http-nio-8080-exec-7]
org.apache.catalina.connector.CoyoteAdapter.asyncDispatch Exception while
processing an asynchronous request
java.lang.NullPointerException
   at
org.apache.catalina.connector.CoyoteAdapter.asyncDispatch(CoyoteAdapter.java:429)
   at
org.apache.coyote.http11.AbstractHttp11Processor.asyncDispatch(AbstractHttp11Processor.java:1607)
   at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:622)
   at
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)
   at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1592)
   at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1550)
   at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
   at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
   at java.lang.Thread.run(Thread.java:724)

Looking into it, what appears to be happening is that the
"ReadListener.onAllDataRead()" method is being called twice.  Because I'm
setting the WriteListener in the "onAllDataRead" method, the second invocation
of "onAllDataRead" causes the IllegalStateException.  I was assuming that
"onAllDataRead" should only be called once and so it would be OK to set the
WriteListener in that method.  Can "onAllDataRead" be legitimately called
multiple times?

Mark> No. Any chance you could convert the code below into a Tomcat unit test?

Attaching unit test to replicate the issue.

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



buildbot success in ASF Buildbot on tomcat-7-trunk

2013-08-16 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-7-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-7-trunk/builds/1346

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

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1514825
Blamelist: markt

Build succeeded!

sincerely,
 -The Buildbot





[Bug 55314] Provide option to allow programmatic deployment of server (WebSocket) endpoint at runtime

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

--- Comment #11 from Mark Thomas  ---
Excellent. Thanks for the feedback.

-- 
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 55314] Provide option to allow programmatic deployment of server (WebSocket) endpoint at runtime

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

--- Comment #10 from rstoyanc...@yahoo.com ---
I've tried this and it works as expected. Thanks!

-- 
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: r1514825 - /tomcat/tc7.0.x/trunk/build.xml

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 18:00:48 2013
New Revision: 1514825

URL: http://svn.apache.org/r1514825
Log:
Fix unit test failures after changes to SSL tests to use class loader to locate 
resources.

Modified:
tomcat/tc7.0.x/trunk/build.xml

Modified: tomcat/tc7.0.x/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/build.xml?rev=1514825&r1=1514824&r2=1514825&view=diff
==
--- tomcat/tc7.0.x/trunk/build.xml (original)
+++ tomcat/tc7.0.x/trunk/build.xml Fri Aug 16 18:00:48 2013
@@ -1146,6 +1146,15 @@
   
   
 
+
+
+
+  
+  
+
+
+  
+
   
 
   



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



buildbot success in ASF Buildbot on tomcat-trunk

2013-08-16 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/4844

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

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1514778
Blamelist: markt

Build succeeded!

sincerely,
 -The Buildbot





[Bug 55434] New: The path /foo/a/a/bar causes IllegalArgumentException when WsServerContainer creates UriTemplate

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

Bug ID: 55434
   Summary: The path /foo/a/a/bar causes IllegalArgumentException
when WsServerContainer creates UriTemplate
   Product: Tomcat 8
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: rstoyanc...@yahoo.com

WsFilter calls WsServerContainer.findMapping("/foo/a/a/bar"), which in turn
calls new UriTemplate(path). If the path contains repeated segments, it causes
the following code in the UriTemplate constructor to throw an exception:

Segment old =
this.segments.put(segment, new Segment(index, segment));
if (old != null) {
throw new IllegalArgumentException(
sm.getString("uriTemplate.duplicateName", segment));
}

This would be valid if the duplicates were URI variable names but not when
their plain path segments.

-- 
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: r1514783 - /tomcat/tc7.0.x/trunk/modules/websocket/

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 16:42:15 2013
New Revision: 1514783

URL: http://svn.apache.org/r1514783
Log:
Ignore output dir

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

Propchange: tomcat/tc7.0.x/trunk/modules/websocket/
--
--- svn:ignore (original)
+++ svn:ignore Fri Aug 16 16:42:15 2013
@@ -1,3 +1,4 @@
 .classpath
 .project
 .settings
+output



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



svn commit: r1514781 - in /tomcat/tc7.0.x/trunk/modules/websocket: ./ java/org/apache/tomcat/websocket/

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 16:37:48 2013
New Revision: 1514781

URL: http://svn.apache.org/r1514781
Log:
Merge generics updates from Tomcat 8

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

tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/AsyncChannelWrapper.java

tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/AsyncChannelWrapperNonSecure.java

tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java

Propchange: tomcat/tc7.0.x/trunk/modules/websocket/
--
--- svn:mergeinfo (added)
+++ svn:mergeinfo Fri Aug 16 16:37:48 2013
@@ -0,0 +1,2 @@
+/tomcat/trunk:1514778
+/tomcat/trunk/modules/websocket:1156115-1157160,1157162-1157859,1157862-1157942,1157945-1160347,1160349-1163716,1163718-1166689,1166691-1174340,1174342-1175596,1175598-1175611,1175613-1175932,1175934-1177783,1177785-1177980,1178006-1180720,1180722-1183094,1183096-1187753,1187755,1187775,1187801,1187806,1187809,1187826-1188312,1188314-1188401,1188646-1188840,1188842-1190176,1190178-1195223,1195225-1195953,1195955,1195957-1201238,1201240-1203345,1203347-1206623,1206625-1208046,1208073,1208096,1208114,1208145,1208772,1209194-1212125,1212127-1220291,1220293,1220295-1221321,1221323-1222328,1222332-1222401,1222405-1222795,1222850-1222950,1222969-1225326,1225328-1225463,1225465,1225627,1225629-1226534,1226536-1228908,1228911-1228923,1228927-1229532,1229534-1230766,1230768-1231625,1231627-1233414,1233419-1235207,1235209-1237425,1237427,1237429-1237977,1237981,1237985,1237995,1238070,1238073,1239024-1239048,1239050-1239062,1239135,1239256,1239258-1239485,1239785-1240046,1240101,1240106,12401
 
09,1240112,1240114,1240116,1240118,1240121,1240329,1240474-1240850,1240857,1241087,1241160,1241408-1241822,1241908-1241909,1241912-1242110,1242371-1292130,1292134-1292458,1292464-1292670,1292672-1292776,1292780-1293392,1293397-1297017,1297019-1297963,1297965-1299820,1300108,1300111-1300460,1300520-1300948,1300997,1301006,1301280,1302332,1302348,1302608-1302610,1302649,1302837,1303138,1303163,1303338,1303521,1303587,1303698,1303803,1303852,1304011,1304035,1304037,1304135,1304249,1304253,1304260,1304271,1304275,1304468,1304895,1304930-1304932,1305194,1305943,1305965,1306556,1306579-1306580,1307084,1307310,1307511-1307512,1307579,1307591,1307597,1310636,1310639-1310640,1310642,1310701,1311212,1311995,1327617,1327670,1331766,1333161,1333173,1333827,1334787,1335026,1335257,1335547,1335692,1335711,1335731,1336515,1336813,1336864,1336868,1336884,1337419,1337426,1337546,1337572,1337591-1337595,1337643,1337707,1337719,1337734,1337741,1337745,1338151-1338154,1338178,1342027,1342029,1342315,13
 
42320,1342476,1342498,1342503,1342717,1342795,1342805,1343044-1343046,1343335,1343394,1343400,1343629,1343708,1343718,1343895,1344063,1344068,1344250,1344266,1344515,1344528,1344612,1344629,1344725,1344868,1344890,1344893,1344896,1344901,1345020,1345029,1345039,1345287-1345290,1345294,1345309,1345325,1345357,1345367,1345579-1345580,1345582,1345688,1345699,1345704,1345731-1345732,1345737,1345744,1345752,1345754,1345779,1345781,1345846,1346107,1346376,1346404,1346510,1346514,1346519,1346581,1346635,1346644,1346683,1346794,1346885,1346932,1347034,1347047,1347087,1347108-1347109,1347583,1347737,1348105,1348357,1348398,1348425,1348461-1348495,1348498,1348752,1348762,1348772,1348776,1348859,1348968,1348973,1348989,1349007,1349237,1349298,1349317,1349410,1349473,1349539,1349879,1349887,1349893,1349922,1349984,1350124,1350241,1350243,1350294-1350295,1350299,1350864,1350900,1351010,1351054,1351056,1351068,1351134-1351135,1351148,1351259,1351604,1351636-1351640,1351991,1351993,1352011,1352056
 
,1352059,1352661,1352663,1352788,1352799,1353087,1353125,1353240,1353261,1353414,1353468,1353501,1353581,1353708,1354137,1354170,1354197,1354255,1354362,1354375,1354469,1354664,1354685,1354817,1354847,1354856,1355726,1355810,1356006-1356007,1356014,1356045,1356125,1356422,1356505,1356898,1357042,1357401,1357407,1358586,1358590,1358612-1358613,1359102,1359340,1359981,1360059,1360455,1360460,1360838,1360847,1360892,1360942,1361263,1361430,1361754-1361755,1361762,1361769,1361772,1361962,1361982,1361985,1361991,1364141,1364149,1364411-1364412,1364448,1366708,1366720,1366729,1366734,1366910,1366945,1366953,1366959,1367214,1370346,1370364,1370373,1370386,1370473,1370537,1370549,1370553,1370879,1370916,1370958,1370960,1370973,1371017,1371283,1371336,1371620,1371812,1371823,1371896,1371976,1371978,1371995,1371999,1372131,1372152,1372156,1372390,1373003,1373080,1373142,1373488,1373578,1373618,1373622,1373666,1373985,1373987,1373990,1373993,1374000,1374019,1374823,1376994,1377078,1377292,1377
 
311,1377342,1377433,1377444,1377516,1377518-1377519,1377532,1377535,1377544,1377689,1377785,1377794,1377811,1377824,1377827,1377831,1377852-1377853,1377887,1377900,1378322,1378361,1378394,1378699,1378715,1378818,137886

svn commit: r1514782 - /tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 16:38:22 2013
New Revision: 1514782

URL: http://svn.apache.org/r1514782
Log:
Remove remaining uses of Java 7 from implementation code

Modified:

tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java

Modified: 
tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java?rev=1514782&r1=1514781&r2=1514782&view=diff
==
--- 
tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java
 Fri Aug 16 16:38:22 2013
@@ -92,7 +92,7 @@ public class AsyncChannelWrapperSecure i
 CompletionHandler handler) {
 
 WrapperFuture future =
-new WrapperFuture<>(handler, attachment);
+new WrapperFuture(handler, attachment);
 
 if (!reading.compareAndSet(false, true)) {
 throw new IllegalStateException(sm.getString(
@@ -129,7 +129,7 @@ public class AsyncChannelWrapperSecure i
 CompletionHandler handler) {
 
 WrapperFuture future =
-new WrapperFuture<>(handler, attachment);
+new WrapperFuture(handler, attachment);
 
 if (!writing.compareAndSet(false, true)) {
 throw new IllegalStateException(sm.getString(



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



svn commit: r1514778 - in /tomcat/trunk/java/org/apache/tomcat/websocket: AsyncChannelWrapper.java AsyncChannelWrapperNonSecure.java AsyncChannelWrapperSecure.java

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 16:34:45 2013
New Revision: 1514778

URL: http://svn.apache.org/r1514778
Log:
Be a little more precise in the use of generics. Porting this to Tomcat 7 where 
<> is not allowed highlighted an issue.

Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapper.java

tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperNonSecure.java
tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapper.java?rev=1514778&r1=1514777&r2=1514778&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapper.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapper.java Fri 
Aug 16 16:34:45 2013
@@ -32,14 +32,14 @@ public interface AsyncChannelWrapper {
 
 Future read(ByteBuffer dst);
 
- void read(ByteBuffer dst, A attachment,
-CompletionHandler handler);
+ void read(ByteBuffer dst, A attachment,
+CompletionHandler handler);
 
 Future write(ByteBuffer src);
 
- void write(ByteBuffer[] srcs, int offset, int length, long timeout,
-TimeUnit unit, A attachment,
-CompletionHandler handler);
+ void write(ByteBuffer[] srcs, int offset, int length,
+long timeout, TimeUnit unit, A attachment,
+CompletionHandler handler);
 
 void close();
 

Modified: 
tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperNonSecure.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperNonSecure.java?rev=1514778&r1=1514777&r2=1514778&view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperNonSecure.java 
(original)
+++ 
tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperNonSecure.java 
Fri Aug 16 16:34:45 2013
@@ -47,8 +47,8 @@ public class AsyncChannelWrapperNonSecur
 }
 
 @Override
-public  void read(ByteBuffer dst, A attachment,
-CompletionHandler handler) {
+public  void read(ByteBuffer dst, A attachment,
+CompletionHandler handler) {
 socketChannel.read(dst, attachment, handler);
 }
 
@@ -58,9 +58,9 @@ public class AsyncChannelWrapperNonSecur
 }
 
 @Override
-public  void write(ByteBuffer[] srcs, int offset, int length,
+public  void write(ByteBuffer[] srcs, int offset, int 
length,
 long timeout, TimeUnit unit, A attachment,
-CompletionHandler handler) {
+CompletionHandler handler) {
 socketChannel.write(
 srcs, offset, length, timeout, unit, attachment, handler);
 }

Modified: 
tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java?rev=1514778&r1=1514777&r2=1514778&view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java 
(original)
+++ 
tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java 
Fri Aug 16 16:34:45 2013
@@ -88,10 +88,10 @@ public class AsyncChannelWrapperSecure i
 }
 
 @Override
-public  void read(ByteBuffer dst, A attachment,
-CompletionHandler handler) {
+public  void read(ByteBuffer dst, A attachment,
+CompletionHandler handler) {
 
-WrapperFuture future =
+WrapperFuture future =
 new WrapperFuture<>(handler, attachment);
 
 if (!reading.compareAndSet(false, true)) {
@@ -124,11 +124,11 @@ public class AsyncChannelWrapperSecure i
 }
 
 @Override
-public  void write(ByteBuffer[] srcs, int offset, int length,
+public  void write(ByteBuffer[] srcs, int offset, int 
length,
 long timeout, TimeUnit unit, A attachment,
-CompletionHandler handler) {
+CompletionHandler handler) {
 
-WrapperFuture future =
+WrapperFuture future =
 new WrapperFuture<>(handler, attachment);
 
 if (!writing.compareAndSet(false, true)) {



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



svn commit: r1514752 - in /tomcat/tc7.0.x/trunk/modules/websocket/java: javax/websocket/ javax/websocket/server/ org/apache/tomcat/websocket/ org/apache/tomcat/websocket/pojo/ org/apache/tomcat/websoc

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 15:39:41 2013
New Revision: 1514752

URL: http://svn.apache.org/r1514752
Log:
Remove most uses of Java 7 from implementation code

Modified:

tomcat/tc7.0.x/trunk/modules/websocket/java/javax/websocket/ContainerProvider.java

tomcat/tc7.0.x/trunk/modules/websocket/java/javax/websocket/DefaultClientEndpointConfig.java

tomcat/tc7.0.x/trunk/modules/websocket/java/javax/websocket/server/DefaultServerEndpointConfig.java

tomcat/tc7.0.x/trunk/modules/websocket/java/javax/websocket/server/ServerEndpointConfig.java

tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java

tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/BackgroundProcessManager.java

tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/Util.java

tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java

tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/WsSession.java

tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/WsWebSocketContainer.java

tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerBase.java

tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerPartialBase.java

tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerWholeBase.java

tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerWholeBinary.java

tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerWholeText.java

tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java

tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/DefaultServerEndpointConfigurator.java

tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/UpgradeUtil.java

tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/UriTemplate.java

tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java

tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/WsSci.java

tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/WsServerContainer.java

tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/WsWriteTimeout.java

Modified: 
tomcat/tc7.0.x/trunk/modules/websocket/java/javax/websocket/ContainerProvider.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/websocket/java/javax/websocket/ContainerProvider.java?rev=1514752&r1=1514751&r2=1514752&view=diff
==
--- 
tomcat/tc7.0.x/trunk/modules/websocket/java/javax/websocket/ContainerProvider.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/modules/websocket/java/javax/websocket/ContainerProvider.java
 Fri Aug 16 15:39:41 2013
@@ -49,8 +49,11 @@ public abstract class ContainerProvider 
 (Class) Class.forName(
 DEFAULT_PROVIDER_CLASS_NAME);
 result = clazz.newInstance();
-} catch (ClassNotFoundException | InstantiationException |
-IllegalAccessException e) {
+} catch (ClassNotFoundException e) {
+// No options left. Just return null.
+} catch (InstantiationException e) {
+// No options left. Just return null.
+} catch (IllegalAccessException e) {
 // No options left. Just return null.
 }
 }

Modified: 
tomcat/tc7.0.x/trunk/modules/websocket/java/javax/websocket/DefaultClientEndpointConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/websocket/java/javax/websocket/DefaultClientEndpointConfig.java?rev=1514752&r1=1514751&r2=1514752&view=diff
==
--- 
tomcat/tc7.0.x/trunk/modules/websocket/java/javax/websocket/DefaultClientEndpointConfig.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/modules/websocket/java/javax/websocket/DefaultClientEndpointConfig.java
 Fri Aug 16 15:39:41 2013
@@ -26,7 +26,7 @@ final class DefaultClientEndpointConfig 
 private final List extensions;
 private final List> encoders;
 private final List> decoders;
-private final Map userProperties = new 
ConcurrentHashMap<>();
+private final Map userProperties = new 
ConcurrentHashMap();
 private final Configurator configurator;
 
 

Modified: 
tomcat/tc7.0.x/trunk/modules/websocket/java/javax/websocket/server/DefaultServerEndpointConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/websocket/java/javax/websocket/server/DefaultServerEndpointConfig.java?

svn commit: r1514749 - in /tomcat/tc7.0.x/trunk/modules/websocket/test/org/apache/tomcat/websocket: TestWsWebSocketContainer.java TesterMessageCountClient.java pojo/TestEncodingDecoding.java pojo/Test

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 15:33:17 2013
New Revision: 1514749

URL: http://svn.apache.org/r1514749
Log:
Remove use of Java 7 from test code

Modified:

tomcat/tc7.0.x/trunk/modules/websocket/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java

tomcat/tc7.0.x/trunk/modules/websocket/test/org/apache/tomcat/websocket/TesterMessageCountClient.java

tomcat/tc7.0.x/trunk/modules/websocket/test/org/apache/tomcat/websocket/pojo/TestEncodingDecoding.java

tomcat/tc7.0.x/trunk/modules/websocket/test/org/apache/tomcat/websocket/pojo/TestPojoMethodMapping.java

Modified: 
tomcat/tc7.0.x/trunk/modules/websocket/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/websocket/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java?rev=1514749&r1=1514748&r2=1514749&view=diff
==
--- 
tomcat/tc7.0.x/trunk/modules/websocket/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/modules/websocket/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java
 Fri Aug 16 15:33:17 2013
@@ -533,7 +533,9 @@ public class TestWsWebSocketContainer ex
 ByteBuffer.wrap(MESSAGE_BINARY_4K));
 f.get();
 }
-} catch (ExecutionException | InterruptedException e) {
+} catch (ExecutionException e) {
+exception = e;
+} catch (InterruptedException e) {
 exception = e;
 }
 timeout = System.currentTimeMillis() - lastSend;

Modified: 
tomcat/tc7.0.x/trunk/modules/websocket/test/org/apache/tomcat/websocket/TesterMessageCountClient.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/websocket/test/org/apache/tomcat/websocket/TesterMessageCountClient.java?rev=1514749&r1=1514748&r2=1514749&view=diff
==
--- 
tomcat/tc7.0.x/trunk/modules/websocket/test/org/apache/tomcat/websocket/TesterMessageCountClient.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/modules/websocket/test/org/apache/tomcat/websocket/TesterMessageCountClient.java
 Fri Aug 16 15:33:17 2013
@@ -111,7 +111,7 @@ public class TesterMessageCountClient {
 
 private final CountDownLatch latch;
 
-private final List messages = new CopyOnWriteArrayList<>();
+private final List messages = new CopyOnWriteArrayList();
 
 public BasicHandler(CountDownLatch latch) {
 this.latch = latch;
@@ -176,7 +176,7 @@ public class TesterMessageCountClient {
 
 private final CountDownLatch latch;
 
-private final List messages = new CopyOnWriteArrayList<>();
+private final List messages = new CopyOnWriteArrayList();
 
 public AsyncHandler(CountDownLatch latch) {
 this.latch = latch;

Modified: 
tomcat/tc7.0.x/trunk/modules/websocket/test/org/apache/tomcat/websocket/pojo/TestEncodingDecoding.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/websocket/test/org/apache/tomcat/websocket/pojo/TestEncodingDecoding.java?rev=1514749&r1=1514748&r2=1514749&view=diff
==
--- 
tomcat/tc7.0.x/trunk/modules/websocket/test/org/apache/tomcat/websocket/pojo/TestEncodingDecoding.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/modules/websocket/test/org/apache/tomcat/websocket/pojo/TestEncodingDecoding.java
 Fri Aug 16 15:33:17 2013
@@ -185,7 +185,7 @@ public class TestEncodingDecoding extend
 encoders={MsgStringEncoder.class, MsgByteEncoder.class})
 public static class Client {
 
-private Queue received = new ConcurrentLinkedQueue<>();
+private Queue received = new ConcurrentLinkedQueue();
 
 @OnMessage
 public void rx(MsgString in) {
@@ -205,8 +205,8 @@ public class TestEncodingDecoding extend
 configurator=SingletonConfigurator.class)
 public static class Server {
 
-private Queue received = new ConcurrentLinkedQueue<>();
-static HashMap lifeCyclesCalled = new HashMap<>(8);
+private Queue received = new ConcurrentLinkedQueue();
+static HashMap lifeCyclesCalled = new HashMap(8);
 
 @OnMessage
 public MsgString rx(MsgString in) {
@@ -236,7 +236,7 @@ public class TestEncodingDecoding extend
 public static class MsgByteMessageHandler implements
 MessageHandler.Whole {
 
-public static Queue received = new ConcurrentLinkedQueue<>();
+public static Queue received = new 
ConcurrentLinkedQueue();
 private final Session session;
 
 public MsgByteMessageHandler(Session session) {
@@ -251,7 +251,9 @@ public class TestEncodingDecoding extend
 MsgByte msg = new MsgByte();
 msg.setData("got it".getBytes());
 

buildbot failure in ASF Buildbot on tomcat-7-trunk

2013-08-16 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-7-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-7-trunk/builds/1342

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

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1514735
Blamelist: markt

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot





Back-porting JSR-356 Progress update

2013-08-16 Thread Mark Thomas
The JSR-356 API and implementation has been back-ported to Tomcat 7.

The necessary plumbing for the non-blocking support required by JSR-356
has been back-ported to Tomcat 7.

All compilation errors have been resolved.

The unit tests all pass.

Still to do:

1. Remove any Java 7 features so the code can compile with source -1.6
and target -1.6.

2. Add a check for Java 7 to the SCI so WebSocket is only loaded when
Tomcat 7 is running on Java 7 or later.

3. Add the WebSocket module into the build scripts.

4. Test with Autobahn.

5. Switch the WebSocket examples to the new API.

6. Deprecate the old HTTP upgrade and WebSocket implementations.


Mark

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



svn commit: r1514734 - /tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/net/TesterSupport.java

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 14:38:50 2013
New Revision: 1514734

URL: http://svn.apache.org/r1514734
Log:
Obtain absolute paths for SSL keystores etc. via the class loader rather than 
relying on using the current working directory.

Modified:
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/net/TesterSupport.java

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/net/TesterSupport.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/net/TesterSupport.java?rev=1514734&r1=1514733&r2=1514734&view=diff
==
--- tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/net/TesterSupport.java 
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/net/TesterSupport.java Fri 
Aug 16 14:38:50 2013
@@ -22,6 +22,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.net.InetAddress;
 import java.net.Socket;
+import java.net.URISyntaxException;
 import java.net.UnknownHostException;
 import java.security.KeyManagementException;
 import java.security.KeyStore;
@@ -84,18 +85,25 @@ public final class TesterSupport {
 protected static void initSsl(Tomcat tomcat, String keystore,
 String keystorePass, String keyPass) {
 
+ClassLoader cl = TesterSupport.class.getClassLoader();
+
 String protocol = tomcat.getConnector().getProtocolHandlerClassName();
 if (protocol.indexOf("Apr") == -1) {
 Connector connector = tomcat.getConnector();
 connector.setProperty("sslProtocol", "tls");
-File keystoreFile =
-new File("test/org/apache/tomcat/util/net/" + keystore);
+
+java.net.URL keyStoreUrl =
+cl.getResource("org/apache/tomcat/util/net/" + keystore);
+File keystoreFile = toFile(keyStoreUrl);
 connector.setAttribute("keystoreFile",
 keystoreFile.getAbsolutePath());
-File truststoreFile = new File(
-"test/org/apache/tomcat/util/net/ca.jks");
+
+java.net.URL truststoreUrl =
+cl.getResource("org/apache/tomcat/util/net/ca.jks");
+File truststoreFile = toFile(truststoreUrl);
 connector.setAttribute("truststoreFile",
 truststoreFile.getAbsolutePath());
+
 if (keystorePass != null) {
 connector.setAttribute("keystorePass", keystorePass);
 }
@@ -103,23 +111,34 @@ public final class TesterSupport {
 connector.setAttribute("keyPass", keyPass);
 }
 } else {
-File keystoreFile = new File(
-"test/org/apache/tomcat/util/net/localhost-cert.pem");
+java.net.URL keyStoreUrl =
+
cl.getResource("org/apache/tomcat/util/net/localhost-cert.pem");
+File keystoreFile = toFile(keyStoreUrl);
 tomcat.getConnector().setAttribute("SSLCertificateFile",
 keystoreFile.getAbsolutePath());
-keystoreFile = new File(
-"test/org/apache/tomcat/util/net/localhost-key.pem");
+
+java.net.URL sslCertificateKeyUrl =
+
cl.getResource("org/apache/tomcat/util/net/localhost-key.pem");
+File sslCertificateKeyFile = toFile(sslCertificateKeyUrl);
 tomcat.getConnector().setAttribute("SSLCertificateKeyFile",
-keystoreFile.getAbsolutePath());
+sslCertificateKeyFile.getAbsolutePath());
 }
 tomcat.getConnector().setSecure(true);
 tomcat.getConnector().setProperty("SSLEnabled", "true");
 }
 
+private static File toFile(java.net.URL url) {
+try {
+return new File(url.toURI());
+} catch (URISyntaxException e) {
+throw new IllegalArgumentException(e);
+}
+}
+
 protected static KeyManager[] getUser1KeyManagers() throws Exception {
 KeyManagerFactory kmf = KeyManagerFactory.getInstance(
 KeyManagerFactory.getDefaultAlgorithm());
-kmf.init(getKeyStore("test/org/apache/tomcat/util/net/user1.jks"),
+kmf.init(getKeyStore("org/apache/tomcat/util/net/user1.jks"),
 "changeit".toCharArray());
 return kmf.getKeyManagers();
 }
@@ -127,7 +146,7 @@ public final class TesterSupport {
 protected static TrustManager[] getTrustManagers() throws Exception {
 TrustManagerFactory tmf = TrustManagerFactory.getInstance(
 TrustManagerFactory.getDefaultAlgorithm());
-tmf.init(getKeyStore("test/org/apache/tomcat/util/net/ca.jks"));
+tmf.init(getKeyStore("org/apache/tomcat/util/net/ca.jks"));
 return tmf.getTrustManagers();
 }
 
@@ -146,7 +165,9 @@ public final class TesterSupport {
 }
 
 private static KeyStore getKeyStore(Stri

svn commit: r1514735 - in /tomcat/tc7.0.x/trunk/modules/websocket/test/org/apache/tomcat/websocket: TestWebSocketFrameClient.java TestWsWebSocketContainer.java

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 14:39:29 2013
New Revision: 1514735

URL: http://svn.apache.org/r1514735
Log:
Back-porting JSR-356
Obtain absolute paths for SSL keystores etc. via the class loader rather than 
relying on using the current working directory.

Modified:

tomcat/tc7.0.x/trunk/modules/websocket/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java

tomcat/tc7.0.x/trunk/modules/websocket/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java

Modified: 
tomcat/tc7.0.x/trunk/modules/websocket/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/websocket/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java?rev=1514735&r1=1514734&r2=1514735&view=diff
==
--- 
tomcat/tc7.0.x/trunk/modules/websocket/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/modules/websocket/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java
 Fri Aug 16 14:39:29 2013
@@ -16,7 +16,9 @@
  */
 package org.apache.tomcat.websocket;
 
+import java.io.File;
 import java.net.URI;
+import java.net.URL;
 import java.util.List;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
@@ -52,6 +54,7 @@ public class TestWebSocketFrameClient ex
 Tomcat.addServlet(ctx, "default", new DefaultServlet());
 ctx.addServletMapping("/", "default");
 
+
 TesterSupport.initSsl(tomcat);
 
 tomcat.start();
@@ -60,9 +63,12 @@ public class TestWebSocketFrameClient ex
 ContainerProvider.getWebSocketContainer();
 ClientEndpointConfig clientEndpointConfig =
 ClientEndpointConfig.Builder.create().build();
+URL truststoreUrl = this.getClass().getClassLoader().getResource(
+"org/apache/tomcat/util/net/ca.jks");
+File truststoreFile = new File(truststoreUrl.toURI());
 clientEndpointConfig.getUserProperties().put(
 WsWebSocketContainer.SSL_TRUSTSTORE_PROPERTY,
-"test/org/apache/tomcat/util/net/ca.jks");
+truststoreFile.getAbsolutePath());
 Session wsSession = wsContainer.connectToServer(
 TesterProgrammaticEndpoint.class,
 clientEndpointConfig,

Modified: 
tomcat/tc7.0.x/trunk/modules/websocket/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/websocket/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java?rev=1514735&r1=1514734&r2=1514735&view=diff
==
--- 
tomcat/tc7.0.x/trunk/modules/websocket/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/modules/websocket/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java
 Fri Aug 16 14:39:29 2013
@@ -16,8 +16,10 @@
  */
 package org.apache.tomcat.websocket;
 
+import java.io.File;
 import java.net.SocketTimeoutException;
 import java.net.URI;
+import java.net.URL;
 import java.nio.ByteBuffer;
 import java.util.List;
 import java.util.Set;
@@ -790,9 +792,12 @@ public class TestWsWebSocketContainer ex
 ContainerProvider.getWebSocketContainer();
 ClientEndpointConfig clientEndpointConfig =
 ClientEndpointConfig.Builder.create().build();
+URL truststoreUrl = this.getClass().getClassLoader().getResource(
+"org/apache/tomcat/util/net/ca.jks");
+File truststoreFile = new File(truststoreUrl.toURI());
 clientEndpointConfig.getUserProperties().put(
 WsWebSocketContainer.SSL_TRUSTSTORE_PROPERTY,
-"test/org/apache/tomcat/util/net/ca.jks");
+truststoreFile.getAbsolutePath());
 Session wsSession = wsContainer.connectToServer(
 TesterProgrammaticEndpoint.class,
 clientEndpointConfig,



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



svn commit: r1514712 - /tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TesterServletContext.java

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 13:55:17 2013
New Revision: 1514712

URL: http://svn.apache.org/r1514712
Log:
Back-porting JSR-356
WebSocket unit tests need a couple of features to be implemented (or at least 
not throw an exception)

Modified:

tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TesterServletContext.java

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TesterServletContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TesterServletContext.java?rev=1514712&r1=1514711&r2=1514712&view=diff
==
--- 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TesterServletContext.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TesterServletContext.java 
Fri Aug 16 13:55:17 2013
@@ -36,6 +36,10 @@ import javax.servlet.SessionCookieConfig
 import javax.servlet.SessionTrackingMode;
 import javax.servlet.descriptor.JspConfigDescriptor;
 
+import org.apache.catalina.core.ApplicationFilterRegistration;
+import org.apache.catalina.core.TesterContext;
+import org.apache.catalina.deploy.FilterDef;
+
 public class TesterServletContext implements ServletContext {
 
 @Override
@@ -137,8 +141,7 @@ public class TesterServletContext implem
 
 @Override
 public String getInitParameter(String name) {
-
-throw new RuntimeException("Not implemented");
+return null;
 }
 
 @Override
@@ -230,7 +233,8 @@ public class TesterServletContext implem
 @Override
 public javax.servlet.FilterRegistration.Dynamic addFilter(
 String filterName, Filter filter) {
-throw new RuntimeException("Not implemented");
+return new ApplicationFilterRegistration(
+new FilterDef(), new TesterContext());
 }
 
 @Override



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



Re: Back-porting JSR-356 implementation to 7.0.x

2013-08-16 Thread Mark Thomas
On 16/08/2013 14:38, Rossen Stoyanchev wrote:
> On Thu, Aug 15, 2013 at 6:47 PM, Mark Thomas  wrote:
>> This isn't going to be quite as simple as I first thought.
>>
>> The WebSocket client API requires Java SE 7 or later.
>> The WebSocket server API requires Java EE 6 or later.
>> Java EE 6 requires Java 6 or later.
>> The WebSocket server API depends on the WebSocket client API.
>>
>> The WebSocket client implementation makes extensive use of new Java 7
>> non-blocking IO features.
> 
> If at all feasible, could applications using the server side only use Java 6?

Not without some potentially quite extensive refactoring because of the
way the Server implementation extends the client implementation. It
might be possible but given the EOL status of Java 6 it isn't that high
on my list of priorities.

Mark


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



svn commit: r1514709 - /tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/UpgradeUtil.java

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 13:44:40 2013
New Revision: 1514709

URL: http://svn.apache.org/r1514709
Log:
Need to cast to the Facade

Modified:

tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/UpgradeUtil.java

Modified: 
tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/UpgradeUtil.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/UpgradeUtil.java?rev=1514709&r1=1514708&r2=1514709&view=diff
==
--- 
tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/UpgradeUtil.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/UpgradeUtil.java
 Fri Aug 16 13:44:40 2013
@@ -40,7 +40,7 @@ import javax.websocket.Extension;
 import javax.websocket.HandshakeResponse;
 import javax.websocket.server.ServerEndpointConfig;
 
-import org.apache.catalina.connector.Request;
+import org.apache.catalina.connector.RequestFacade;
 import org.apache.tomcat.util.codec.binary.Base64;
 import org.apache.tomcat.websocket.Constants;
 import org.apache.tomcat.websocket.WsHandshakeResponse;
@@ -172,8 +172,9 @@ public class UpgradeUtil {
 }
 }
 
+// TODO: Check if the request is wrapped and unwrap it if necessary.
 WsHttpUpgradeHandler wsHandler =
-((Request) req).upgrade(WsHttpUpgradeHandler.class);
+((RequestFacade) req).upgrade(WsHttpUpgradeHandler.class);
 wsHandler.preInit(ep, sec, sc, wsRequest, subProtocol,
 pathParams, req.isSecure());
 



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



svn commit: r1514707 - in /tomcat/tc7.0.x/trunk/java/org/apache: coyote/ coyote/ajp/ coyote/http11/ tomcat/util/net/

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 13:44:13 2013
New Revision: 1514707

URL: http://svn.apache.org/r1514707
Log:
Back-porting JSR-356
Add some necessary plumbing for Servlet 3.1 based HTTP upgrade

Modified:
tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java
tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/Http11Protocol.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java

Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java?rev=1514707&r1=1514706&r2=1514707&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java Fri Aug 
16 13:44:13 2013
@@ -31,6 +31,8 @@ import javax.management.ObjectName;
 
 import org.apache.coyote.http11.upgrade.UpgradeInbound;
 import org.apache.coyote.http11.upgrade.UpgradeProcessor;
+import org.apache.coyote.http11.upgrade.servlet31.HttpUpgradeHandler;
+import org.apache.coyote.http11.upgrade.servlet31.WebConnection;
 import org.apache.juli.logging.Log;
 import org.apache.tomcat.util.ExceptionUtils;
 import org.apache.tomcat.util.modeler.Registry;
@@ -602,7 +604,27 @@ public abstract class AbstractProtocol i
 state = processor.asyncPostProcess();
 }
 
-if (state == SocketState.UPGRADING_TOMCAT) {
+if (state == SocketState.UPGRADING) {
+// Get the HTTP upgrade handler
+HttpUpgradeHandler httpUpgradeHandler =
+processor.getHttpUpgradeHandler();
+// Release the Http11 processor to be re-used
+release(wrapper, processor, false, false);
+// Create the upgrade processor
+processor = createUpgradeProcessor(
+wrapper, httpUpgradeHandler);
+// Mark the connection as upgraded
+wrapper.setUpgraded(true);
+// Associate with the processor with the connection
+connections.put(socket, processor);
+// Initialise the upgrade handler (which may trigger
+// some IO using the new protocol which is why the 
lines
+// above are necessary)
+// This cast should be safe. If it fails the error
+// handling for the surrounding try/catch will deal 
with
+// it.
+httpUpgradeHandler.init((WebConnection) processor);
+} else if (state == SocketState.UPGRADING_TOMCAT) {
 // Get the UpgradeInbound handler
 UpgradeInbound inbound = processor.getUpgradeInbound();
 // Release the Http11 processor to be re-used
@@ -612,6 +634,7 @@ public abstract class AbstractProtocol i
 inbound.onUpgradeComplete();
 }
 } while (state == SocketState.ASYNC_END ||
+state == SocketState.UPGRADING ||
 state == SocketState.UPGRADING_TOMCAT);
 
 if (state == SocketState.LONG) {
@@ -676,7 +699,10 @@ public abstract class AbstractProtocol i
 protected abstract Processor createUpgradeProcessor(
 SocketWrapper socket,
 UpgradeInbound inbound) throws IOException;
-
+protected abstract Processor createUpgradeProcessor(
+SocketWrapper socket,
+HttpUpgradeHandler httpUpgradeProcessor) throws IOException;
+
 protected void register(AbstractProcessor processor) {
 if (getProtocol().getDomain() != null) {
 synchronized (this) {

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java?rev=1514707&r1=1514706&r2=1514707&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java 
Fri Aug 16 13:44:13 2013
@@ -19,6 +19,7 @@ package org.apache.coyote.ajp;
 import org.apache.coyote.AbstractProt

svn commit: r1514706 - /tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/RequestFacade.java

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 13:43:23 2013
New Revision: 1514706

URL: http://svn.apache.org/r1514706
Log:
Back-porting JSR-356
RequestFacade needs upgrade method too.

Modified:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/RequestFacade.java

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/RequestFacade.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/RequestFacade.java?rev=1514706&r1=1514705&r2=1514706&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/RequestFacade.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/RequestFacade.java 
Fri Aug 16 13:43:23 2013
@@ -42,6 +42,7 @@ import javax.servlet.http.Part;
 import org.apache.catalina.Globals;
 import org.apache.catalina.security.SecurityUtil;
 import org.apache.coyote.http11.upgrade.UpgradeInbound;
+import org.apache.coyote.http11.upgrade.servlet31.HttpUpgradeHandler;
 import org.apache.tomcat.util.res.StringManager;
 
 /**
@@ -1102,4 +1103,9 @@ public class RequestFacade implements Ht
 throws IOException {
 request.doUpgrade(inbound);
 }
+
+public  T upgrade(
+Class httpUpgradeHandlerClass) throws ServletException {
+return request.upgrade(httpUpgradeHandlerClass);
+}
 }



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



buildbot success in ASF Buildbot on tomcat-7-trunk

2013-08-16 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-7-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-7-trunk/builds/1339

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

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1514688
Blamelist: markt

Build succeeded!

sincerely,
 -The Buildbot





Re: Back-porting JSR-356 implementation to 7.0.x

2013-08-16 Thread Rossen Stoyanchev
On Thu, Aug 15, 2013 at 6:47 PM, Mark Thomas  wrote:
> This isn't going to be quite as simple as I first thought.
>
> The WebSocket client API requires Java SE 7 or later.
> The WebSocket server API requires Java EE 6 or later.
> Java EE 6 requires Java 6 or later.
> The WebSocket server API depends on the WebSocket client API.
>
> The WebSocket client implementation makes extensive use of new Java 7
> non-blocking IO features.

If at all feasible, could applications using the server side only use Java 6?

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



svn commit: r1514701 - /tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 13:21:53 2013
New Revision: 1514701

URL: http://svn.apache.org/r1514701
Log:
Back-porting JSR-356
Add upgraded flag to SocketWrapper

Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java?rev=1514701&r1=1514700&r2=1514701&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java Fri 
Aug 16 13:21:53 2013
@@ -31,6 +31,7 @@ public class SocketWrapper {
 protected volatile int keepAliveLeft = 100;
 protected boolean async = false;
 protected boolean keptAlive = false;
+private boolean upgraded = false;
 
 /*
  * Used if block/non-blocking is set at the socket level. The client is
@@ -63,6 +64,8 @@ public class SocketWrapper {
 
 public boolean isAsync() { return async; }
 public void setAsync(boolean async) { this.async = async; }
+public boolean isUpgraded() { return upgraded; }
+public void setUpgraded(boolean upgraded) { this.upgraded = upgraded; }
 public long getLastAccess() { return lastAccess; }
 public void access() { access(System.currentTimeMillis()); }
 public void access(long access) { lastAccess = access; }



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



svn commit: r1514700 - /tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 13:19:41 2013
New Revision: 1514700

URL: http://svn.apache.org/r1514700
Log:
Back-porting JSR-356
Some renaming and refactoring to make it easier to port other changes.

Modified:
tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java

Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java?rev=1514700&r1=1514699&r2=1514700&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java Fri Aug 
16 13:19:41 2013
@@ -554,9 +554,11 @@ public abstract class AbstractProtocol i
 }
 
 
-public SocketState process(SocketWrapper socket,
+public SocketState process(SocketWrapper wrapper,
 SocketStatus status) {
-Processor processor = connections.remove(socket.getSocket());
+S socket = wrapper.getSocket();
+
+Processor processor = connections.remove(socket);
 
 if (status == SocketStatus.DISCONNECT && processor == null) {
 //nothing more to be done endpoint requested a close
@@ -564,7 +566,7 @@ public abstract class AbstractProtocol i
 return SocketState.CLOSED;
 }
 
-socket.setAsync(false);
+wrapper.setAsync(false);
 
 try {
 if (processor == null) {
@@ -574,7 +576,7 @@ public abstract class AbstractProtocol i
 processor = createProcessor();
 }
 
-initSsl(socket, processor);
+initSsl(wrapper, processor);
 
 SocketState state = SocketState.CLOSED;
 do {
@@ -593,7 +595,7 @@ public abstract class AbstractProtocol i
 } else if (processor.isUpgrade()) {
 state = processor.upgradeDispatch(status);
 } else {
-state = processor.process(socket);
+state = processor.process(wrapper);
 }
 
 if (state != SocketState.CLOSED && processor.isAsync()) {
@@ -604,9 +606,9 @@ public abstract class AbstractProtocol i
 // Get the UpgradeInbound handler
 UpgradeInbound inbound = processor.getUpgradeInbound();
 // Release the Http11 processor to be re-used
-release(socket, processor, false, false);
+release(wrapper, processor, false, false);
 // Create the light-weight upgrade processor
-processor = createUpgradeProcessor(socket, inbound);
+processor = createUpgradeProcessor(wrapper, inbound);
 inbound.onUpgradeComplete();
 }
 } while (state == SocketState.ASYNC_END ||
@@ -616,23 +618,23 @@ public abstract class AbstractProtocol i
 // In the middle of processing a request/response. Keep the
 // socket associated with the processor. Exact requirements
 // depend on type of long poll
-longPoll(socket, processor);
+longPoll(wrapper, processor);
 } else if (state == SocketState.OPEN) {
 // In keep-alive but between requests. OK to recycle
 // processor. Continue to poll for the next request.
-release(socket, processor, false, true);
+release(wrapper, processor, false, true);
 } else if (state == SocketState.SENDFILE) {
 // Sendfile in progress. If it fails, the socket will be
 // closed. If it works, the socket will be re-added to the
 // poller
-release(socket, processor, false, false);
+release(wrapper, processor, false, false);
 } else if (state == SocketState.UPGRADED) {
 // Need to keep the connection associated with the 
processor
-longPoll(socket, processor);
+longPoll(wrapper, processor);
 } else {
 // Connection closed. OK to recycle the processor.
 if (!(processor instanceof UpgradeProcessor)) {
-release(socket, processor, true, false);
+release(wrapper, processor, true, false);
 }
 }
 return state;
@@ -658,7 +660,7 @@ public abstract class AbstractProtocol i
 }
 // Don't try to add upgrade processors back into the pool
 if (!(pr

svn commit: r1514695 - in /tomcat/tc7.0.x/trunk/java/org/apache: coyote/AbstractProtocol.java coyote/http11/AbstractHttp11Processor.java tomcat/util/net/AbstractEndpoint.java tomcat/util/net/JIoEndpoi

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 13:14:11 2013
New Revision: 1514695

URL: http://svn.apache.org/r1514695
Log:
Back-porting JSR-356
Rename SocketState.UPGRADING -> SocketStatus.UPGRADING_TOMCAT to indicate a 
Tomcat proprietary HTTP upgrade is in progress
Add SocketStatus.UPGRADING to indicate a Servlet 3.1 style HTTP upgrade is in 
progress.

Modified:
tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java

Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java?rev=1514695&r1=1514694&r2=1514695&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java Fri Aug 
16 13:14:11 2013
@@ -590,6 +590,8 @@ public abstract class AbstractProtocol i
 state = processor.event(status);
 } else if (processor.getUpgradeInbound() != null) {
 state = processor.upgradeDispatch();
+} else if (processor.isUpgrade()) {
+state = processor.upgradeDispatch(status);
 } else {
 state = processor.process(socket);
 }
@@ -598,7 +600,7 @@ public abstract class AbstractProtocol i
 state = processor.asyncPostProcess();
 }
 
-if (state == SocketState.UPGRADING) {
+if (state == SocketState.UPGRADING_TOMCAT) {
 // Get the UpgradeInbound handler
 UpgradeInbound inbound = processor.getUpgradeInbound();
 // Release the Http11 processor to be re-used
@@ -608,7 +610,7 @@ public abstract class AbstractProtocol i
 inbound.onUpgradeComplete();
 }
 } while (state == SocketState.ASYNC_END ||
-state == SocketState.UPGRADING);
+state == SocketState.UPGRADING_TOMCAT);
 
 if (state == SocketState.LONG) {
 // In the middle of processing a request/response. Keep the

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1514695&r1=1514694&r2=1514695&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java 
Fri Aug 16 13:14:11 2013
@@ -1117,7 +1117,7 @@ public abstract class AbstractHttp11Proc
 } else if (isAsync() || comet) {
 return SocketState.LONG;
 } else if (getUpgradeInbound() != null) {
-return SocketState.UPGRADING;
+return SocketState.UPGRADING_TOMCAT;
 } else {
 if (sendfileInProgress) {
 return SocketState.SENDFILE;

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java?rev=1514695&r1=1514694&r2=1514695&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java 
Fri Aug 16 13:14:11 2013
@@ -55,7 +55,8 @@ public abstract class AbstractEndpoint {
 public enum SocketState {
 // TODO Add a new state to the AsyncStateMachine and remove
 //  ASYNC_END (if possible)
-OPEN, CLOSED, LONG, ASYNC_END, SENDFILE, UPGRADING, UPGRADED
+OPEN, CLOSED, LONG, ASYNC_END, SENDFILE, UPGRADING_TOMCAT,
+UPGRADING, UPGRADED
 }
 
 

Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java?rev=1514695&r1=1514694&r2=1514695&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java Fri 
Aug 16 13:14:11 2013
@@ -324,7 +324,7 @@ public class JIoEndpoint extends Abstrac
  

svn commit: r1514689 - /tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/UpgradeUtil.java

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 13:03:04 2013
New Revision: 1514689

URL: http://svn.apache.org/r1514689
Log:
Back-porting JSR-356
Need to cast to Tomcat's request object to access upgrade method

Modified:

tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/UpgradeUtil.java

Modified: 
tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/UpgradeUtil.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/UpgradeUtil.java?rev=1514689&r1=1514688&r2=1514689&view=diff
==
--- 
tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/UpgradeUtil.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/UpgradeUtil.java
 Fri Aug 16 13:03:04 2013
@@ -40,6 +40,7 @@ import javax.websocket.Extension;
 import javax.websocket.HandshakeResponse;
 import javax.websocket.server.ServerEndpointConfig;
 
+import org.apache.catalina.connector.Request;
 import org.apache.tomcat.util.codec.binary.Base64;
 import org.apache.tomcat.websocket.Constants;
 import org.apache.tomcat.websocket.WsHandshakeResponse;
@@ -172,7 +173,7 @@ public class UpgradeUtil {
 }
 
 WsHttpUpgradeHandler wsHandler =
-req.upgrade(WsHttpUpgradeHandler.class);
+((Request) req).upgrade(WsHttpUpgradeHandler.class);
 wsHandler.preInit(ep, sec, sc, wsRequest, subProtocol,
 pathParams, req.isSecure());
 



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



svn commit: r1514688 - /tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 12:51:45 2013
New Revision: 1514688

URL: http://svn.apache.org/r1514688
Log:
Fix unit test failures.

Modified:
tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java?rev=1514688&r1=1514687&r2=1514688&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java 
Fri Aug 16 12:51:45 2013
@@ -536,9 +536,9 @@ public abstract class AbstractAjpProcess
 
 @Override
 public UpgradeInbound getUpgradeInbound() {
-// Should never reach this code but in case we do...
-throw new IllegalStateException(
-sm.getString("ajpprocessor.httpupgrade.notsupported"));
+// Can't throw exception as this is used to test if connection has been
+// upgraded using Tomcat's proprietary HTTP upgrade mechanism.
+return null;
 }
 
 



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



buildbot failure in ASF Buildbot on tomcat-7-trunk

2013-08-16 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-7-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-7-trunk/builds/1337

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

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1514661
Blamelist: markt

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot





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

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 12:19:31 2013
New Revision: 1514674

URL: http://svn.apache.org/r1514674
Log:
vote for my own proposal

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=1514674&r1=1514673&r2=1514674&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Aug 16 12:19:31 2013
@@ -135,7 +135,7 @@ PATCHES PROPOSED TO BACKPORT:
   request that specifies an Accept-Language of English ahead of French, Spanish
   or Japanese.
   http://svn.apache.org/r1514376
-  +1: schultz
+  +1: schultz, markt
   -1:
 
 



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



Failures in Gump

2013-08-16 Thread Stefan Bodewig
Hi all,

for some tests projects in Gump the tests fail as Ant (or rather the
test runner) claims to not have found any tests, for example

http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test/gump_file/TEST-org.apache.tomcat.util.descriptor.web.TestSecurityConstraint.NIO.txt.html

http://vmgump.apache.org/gump/public/xmlunit/xmlunit-test/gump_file/TEST-net.sf.xmlunit.util.NodesTest.xml.html

In xmlunit's case only the JUnit4 tests fail, the ones using JUnit3
style tests pass.  They all pass outside of Gump.

It could be a classloader issue but equally well a problem with the Gump
setup.  Running Gump locally is all but trivial so I'll throw in some
debug code in Ant in order to perform System.err debugging with several
hours between iterations.  I promise to remove the logs when I know the
culprit :-)

Stefan

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



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

2013-08-16 Thread schultz
Author: schultz
Date: Fri Aug 16 12:16:57 2013
New Revision: 1514673

URL: http://svn.apache.org/r1514673
Log:
Vote

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=1514673&r1=1514672&r2=1514673&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Aug 16 12:16:57 2013
@@ -135,7 +135,7 @@ PATCHES PROPOSED TO BACKPORT:
   request that specifies an Accept-Language of English ahead of French, Spanish
   or Japanese.
   http://svn.apache.org/r1514376
-  +1:
+  +1: schultz
   -1:
 
 



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



svn commit: r1514670 - in /tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server: WsFrameServer.java WsHttpUpgradeHandler.java WsRemoteEndpointImplServer.java

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 12:08:06 2013
New Revision: 1514670

URL: http://svn.apache.org/r1514670
Log:
Back-porting JSR-356
Switch to the AbstractServlet[In|Out]putStream implementations as they have the 
new Servlet 3.1 methods required that aren't part of the Servlet 3.0 API 
present in Tomcat 7.
For the same reason, point to the relocated ReadLister, WriterListener, 
HttpUpgradeHandler and WebConnection interfaces.

Modified:

tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/WsFrameServer.java

tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java

tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java

Modified: 
tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/WsFrameServer.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/WsFrameServer.java?rev=1514670&r1=1514669&r2=1514670&view=diff
==
--- 
tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/WsFrameServer.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/WsFrameServer.java
 Fri Aug 16 12:08:06 2013
@@ -19,18 +19,17 @@ package org.apache.tomcat.websocket.serv
 import java.io.EOFException;
 import java.io.IOException;
 
-import javax.servlet.ServletInputStream;
-
+import org.apache.coyote.http11.upgrade.AbstractServletInputStream;
 import org.apache.tomcat.websocket.WsFrameBase;
 import org.apache.tomcat.websocket.WsSession;
 
 public class WsFrameServer extends WsFrameBase {
 
-private final ServletInputStream sis;
+private final AbstractServletInputStream sis;
 private final Object connectionReadLock = new Object();
 
 
-public WsFrameServer(ServletInputStream sis, WsSession wsSession) {
+public WsFrameServer(AbstractServletInputStream sis, WsSession wsSession) {
 super(wsSession);
 this.sis = sis;
 }

Modified: 
tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java?rev=1514670&r1=1514669&r2=1514670&view=diff
==
--- 
tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java
 Fri Aug 16 12:08:06 2013
@@ -20,19 +20,19 @@ import java.io.EOFException;
 import java.io.IOException;
 import java.util.Map;
 
-import javax.servlet.ReadListener;
-import javax.servlet.ServletInputStream;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.WriteListener;
 import javax.servlet.http.HttpSession;
-import javax.servlet.http.HttpUpgradeHandler;
-import javax.servlet.http.WebConnection;
 import javax.websocket.CloseReason;
 import javax.websocket.CloseReason.CloseCodes;
 import javax.websocket.DeploymentException;
 import javax.websocket.Endpoint;
 import javax.websocket.EndpointConfig;
 
+import org.apache.coyote.http11.upgrade.AbstractServletInputStream;
+import org.apache.coyote.http11.upgrade.AbstractServletOutputStream;
+import org.apache.coyote.http11.upgrade.servlet31.HttpUpgradeHandler;
+import org.apache.coyote.http11.upgrade.servlet31.ReadListener;
+import org.apache.coyote.http11.upgrade.servlet31.WebConnection;
+import org.apache.coyote.http11.upgrade.servlet31.WriteListener;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.res.StringManager;
@@ -91,8 +91,8 @@ public class WsHttpUpgradeHandler implem
 
 this.connection = connection;
 
-ServletInputStream sis;
-ServletOutputStream sos;
+AbstractServletInputStream sis;
+AbstractServletOutputStream sos;
 try {
 sis = connection.getInputStream();
 sos = connection.getOutputStream();

Modified: 
tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java?rev=1514670&r1=1514669&r2=1514670&view=diff
==
--- 
tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/modules/websocket/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
 Fri Aug 16 12:08:06 2013
@@ -25,6 +25,7 @@ import javax.servlet.ServletOutputStream
 import

svn commit: r1514668 - in /tomcat/tc7.0.x/trunk/java/org/apache: catalina/connector/ coyote/ coyote/ajp/ coyote/http11/ coyote/http11/upgrade/ coyote/http11/upgrade/servlet31/

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 12:04:35 2013
New Revision: 1514668

URL: http://svn.apache.org/r1514668
Log:
Back-porting JSR-356
Add the Servlet 3.1 based HTTP upgrade mechanism. The aim at this point is to 
enable the back-ported JSR-356 code to compile. I'm not worried (right now) 
about whether the added code works or not as long as it doesn't break any 
existing Tomcat 7 functionality.

Added:

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AbstractProcessor.java
  - copied, changed from r1514523, 
tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractProcessor.java

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletInputStream.java
  - copied, changed from r1514523, 
tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletInputStream.java

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java
  - copied, changed from r1514523, 
tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprProcessor.java
  - copied, changed from r1514523, 
tomcat/trunk/java/org/apache/coyote/http11/upgrade/AprProcessor.java

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletInputStream.java
  - copied unchanged from r1514523, 
tomcat/trunk/java/org/apache/coyote/http11/upgrade/AprServletInputStream.java

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletOutputStream.java
  - copied unchanged from r1514523, 
tomcat/trunk/java/org/apache/coyote/http11/upgrade/AprServletOutputStream.java
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/BioProcessor.java
  - copied, changed from r1514523, 
tomcat/trunk/java/org/apache/coyote/http11/upgrade/BioProcessor.java

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/BioServletInputStream.java
  - copied unchanged from r1514523, 
tomcat/trunk/java/org/apache/coyote/http11/upgrade/BioServletInputStream.java

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/BioServletOutputStream.java
  - copied unchanged from r1514523, 
tomcat/trunk/java/org/apache/coyote/http11/upgrade/BioServletOutputStream.java
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/NioProcessor.java
  - copied, changed from r1514523, 
tomcat/trunk/java/org/apache/coyote/http11/upgrade/NioProcessor.java

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/NioServletInputStream.java
  - copied unchanged from r1514523, 
tomcat/trunk/java/org/apache/coyote/http11/upgrade/NioServletInputStream.java

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/NioServletOutputStream.java
  - copied unchanged from r1514523, 
tomcat/trunk/java/org/apache/coyote/http11/upgrade/NioServletOutputStream.java
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/servlet31/   
(with props)

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/servlet31/HttpUpgradeHandler.java
  - copied, changed from r1514523, 
tomcat/trunk/java/javax/servlet/http/HttpUpgradeHandler.java

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/servlet31/ReadListener.java
  - copied, changed from r1514523, 
tomcat/trunk/java/javax/servlet/ReadListener.java

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/servlet31/WebConnection.java
  - copied, changed from r1514523, 
tomcat/trunk/java/javax/servlet/http/WebConnection.java

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/servlet31/WriteListener.java
  - copied, changed from r1514523, 
tomcat/trunk/java/javax/servlet/WriteListener.java
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Request.java
tomcat/tc7.0.x/trunk/java/org/apache/coyote/Processor.java
tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/UpgradeProcessor.java

Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Request.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Request.java?rev=1514668&r1=1514667&r2=1514668&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Request.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Request.java Fri 
Aug 16 12:04:35 2013
@@ -22,6 +22,7 @@ import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.UnsupportedEncodingException;
+import java.lang.reflect.InvocationTargetException;
 import java.nio.charset.Charset;
 import java.security.Principal;
 import java.text.SimpleDateFormat;
@@ 

[jira] [Commented] (MTOMCAT-177) tomcat7:deploy ignores proxy settings

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

[ 
https://issues.apache.org/jira/browse/MTOMCAT-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13742130#comment-13742130
 ] 

Olivier Lamy (*$^¨%`£) commented on MTOMCAT-177:


I wonder how you generate the patch?

Trying to apply it give me:

mb-olamy:tomcat-maven-plugin olamy$ git apply MTOMCAT-177.patch 
fatal: patch fragment without header at line 3: @@ -34,12 +34,14 @@ import 
org.apache.http.client.methods.HttpGet;
mb-olamy:tomcat-maven-plugin olamy$ patch -p0 < MTOMCAT-177.patch 
missing header for unified diff at line 3 of patch
(Stripping trailing CRs from patch.)
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--
| 
common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java
 
|index e9e2b84..dc2be06 100644
--
File to patch: 
common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java
 
patching file 
common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java
patch:  malformed patch at line 72: 

BTW I find this a bit odd

+/**
+ * @param proxy
+ */
+public void setProxy(Proxy proxy) {
+   if( this.proxy != proxy ) {
+   this.proxy = proxy;
+   if( httpClient != null ) {
+   applyProxy();
+   }
+   }
+   }
+

why not a simple method configureProxy(Proxy proxy)?
WDYT?



> tomcat7:deploy ignores proxy settings
> -
>
> Key: MTOMCAT-177
> URL: https://issues.apache.org/jira/browse/MTOMCAT-177
> Project: Apache Tomcat Maven Plugin
>  Issue Type: Bug
>  Components: tomcat7
>Affects Versions: 2.0
>Reporter: Brad Larson
>Assignee: Olivier Lamy (*$^¨%`£)
>  Labels: proxy
> Attachments: MTOMCAT-177.patch
>
>
> Using these settings:
> org.apache.tomcat.maven
> tomcat7-maven-plugin
> 2.0-SNAPSHOT
> When running tomcat7:deploy behind a network proxy (specified in 
> ~/.m2/settings.xml), the deploy will fail with a very generic error message.  
> Running outside of the proxy (with no proxy settings in ~/.m2/settings.xml) 
> works fine.
> The error message is simply "Connection refused", no other details provided.

--
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: r1514663 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/ java/org/apache/catalina/core/ java/org/apache/catalina/startup/ java/org/apache/tomcat/ test/org/apache/catalina/core/

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 11:51:28 2013
New Revision: 1514663

URL: http://svn.apache.org/r1514663
Log:
Back-porting JSR-356
Add InstanceManager to Context interface. This is required by the Servlet 3.1 
based upgrade mechanism.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/Context.java
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java

tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/FailedContext.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/InstanceManager.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TesterContext.java

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

Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/Context.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/Context.java?rev=1514663&r1=1514662&r2=1514663&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/Context.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/Context.java Fri Aug 16 
11:51:28 2013
@@ -40,6 +40,7 @@ import org.apache.catalina.deploy.LoginC
 import org.apache.catalina.deploy.NamingResources;
 import org.apache.catalina.deploy.SecurityConstraint;
 import org.apache.catalina.util.CharsetMapper;
+import org.apache.tomcat.InstanceManager;
 import org.apache.tomcat.JarScanner;
 import org.apache.tomcat.util.http.mapper.Mapper;
 
@@ -712,6 +713,16 @@ public interface Context extends Contain
  */
 public boolean getLogEffectiveWebXml();
 
+/**
+ * Get the instance manager associated with this context.
+ */
+public InstanceManager getInstanceManager();
+
+/**
+ * Set the instance manager associated with this context.
+ */
+public void setInstanceManager(InstanceManager instanceManager);
+
 // - Public Methods
 
 

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java?rev=1514663&r1=1514662&r2=1514663&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java 
Fri Aug 16 11:51:28 2013
@@ -1357,7 +1357,7 @@ public class ApplicationContext
 try {
 @SuppressWarnings("unchecked")
 T listener =
-(T) context.getInstanceManager().newInstance(c.getName());
+(T) context.getInstanceManager().newInstance(c);
 if (listener instanceof ServletContextListener ||
 listener instanceof ServletContextAttributeListener ||
 listener instanceof ServletRequestListener ||
@@ -1378,9 +1378,8 @@ public class ApplicationContext
 throw new ServletException(e);
 } catch (InstantiationException e) {
 throw new ServletException(e);
-} catch (ClassNotFoundException e) {
-throw new ServletException(e);
-}}
+}
+}
 
 
 @Override

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java?rev=1514663&r1=1514662&r2=1514663&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java 
Fri Aug 16 11:51:28 2013
@@ -133,6 +133,11 @@ public class DefaultInstanceManager impl
 }
 
 @Override
+public Object newInstance(Class clazz) throws IllegalAccessException, 
InvocationTargetException, NamingException, InstantiationException {
+return newInstance(clazz.newInstance(), clazz);
+}
+
+@Override
 public Object newInstance(String className) throws IllegalAccessException, 
InvocationTargetException, NamingException, InstantiationException, 
ClassNotFoundException {
 Class clazz = loadClassMaybePrivileged(className, classLoader);
 return newInstance(clazz.newInstance(), clazz);

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/FailedContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/FailedContext.java?rev=1514663&r1=1514662&r2=1514663&view=diff
==
--- tomcat/tc7.0.x/trunk/java/

Re: Code style rules: Line length

2013-08-16 Thread Olivier Lamy
On 14 August 2013 20:41, Mark Thomas  wrote:
> Summarising the response to this thread so far:
>
> There is a preference for not strictly enforcing whatever limit is
> selected. Rules need exceptions and committers can exercise judgement.
> It does create a grey area but the majority is OK with that.
>
> There is a mix of views on line length but there appears to be support
> for increasing the max line length for code and marginally less support
> for increasing the max line length for comments.
>
> Therefore, I'd like to propose the following:
>
> 1. Introduce a checkstyle enforced hard limit of 200 characters per line
> and fix any lines that exceed it. There are currently 24 lines that
> exceed this limit.
>
> 2. Increase acceptable line length for new / modified code and comments
> to 100. No mass reformatting would take place.
>
> 3. Consider further reducing the hard limit to 100 + suitable margin
> over time, possibly in stages. For example, reducing it to 120
> identifies 737 lines (quite a few files have multiple long lines so the
> number of files affected it a lot less than 737).
>
> Thoughts?
sounds good.
>
> I'm inclined to fix the lines identified by 1 regardless. 200+
> characters per line is far too wide.
>
> Mark
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>



-- 
Olivier Lamy
Ecetera: http://ecetera.com.au
http://twitter.com/olamy | http://linkedin.com/in/olamy

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



svn commit: r1514661 - in /tomcat/tc7.0.x/trunk/java/org/apache: catalina/connector/Request.java coyote/ActionCode.java coyote/ajp/AbstractAjpProcessor.java coyote/http11/AbstractHttp11Processor.java

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 11:34:57 2013
New Revision: 1514661

URL: http://svn.apache.org/r1514661
Log:
Back-porting JSR-356
Rename ActionCode.UPGRADE to ActionCode.UPGRADE_TOMCAT to mark this as the 
Tomcat proprietary upgrade mechanism.
Add a new ActionCode.UPGRADE action for the Servlet 3.1 based upgrade mechanism.

Modified:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Request.java
tomcat/tc7.0.x/trunk/java/org/apache/coyote/ActionCode.java
tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java

Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Request.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Request.java?rev=1514661&r1=1514660&r2=1514661&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Request.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Request.java Fri 
Aug 16 11:34:57 2013
@@ -2824,7 +2824,7 @@ public class Request
 public void doUpgrade(UpgradeInbound inbound)
 throws IOException {
 
-coyoteRequest.action(ActionCode.UPGRADE, inbound);
+coyoteRequest.action(ActionCode.UPGRADE_TOMCAT, inbound);
 
 // Output required by RFC2616. Protocol specific headers should have
 // already been set.

Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/ActionCode.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/ActionCode.java?rev=1514661&r1=1514660&r2=1514661&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/coyote/ActionCode.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/ActionCode.java Fri Aug 16 
11:34:57 2013
@@ -197,7 +197,12 @@ public enum ActionCode {
 ASYNC_IS_ERROR,
 
 /**
- * Callback to trigger the HTTP upgrade process.
+ * Callback to trigger Tomcat's proprietary HTTP upgrade process.
+ */
+UPGRADE_TOMCAT,
+
+/**
+ * Callback to trigger the Servlet 3.1 based HTTP upgrade process.
  */
 UPGRADE
 }

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java?rev=1514661&r1=1514660&r2=1514661&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java 
Fri Aug 16 11:34:57 2013
@@ -459,7 +459,7 @@ public abstract class AbstractAjpProcess
 ((AtomicBoolean) param).set(asyncStateMachine.isAsyncTimingOut());
 } else if (actionCode == ActionCode.ASYNC_IS_ERROR) {
 ((AtomicBoolean) param).set(asyncStateMachine.isAsyncError());
-} else if (actionCode == ActionCode.UPGRADE) {
+} else if (actionCode == ActionCode.UPGRADE_TOMCAT) {
 // HTTP connections only. Unsupported for AJP.
 // NOOP
 }  else {

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1514661&r1=1514660&r2=1514661&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java 
Fri Aug 16 11:34:57 2013
@@ -844,7 +844,7 @@ public abstract class AbstractHttp11Proc
 ((AtomicBoolean) param).set(asyncStateMachine.isAsyncTimingOut());
 } else if (actionCode == ActionCode.ASYNC_IS_ERROR) {
 ((AtomicBoolean) param).set(asyncStateMachine.isAsyncError());
-} else if (actionCode == ActionCode.UPGRADE) {
+} else if (actionCode == ActionCode.UPGRADE_TOMCAT) {
 upgradeInbound = (UpgradeInbound) param;
 // Stop further HTTP output
 getOutputBuffer().finished = true;



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



buildbot failure in ASF Buildbot on tomcat-trunk

2013-08-16 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-trunk while building 
ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/4842

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

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1514643
Blamelist: markt

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot





svn commit: r1514659 - in /tomcat/tc7.0.x/trunk/java/org/apache/coyote: AbstractProtocol.java http11/AbstractHttp11Processor.java

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 11:26:34 2013
New Revision: 1514659

URL: http://svn.apache.org/r1514659
Log:
Back-porting JSR-356
Old and new upgrade mechanisms have a isUpgrade() method on the processor and 
they need to be differentiated. Calls to the old version can easily be replaced 
so do so.

Modified:
tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java

Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java?rev=1514659&r1=1514658&r2=1514659&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java Fri Aug 
16 11:26:34 2013
@@ -588,7 +588,7 @@ public abstract class AbstractProtocol i
 state = processor.asyncDispatch(status);
 } else if (processor.isComet()) {
 state = processor.event(status);
-} else if (processor.isUpgrade()) {
+} else if (processor.getUpgradeInbound() != null) {
 state = processor.upgradeDispatch();
 } else {
 state = processor.process(socket);

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1514659&r1=1514658&r2=1514659&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java 
Fri Aug 16 11:26:34 2013
@@ -1103,7 +1103,7 @@ public abstract class AbstractHttp11Proc
 return SocketState.CLOSED;
 } else if (isAsync() || comet) {
 return SocketState.LONG;
-} else if (isUpgrade()) {
+} else if (getUpgradeInbound() != null) {
 return SocketState.UPGRADING;
 } else {
 if (sendfileInProgress) {



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



svn commit: r1514655 - in /tomcat/tc7.0.x/trunk/java/org/apache: coyote/ajp/AjpAprProtocol.java coyote/http11/Http11AprProtocol.java tomcat/util/net/AprEndpoint.java

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 11:08:25 2013
New Revision: 1514655

URL: http://svn.apache.org/r1514655
Log:
Back-porting JSR-356
Need to be able to register sockets for read and/or write for the APR/native 
Poller to implement non-blocking IO

Modified:
tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java?rev=1514655&r1=1514654&r2=1514655&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java Fri Aug 
16 11:08:25 2013
@@ -136,7 +136,7 @@ public class AjpAprProtocol extends Abst
 ((AprEndpoint)proto.endpoint).getPoller().add(
 socket.getSocket().longValue(),
 proto.endpoint.getKeepAliveTimeout(),
-AprEndpoint.Poller.FLAGS_READ);
+true, false);
 }
 }
 

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java?rev=1514655&r1=1514654&r2=1514655&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java 
Fri Aug 16 11:08:25 2013
@@ -250,7 +250,7 @@ public class Http11AprProtocol extends A
 ((AprEndpoint)proto.endpoint).getPoller().add(
 socket.getSocket().longValue(),
 proto.endpoint.getKeepAliveTimeout(),
-AprEndpoint.Poller.FLAGS_READ);
+true, false);
 }
 }
 
@@ -274,7 +274,7 @@ public class Http11AprProtocol extends A
 ((AprEndpoint) proto.endpoint).getCometPoller().add(
 socket.getSocket().longValue(),
 proto.endpoint.getSoTimeout(),
-AprEndpoint.Poller.FLAGS_READ);
+true, false);
 } else {
 // Process a STOP directly
 ((AprEndpoint) proto.endpoint).processSocket(
@@ -286,7 +286,7 @@ public class Http11AprProtocol extends A
 ((AprEndpoint) proto.endpoint).getPoller().add(
 socket.getSocket().longValue(),
 processor.getUpgradeInbound().getReadTimeout(),
-AprEndpoint.Poller.FLAGS_READ);
+true, false);
 }
 }
 

Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1514655&r1=1514654&r2=1514655&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Fri 
Aug 16 11:08:25 2013
@@ -1230,18 +1230,32 @@ public class AprEndpoint extends Abstrac
 }
 }
 
+
 /**
  * Add specified socket and associated pool to the poller. The socket
  * will be added to a temporary array, and polled first after a maximum
  * amount of time equal to pollTime (in most cases, latency will be 
much
- * lower, however).
+ * lower, however). Note: If both read and write are false, the socket
+ * will only be checked for timeout; if the socket was already present
+ * in the poller, a callback event will be generated and the socket 
will
+ * be removed from the poller.
  *
- * @param socketto add to the poller
- * @param timeout   read timeout (in milliseconds) to use with this
- *  socket. Use -1 for infinite timeout
- * @param flags flags that define the events that are to be polled
- *  for
+ * @param socket to add to the poller
+ * @param timeout to use for this connection
+ * @param read to do read polling
+ * @param write to do write polling
  */
+public void add(long socket, int timeout, boolean read, boolean write) 
{
+add(socket, timeout,
+(read ? Poll.APR_POLLIN : 0) |
+(write ? Poll.APR_POLLOUT :

svn commit: r1514653 - /tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 11:01:40 2013
New Revision: 1514653

URL: http://svn.apache.org/r1514653
Log:
Back-porting JSR-356
Add the locks to the SocketWrapper required to implement non-blocking IO

Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java?rev=1514653&r1=1514652&r2=1514653&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java Fri 
Aug 16 11:01:40 2013
@@ -16,6 +16,10 @@
  */
 package org.apache.tomcat.util.net;
 
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
+
 public class SocketWrapper {
 
 protected volatile E socket;
@@ -28,8 +32,29 @@ public class SocketWrapper {
 protected boolean async = false;
 protected boolean keptAlive = false;
 
+/*
+ * Used if block/non-blocking is set at the socket level. The client is
+ * responsible for the thread-safe use of this field via the locks 
provided.
+ */
+private volatile boolean blockingStatus = true;
+private final Lock blockingStatusReadLock;
+private final WriteLock blockingStatusWriteLock;
+
+/*
+ * In normal servlet processing only one thread is allowed to access the
+ * socket at a time. That is controlled by a lock on the socket for both
+ * read and writes). When HTTP upgrade is used, one read thread and one
+ * write thread are allowed to access the socket concurrently. In this case
+ * the lock on the socket is used for reads and the lock below is used for
+ * writes.
+ */
+private final Object writeThreadLock = new Object();
+
 public SocketWrapper(E socket) {
 this.socket = socket;
+ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
+this.blockingStatusReadLock = lock.readLock();
+this.blockingStatusWriteLock =lock.writeLock();
 }
 
 public E getSocket() {
@@ -49,4 +74,13 @@ public class SocketWrapper {
 public int decrementKeepAlive() { return (--keepAliveLeft);}
 public boolean isKeptAlive() {return keptAlive;}
 public void setKeptAlive(boolean keptAlive) {this.keptAlive = keptAlive;}
+public boolean getBlockingStatus() { return blockingStatus; }
+public void setBlockingStatus(boolean blockingStatus) {
+this.blockingStatus = blockingStatus;
+}
+public Lock getBlockingStatusReadLock() { return blockingStatusReadLock; }
+public WriteLock getBlockingStatusWriteLock() {
+return blockingStatusWriteLock;
+}
+public Object getWriteThreadLock() { return writeThreadLock; }
 }



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



svn commit: r1514652 - /tomcat/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 10:58:18 2013
New Revision: 1514652

URL: http://svn.apache.org/r1514652
Log:
Move method location in file for consistency

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

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java?rev=1514652&r1=1514651&r2=1514652&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java Fri Aug 16 
10:58:18 2013
@@ -61,7 +61,6 @@ public class SocketWrapper {
  * writes.
  */
 private final Object writeThreadLock = new Object();
-public Object getWriteThreadLock() { return writeThreadLock; }
 
 private Set dispatches = new LinkedHashSet<>();
 
@@ -113,6 +112,7 @@ public class SocketWrapper {
 public WriteLock getBlockingStatusWriteLock() {
 return blockingStatusWriteLock;
 }
+public Object getWriteThreadLock() { return writeThreadLock; }
 public void addDispatch(DispatchType dispatchType) {
 dispatches.add(dispatchType);
 }



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



svn commit: r1514651 - in /tomcat/tc7.0.x/trunk/java/org/apache: catalina/connector/ coyote/ajp/ coyote/http11/ tomcat/util/net/

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 10:55:12 2013
New Revision: 1514651

URL: http://svn.apache.org/r1514651
Log:
Back-porting JSR-356
Rename SocketStatus.OPEN -> SocketStatus.OPEN_READ
Add SocketStatus.OPEN_WRITE
Required by the changes to implement non-blocking IO.

Modified:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java
tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java
tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpProcessor.java
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/Http11Processor.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SocketStatus.java

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=1514651&r1=1514650&r2=1514651&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 
Fri Aug 16 10:55:12 2013
@@ -155,7 +155,7 @@ public class CoyoteAdapter implements Ad
 boolean error = false;
 boolean read = false;
 try {
-if (status == SocketStatus.OPEN) {
+if (status == SocketStatus.OPEN_READ) {
 if (response.isClosed()) {
 // The event has been closed asynchronously, so call end 
instead of
 // read to cleanup the pipeline
@@ -219,7 +219,7 @@ public class CoyoteAdapter implements Ad
 
connector.getService().getContainer().getPipeline().getFirst().event(request, 
response, request.getEvent());
 }
 if (response.isClosed() || !request.isComet()) {
-if (status==SocketStatus.OPEN &&
+if (status==SocketStatus.OPEN_READ &&
 request.getEvent().getEventType() != EventType.END) {
 //CometEvent.close was called during an event other than 
END
 request.getEvent().setEventType(CometEvent.EventType.END);
@@ -308,7 +308,7 @@ public class CoyoteAdapter implements Ad
 if (!response.isClosed() && !response.isError()) {
 if (request.getAvailable() || (request.getContentLength() 
> 0 && (!request.isParametersParsed( {
 // Invoke a read event right away if there are 
available bytes
-if (event(req, res, SocketStatus.OPEN)) {
+if (event(req, res, SocketStatus.OPEN_READ)) {
 comet = true;
 res.action(ActionCode.COMET_BEGIN, null);
 }
@@ -411,7 +411,7 @@ public class CoyoteAdapter implements Ad
 if (!response.isClosed() && !response.isError()) {
 if (request.getAvailable() || 
(request.getContentLength() > 0 && (!request.isParametersParsed( {
 // Invoke a read event right away if there are 
available bytes
-if (event(req, res, SocketStatus.OPEN)) {
+if (event(req, res, SocketStatus.OPEN_READ)) {
 comet = true;
 res.action(ActionCode.COMET_BEGIN, null);
 }

Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java?rev=1514651&r1=1514650&r2=1514651&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java Fri 
Aug 16 10:55:12 2013
@@ -261,7 +261,7 @@ public class AjpAprProcessor extends Abs
 if (actionCode == ActionCode.ASYNC_COMPLETE) {
 if (asyncStateMachine.asyncComplete()) {
 ((AprEndpoint)endpoint).processSocketAsync(this.socket,
-SocketStatus.OPEN);
+SocketStatus.OPEN_READ);
 }
 } else if (actionCode == ActionCode.ASYNC_SETTIMEOUT) {
 if (param == null) return;
@@ -270,7 +270,7 @@ public class AjpAprProcessor extends Abs
 } else if (actionCode == ActionCode.ASYNC_DISPATC

svn commit: r1514648 - in /tomcat/tc7.0.x/trunk/res: checkstyle/org-import-control.xml maven/tomcat-coyote.pom

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 10:51:42 2013
New Revision: 1514648

URL: http://svn.apache.org/r1514648
Log:
Back-porting JSR-356
Coyote has new dependency on Servlet API because upgrade mechanism uses 
Servlet[In|Out]putStream.

Modified:
tomcat/tc7.0.x/trunk/res/checkstyle/org-import-control.xml
tomcat/tc7.0.x/trunk/res/maven/tomcat-coyote.pom

Modified: tomcat/tc7.0.x/trunk/res/checkstyle/org-import-control.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/res/checkstyle/org-import-control.xml?rev=1514648&r1=1514647&r2=1514648&view=diff
==
--- tomcat/tc7.0.x/trunk/res/checkstyle/org-import-control.xml (original)
+++ tomcat/tc7.0.x/trunk/res/checkstyle/org-import-control.xml Fri Aug 16 
10:51:42 2013
@@ -79,6 +79,7 @@
 
   
   
+
 
 
 

Modified: tomcat/tc7.0.x/trunk/res/maven/tomcat-coyote.pom
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/res/maven/tomcat-coyote.pom?rev=1514648&r1=1514647&r2=1514648&view=diff
==
--- tomcat/tc7.0.x/trunk/res/maven/tomcat-coyote.pom (original)
+++ tomcat/tc7.0.x/trunk/res/maven/tomcat-coyote.pom Fri Aug 16 10:51:42 2013
@@ -32,6 +32,12 @@
   
 
   org.apache.tomcat
+  tomcat-servlet-api
+  @MAVEN.DEPLOY.VERSION@
+  compile
+
+
+  org.apache.tomcat
   tomcat-juli
   @MAVEN.DEPLOY.VERSION@
   compile



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



svn commit: r1514643 - /tomcat/trunk/java/javax/servlet/http/WebConnection.java

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 10:26:23 2013
New Revision: 1514643

URL: http://svn.apache.org/r1514643
Log:
@since on class, no need to have it on methods as well

Modified:
tomcat/trunk/java/javax/servlet/http/WebConnection.java

Modified: tomcat/trunk/java/javax/servlet/http/WebConnection.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/http/WebConnection.java?rev=1514643&r1=1514642&r2=1514643&view=diff
==
--- tomcat/trunk/java/javax/servlet/http/WebConnection.java (original)
+++ tomcat/trunk/java/javax/servlet/http/WebConnection.java Fri Aug 16 10:26:23 
2013
@@ -32,16 +32,12 @@ public interface WebConnection extends A
 /**
  * Provides access to the {@link ServletInputStream} for reading data from
  * the client.
- *
- * @since Servlet 3.1
  */
 ServletInputStream getInputStream() throws IOException;
 
 /**
  * Provides access to the {@link ServletOutputStream} for writing data to
  * the client.
- *
- * @since Servlet 3.1
  */
 ServletOutputStream getOutputStream() throws IOException;
 }
\ No newline at end of file



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



Re: Back-porting JSR-356 implementation to 7.0.x

2013-08-16 Thread Niki Dokovski
On Fri, Aug 16, 2013 at 11:01 AM, Mark Thomas  wrote:

> On 16/08/2013 08:16, Niki Dokovski wrote:
> > On Fri, Aug 16, 2013 at 9:54 AM, Mark Thomas  wrote:
> >
> >> Christopher Schultz  wrote:
> >>> Mark,
> >>>
> >>> On 8/15/13 6:47 PM, Mark Thomas wrote:
>  This isn't going to be quite as simple as I first thought.
> 
>  The WebSocket client API requires Java SE 7 or later.
>  The WebSocket server API requires Java EE 6 or later.
>  Java EE 6 requires Java 6 or later.
> >>>
> >>> Clarification: are you saying that Java EE requires that it be allowed
> >>> to run on JVMs as low as Java 6?
> >>
> >> Java EE 6 is the version Tomcat 7 uses.
> >>
>  The WebSocket server API depends on the WebSocket client API.
> 
>  The WebSocket client implementation makes extensive use of new Java 7
>  non-blocking IO features.
> >>>
> >>> Are any of these possible (albeit with some back-flips) with Java 6?
> >>
> >> The first thing I thought of. It is possible but would require a
> selector,
> >> poller and thread pool implementation plus associated plumbing. Java 7
> >> looks like the better option at this point.
> >>
> >>> Perhaps one class (Java7NioShims) could be replaced with another
> >>> implementation (Java6NioShim) at runtime depending upon the current
> >>> JVM?
> >>> I know nothing about the code involved... just stabbing in the dark.
> >>>
>  My conclusion from the above is that the back-port is going to
> >>> require
>  Java 7. That begs the question how to do that while keeping the main
>  build Java 6 based.
> 
>  My (untested) plan is as follows:
>  - Create a WebSocket module
>  - Back-port (i.e. copy) the trunk code to that module
>  - Build just that module with Java 7
>  - Make the minimum changes necessary to get it to work
>  - Modify the back-ported SCI so it only adds the filter if Java 7 is
>  detected (going to need to ensure the SCI is executable on Java 6)
>  - Ship Tomcat 7 with the WebSocket JARs
> >>>
> >>> I'm not sure there's a better way, but the whole
> >>> compile-one-module-with-a-higher-version thing has been a small thorn
> >>> in
> >>> the past (IIRC, Tomcat 6 had to be built with Java 6, but could be run
> >>> with Java 5) causing a mild amount of confusion. If this could be
> >>> avoided, I think it might be best.
> >>
> >> I know. I'm trying to find the minimum effort, minimum risk, minimum
> >> hassle solution but there isn't a perfect solution that I can see.
> >>
> >>> Maybe we could package JSR-356-for-Tomcat7 as an optional module that
> >>> has a Java 7 prerequisite?
> >>
> >> I'd really like to ship JSR-356 suport as standard.
> >>
> >
> > How about making Java 7 hard requirement for releases that include JSR
> 356
> > implementation? Is this OK?
>
> No. Tomcat 7 needs to run on Java 6. I think it is doable with a little
> hoop jumping. Lets see what a first solution looks like and worry about
> better solutions if we need one.
>

OK. The implementation in Tomcat 8 is well tested and we need to do the
same for Tomcat 7.

niki


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


svn commit: r1514618 - /tomcat/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties

2013-08-16 Thread markt
Author: markt
Date: Fri Aug 16 08:46:32 2013
New Revision: 1514618

URL: http://svn.apache.org/r1514618
Log:
Remove unused value

Modified:
tomcat/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties

Modified: 
tomcat/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties?rev=1514618&r1=1514617&r2=1514618&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties 
Fri Aug 16 08:46:32 2013
@@ -28,5 +28,3 @@ apr.read.error=Unexpected error [{0}] re
 apr.write.error=Unexpected error [{0}] writing data to the APR/native socket.
 apr.closed=The socket associated with this connection has been closed.
 
-nio.eof.error=Unexpected EOF read on the socket
-



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



Re: Code style rules: Line length

2013-08-16 Thread Konstantin Kolinko
2013/8/14 Mark Thomas :
> Summarising the response to this thread so far:
>
> There is a preference for not strictly enforcing whatever limit is
> selected. Rules need exceptions and committers can exercise judgement.
> It does create a grey area but the majority is OK with that.
>
> There is a mix of views on line length but there appears to be support
> for increasing the max line length for code and marginally less support
> for increasing the max line length for comments.
>
> Therefore, I'd like to propose the following:
>
> 1. Introduce a checkstyle enforced hard limit of 200 characters per line
> and fix any lines that exceed it. There are currently 24 lines that
> exceed this limit.
>

+1

> 2. Increase acceptable line length for new / modified code and comments
> to 100. No mass reformatting would take place.
>

+1 for *.java

I would prefer that documentation (.txt, .xml) stay to have
recommended line length of 80.

I do not care about line length in other files such as *.properties.

> 3. Consider further reducing the hard limit to 100 + suitable margin
> over time, possibly in stages. For example, reducing it to 120
> identifies 737 lines (quite a few files have multiple long lines so the
> number of files affected it a lot less than 737).
>

+1

> Thoughts?
>
> I'm inclined to fix the lines identified by 1 regardless. 200+
> characters per line is far too wide.
>

Best regards,
Konstantin Kolinko

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



Re: Back-porting JSR-356 implementation to 7.0.x

2013-08-16 Thread Mark Thomas
On 16/08/2013 08:16, Niki Dokovski wrote:
> On Fri, Aug 16, 2013 at 9:54 AM, Mark Thomas  wrote:
> 
>> Christopher Schultz  wrote:
>>> Mark,
>>>
>>> On 8/15/13 6:47 PM, Mark Thomas wrote:
 This isn't going to be quite as simple as I first thought.

 The WebSocket client API requires Java SE 7 or later.
 The WebSocket server API requires Java EE 6 or later.
 Java EE 6 requires Java 6 or later.
>>>
>>> Clarification: are you saying that Java EE requires that it be allowed
>>> to run on JVMs as low as Java 6?
>>
>> Java EE 6 is the version Tomcat 7 uses.
>>
 The WebSocket server API depends on the WebSocket client API.

 The WebSocket client implementation makes extensive use of new Java 7
 non-blocking IO features.
>>>
>>> Are any of these possible (albeit with some back-flips) with Java 6?
>>
>> The first thing I thought of. It is possible but would require a selector,
>> poller and thread pool implementation plus associated plumbing. Java 7
>> looks like the better option at this point.
>>
>>> Perhaps one class (Java7NioShims) could be replaced with another
>>> implementation (Java6NioShim) at runtime depending upon the current
>>> JVM?
>>> I know nothing about the code involved... just stabbing in the dark.
>>>
 My conclusion from the above is that the back-port is going to
>>> require
 Java 7. That begs the question how to do that while keeping the main
 build Java 6 based.

 My (untested) plan is as follows:
 - Create a WebSocket module
 - Back-port (i.e. copy) the trunk code to that module
 - Build just that module with Java 7
 - Make the minimum changes necessary to get it to work
 - Modify the back-ported SCI so it only adds the filter if Java 7 is
 detected (going to need to ensure the SCI is executable on Java 6)
 - Ship Tomcat 7 with the WebSocket JARs
>>>
>>> I'm not sure there's a better way, but the whole
>>> compile-one-module-with-a-higher-version thing has been a small thorn
>>> in
>>> the past (IIRC, Tomcat 6 had to be built with Java 6, but could be run
>>> with Java 5) causing a mild amount of confusion. If this could be
>>> avoided, I think it might be best.
>>
>> I know. I'm trying to find the minimum effort, minimum risk, minimum
>> hassle solution but there isn't a perfect solution that I can see.
>>
>>> Maybe we could package JSR-356-for-Tomcat7 as an optional module that
>>> has a Java 7 prerequisite?
>>
>> I'd really like to ship JSR-356 suport as standard.
>>
> 
> How about making Java 7 hard requirement for releases that include JSR 356
> implementation? Is this OK?

No. Tomcat 7 needs to run on Java 6. I think it is doable with a little
hoop jumping. Lets see what a first solution looks like and worry about
better solutions if we need one.

Mark


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



Re: Back-porting JSR-356 implementation to 7.0.x

2013-08-16 Thread Mark Thomas
Nick Williams  wrote:
>
>On Aug 15, 2013, at 5:47 PM, Mark Thomas wrote:

>> My (untested) plan is as follows:
>> - Create a WebSocket module
>> - Back-port (i.e. copy) the trunk code to that module
>> - Build just that module with Java 7
>> - Make the minimum changes necessary to get it to work
>> - Modify the back-ported SCI so it only adds the filter if Java 7 is
>> detected (going to need to ensure the SCI is executable on Java 6)
>> - Ship Tomcat 7 with the WebSocket JARs
>> 
>> Comments?
>
>Sounds workable. Not ideal. But workable.

Indeed. I'm currently unsure how I am going to handle the incompatible
upgrade mechanisms at this point. Side by side would be simplest but it
depends on what that does to the low level connector code.

>Getting the SCI compiled to be executable shouldn't be a problem. Just
>compile the module -source 1.6 -target 1.6 on Java 7. As long as you
>don't use Java 7 language features, you can still compile against the
>APIs.

The Java 7 features used are minimal ( <> and multi-catch). I'd prefer
to keep them to make keeping the code in sync with 8 simpler but that
would create a more "interesting" build. I guess they'll be being removed.

Mark


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



Re: Back-porting JSR-356 implementation to 7.0.x

2013-08-16 Thread Niki Dokovski
On Fri, Aug 16, 2013 at 9:54 AM, Mark Thomas  wrote:

> Christopher Schultz  wrote:
> >Mark,
> >
> >On 8/15/13 6:47 PM, Mark Thomas wrote:
> >> This isn't going to be quite as simple as I first thought.
> >>
> >> The WebSocket client API requires Java SE 7 or later.
> >> The WebSocket server API requires Java EE 6 or later.
> >> Java EE 6 requires Java 6 or later.
> >
> >Clarification: are you saying that Java EE requires that it be allowed
> >to run on JVMs as low as Java 6?
>
> Java EE 6 is the version Tomcat 7 uses.
>
> >> The WebSocket server API depends on the WebSocket client API.
> >>
> >> The WebSocket client implementation makes extensive use of new Java 7
> >> non-blocking IO features.
> >
> >Are any of these possible (albeit with some back-flips) with Java 6?
>
> The first thing I thought of. It is possible but would require a selector,
> poller and thread pool implementation plus associated plumbing. Java 7
> looks like the better option at this point.
>
> >Perhaps one class (Java7NioShims) could be replaced with another
> >implementation (Java6NioShim) at runtime depending upon the current
> >JVM?
> >I know nothing about the code involved... just stabbing in the dark.
> >
> >> My conclusion from the above is that the back-port is going to
> >require
> >> Java 7. That begs the question how to do that while keeping the main
> >> build Java 6 based.
> >>
> >> My (untested) plan is as follows:
> >> - Create a WebSocket module
> >> - Back-port (i.e. copy) the trunk code to that module
> >> - Build just that module with Java 7
> >> - Make the minimum changes necessary to get it to work
> >> - Modify the back-ported SCI so it only adds the filter if Java 7 is
> >> detected (going to need to ensure the SCI is executable on Java 6)
> >> - Ship Tomcat 7 with the WebSocket JARs
> >
> >I'm not sure there's a better way, but the whole
> >compile-one-module-with-a-higher-version thing has been a small thorn
> >in
> >the past (IIRC, Tomcat 6 had to be built with Java 6, but could be run
> >with Java 5) causing a mild amount of confusion. If this could be
> >avoided, I think it might be best.
>
> I know. I'm trying to find the minimum effort, minimum risk, minimum
> hassle solution but there isn't a perfect solution that I can see.
>
> >Maybe we could package JSR-356-for-Tomcat7 as an optional module that
> >has a Java 7 prerequisite?
>
> I'd really like to ship JSR-356 suport as standard.
>

How about making Java 7 hard requirement for releases that include JSR 356
implementation? Is this OK?
It's preferable to keep the implementations in Tomcat 7 and Tomcat 8 as
close as possible.


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


buildbot success in ASF Buildbot on tomcat-trunk

2013-08-16 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/4840

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

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1514588
Blamelist: jboynes

Build succeeded!

sincerely,
 -The Buildbot