[Bug 61003] Secure Websocket client hides Exception on error, and throws an IllegalStateException instead

2017-04-19 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=61003

--- Comment #1 from Mark Thomas  ---
If you add  writing.set(false); /  reading.set(false); to the catch blocks of
the WriteTask and ReadTask respectively, does that improve things?

-- 
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: r1791971 - in /tomcat/tc8.5.x/trunk: ./ java/org/apache/jasper/compiler/EncodingDetector.java

2017-04-19 Thread markt
Author: markt
Date: Wed Apr 19 20:22:46 2017
New Revision: 1791971

URL: http://svn.apache.org/viewvc?rev=1791971&view=rev
Log:
Skip bytes in correct stream. Patch by Lazar.

Modified:
tomcat/tc8.5.x/trunk/   (props changed)
tomcat/tc8.5.x/trunk/java/org/apache/jasper/compiler/EncodingDetector.java

Propchange: tomcat/tc8.5.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Apr 19 20:22:46 2017
@@ -1 +1 @@
-/tomcat/trunk:1734785,1734799,1734845,1734928,1735041,1735044,1735480,1735577,1735597,1735599-1735600,1735615,1736145,1736162,1736209,1736280,1736297,1736299,1736489,1736646,1736703,1736836,1736849,1737104-1737105,1737112,1737117,1737119-1737120,1737155,1737157,1737192,1737280,1737339,1737632,1737664,1737715,1737748,1737785,1737834,1737860,1737903,1737959,1738005,1738007,1738014-1738015,1738018,1738022,1738039,1738043,1738059-1738060,1738147,1738149,1738174-1738175,1738261,1738589,1738623-1738625,1738643,1738816,1738850,1738855,1738946-1738948,1738953-1738954,1738979,1738982,1739079-1739081,1739087,1739113,1739153,1739172,1739176,1739191,1739474,1739726,1739762,1739775,1739814,1739817-1739818,1739975,1740131,1740324,1740465,1740495,1740508-1740509,1740520,1740535,1740707,1740803,1740810,1740969,1740980,1740991,1740997,1741015,1741033,1741036,1741058,1741060,1741080,1741147,1741159,1741164,1741173,1741181,1741190,1741197,1741202,1741208,1741213,1741221,1741225,1741232,1741409,1741501
 
,1741677,1741892,1741896,1741984,1742023,1742042,1742071,1742090,1742093,1742101,1742105,1742111,1742139,1742146,1742148,1742166,1742181,1742184,1742187,1742246,1742248-1742251,1742263-1742264,1742268,1742276,1742369,1742387,1742448,1742509-1742512,1742917,1742919,1742933,1742975-1742976,1742984,1742986,1743019,1743115,1743117,1743124-1743125,1743134,1743425,1743554,1743679,1743696-1743698,1743700-1743701,1744058,1744064-1744065,1744125,1744194,1744229,1744270,1744323,1744432,1744684,1744697,1744705,1744713,1744760,1744786,1745083,1745142-1745143,1745145,1745177,1745179-1745180,1745227,1745248,1745254,1745337,1745467,1745473,1745576,1745735,1745744,1746304,1746306-1746307,1746319,1746327,1746338,1746340-1746341,1746344,1746427,1746441,1746473,1746490,1746492,1746495-1746496,1746499-1746501,1746503-1746507,1746509,1746549,1746551,1746554,1746556,1746558,1746584,1746620,1746649,1746724,1746939,1746989,1747014,1747028,1747035,1747210,1747225,1747234,1747253,1747404,1747506,1747536,1747
 
924,1747980,1747993,1748001,1748253,1748452,1748547,1748629,1748676,1748715,1749287,1749296,1749328,1749373,1749465,1749506,1749508,1749665-1749666,1749763,1749865-1749866,1749898,1749978,1749980,1750011,1750015,1750056,1750480,1750617,1750634,1750692,1750697,1750700,1750703,1750707,1750714,1750718,1750723,1750774,1750899,1750975,1750995,1751061,1751097,1751173,1751438,1751447,1751463,1751702,1752212,1752737,1752745,1753078,1753080,1753358,1753363,1754111,1754140-1754141,1754281,1754310,1754445,1754467,1754494,1754496,1754528,1754532-1754533,1754613,1754714,1754874,1754941,1754944,1754950-1754951,1755005,1755007,1755009,1755132,1755180-1755181,1755185,1755190,1755204-1755206,1755208,1755214,1755224,1755227,1755230,1755629,1755646-1755647,1755650,1755653,1755675,1755680,1755683,1755693,1755717,1755731-1755737,1755812,1755828,1755884,1755890,1755918-1755919,1755942,1755958,1755960,1755970,1755993,1756013,1756019,1756039,1756056,1756083-1756114,1756175,1756288-1756289,1756408-1756410,1
 
756778,1756798,1756878,1756898,1756939,1757123-1757124,1757126,1757128,1757132-1757133,1757136,1757145,1757167-1757168,1757175,1757180,1757182,1757195,1757271,1757278,1757347,1757353-1757354,1757363,1757374,1757399,1757406,1757408,1757485,1757495,1757499,1757527,1757578,1757684,1757722,1757727,1757790,1757799,1757813,1757853,1757883,1757903,1757976,1757997,1758000,1758058,1758072-1758075,1758078-1758079,1758223,1758257,1758261,1758276,1758292,1758369,1758378-1758383,1758421,1758423,1758425-1758427,1758430,1758443,1758448,1758459,1758483,1758486-1758487,1758499,1758525,1758556,1758580,1758582,1758584,1758588,1758842,1759019,1759212,1759224,1759227,1759252,1759274,1759513-1759516,1759611,1759757,1759785-1759790,1760005,1760022,1760109-1760110,1760135,1760200-1760201,1760227,1760300,1760397,1760446,1760454,1760640,1760648,1761057,1761422,1761491,1761498,1761500-1761501,1761550,1761553,1761572,1761574,1761625-1761626,1761628,1761682,1761740,1761752,1762051-1762053,1762123,1762168,176217
 
2,1762182,1762201-1762202,1762204,1762208,1762288,1762296,1762324,1762348,1762353,1762362,1762374,1762492,1762503,1762505,1762541,1762608,1762710,1762753,1762766,1762769,1762944,1762947,1762953,1763167,1763179,1763232,1763259,1763271-1763272,1763276-1763277,1763319-1763320,1763370,1763372,1763375,1763377,1763393,1763412,1763430,1763450,1763462,1763505,1763511-1763512,1763516,1763518,1763520,1763529,1763559,1763565,1763568,1763574,1763619,1763634-1763635,1763718,1763786,1763798-1763799,17

svn commit: r1791970 - /tomcat/trunk/java/org/apache/jasper/compiler/EncodingDetector.java

2017-04-19 Thread markt
Author: markt
Date: Wed Apr 19 20:22:07 2017
New Revision: 1791970

URL: http://svn.apache.org/viewvc?rev=1791970&view=rev
Log:
Skip bytes in correct stream. Patch by Lazar.

Modified:
tomcat/trunk/java/org/apache/jasper/compiler/EncodingDetector.java

Modified: tomcat/trunk/java/org/apache/jasper/compiler/EncodingDetector.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/EncodingDetector.java?rev=1791970&r1=1791969&r2=1791970&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/EncodingDetector.java 
(original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/EncodingDetector.java Wed Apr 
19 20:22:07 2017
@@ -60,7 +60,7 @@ class EncodingDetector {
 // to work. Skip any BoM we discovered.
 bis.reset();
 for (int i = 0; i < bomResult.skip; i++) {
-is.read();
+bis.read();
 }
 
 String prologEncoding = getPrologEncoding(bis);



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



[Bug 60769] Problem with Jsp character encoding configuration

2017-04-19 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60769

--- Comment #11 from Mark Thomas  ---
Good catch. That would be a bug. I'll get it fixed.

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



[ANN] Apache Tomcat 8.5.14 available

2017-04-19 Thread Mark Thomas
The Apache Tomcat team announces the immediate availability of Apache
Tomcat 8.5.14.

Tomcat 8.x users should normally be using 8.5.x releases in preference
to 8.0.x releases.

Apache Tomcat 8 is an open source software implementation of the Java
Servlet, JavaServer Pages, Java Unified Expression Language, Java
WebSocket and Java Authentication Service Provider Interface for
Containers technologies.

Apache Tomcat 8.5.x is intended to replace 8.0.x and includes new
features pulled forward from the 9.0.x branch. The notable changes since
8.5.13 include:


- Correct a regression that broke JMX operations (including the Manager
  web application) if the operation took parameters

- Calls to isReady() no longer throw exceptions after timeouts for async
  servlets


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

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

Migration guides from Apache Tomcat 5.x, 6.x, 7.x and 8.0.x:
http://tomcat.apache.org/migration.html

Join us at TomcatCon in Miami for 3 days of Apache Tomcat content:
https://tomcat.apache.org/conference.html

Enjoy!

- The Apache Tomcat team

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



[ANN] Apache Tomcat 9.0.0.M20 available

2017-04-19 Thread Mark Thomas
The Apache Tomcat team announces the immediate availability of Apache
Tomcat 9.0.0.M20.

Apache Tomcat 9 is an open source software implementation of the Java
Servlet, JavaServer Pages, Java Unified Expression Language, Java
WebSocket and JASPIC technologies.

Apache Tomcat 9.0.0.M20 is a milestone release of the 9.0.x branch and
has been made to provide users with early access to the new features in
Apache Tomcat 9.0.x so that they may provide feedback. The notable
changes compared to 9.0.0.M19 include:

- Correct a regression that broke JMX operations (including the Manager
  web application) if the operation took parameters

- Add JMX support for Tribes components

- Calls to isReady() no longer throw exceptions after timeouts for async
  servlets


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

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

Migration guides from Apache Tomcat 5.x, 6.x, 7.x and 8.x:
http://tomcat.apache.org/migration.html

Join us at TomcatCon in Miami for 3 days of Apache Tomcat content:
https://tomcat.apache.org/conference.html

Enjoy!

- The Apache Tomcat team

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



svn commit: r1791963 - in /tomcat/site/trunk: docs/conference.html xdocs/conference.xml

2017-04-19 Thread markt
Author: markt
Date: Wed Apr 19 20:03:22 2017
New Revision: 1791963

URL: http://svn.apache.org/viewvc?rev=1791963&view=rev
Log:
Early bird pricing has ended

Modified:
tomcat/site/trunk/docs/conference.html
tomcat/site/trunk/xdocs/conference.xml

Modified: tomcat/site/trunk/docs/conference.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/conference.html?rev=1791963&r1=1791962&r2=1791963&view=diff
==
--- tomcat/site/trunk/docs/conference.html (original)
+++ tomcat/site/trunk/docs/conference.html Wed Apr 19 20:03:22 2017
@@ -259,7 +259,7 @@
 
 
 http://events.linuxfoundation.org/events/apachecon-north-america/attend/register-";>Registration
-   for TomcatCon is open with early bird prices available until 12 March.
+   for TomcatCon is open.
Registration includes access to ApacheCon and the other co-located Apache
conferences.
 

Modified: tomcat/site/trunk/xdocs/conference.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/conference.xml?rev=1791963&r1=1791962&r2=1791963&view=diff
==
--- tomcat/site/trunk/xdocs/conference.xml (original)
+++ tomcat/site/trunk/xdocs/conference.xml Wed Apr 19 20:03:22 2017
@@ -29,7 +29,7 @@
help inform future development.
 
 http://events.linuxfoundation.org/events/apachecon-north-america/attend/register-";>Registration
-   for TomcatCon is open with early bird prices available until 12 March.
+   for TomcatCon is open.
Registration includes access to ApacheCon and the other co-located Apache
conferences.
 



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



[Bug 60963] Optimize class loading for unpackWARs=false case

2017-04-19 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60963

--- Comment #12 from Thomas Meyer  ---
(In reply to Konstantin Kolinko from comment #11)
> (In reply to Thomas Meyer from comment #8)
> > 
> > Theoretically we want those bytes to be counted, but the ZipInputStream
> > doesn't read anything in it's construction phase, that's why the whole "fast
> > forward skipping works at all".
> > And yes this is a somewhat hackish solution but it works.
> > 
> 
> 1. I do not know whether this is a concern (I have not looked at the patch),
> but note the behaviour that was recently reported as bug 60940:
> 
> JarInputStream constructor does read MANIFEST.MF and META-INF/ directory
> entry that may precede it.

Yes, I saw this and it's still done after the patch.

What I didn't finish to understand is the validation of the signed MANIFEST.MF
entries. Is it really enough to just read through the whole JAR file with a
JarInputStream with getNextJarEntry() and everything is automagically checked
for correctness?

Do we care that a WAR file contains only correct signed JAR files? I never
really was involved in the topic signed war files and/or containing jar files
inside a war file.

> 
> 2. Zip* and Jar* APIs differ in their handling of i18n filenames. JAR
> specification uses UTF-8 for file names, Zip uses platform encoding by
> default.

That is an important hint, I think we should really go for an minimal
functional ZIP "PK entry" parser to extract the offset of each "PK entry
start", to fast forward in the jar file inside the war file.

-- 
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 60963] Optimize class loading for unpackWARs=false case

2017-04-19 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60963

--- Comment #11 from Konstantin Kolinko  ---
(In reply to Thomas Meyer from comment #8)
> 
> Theoretically we want those bytes to be counted, but the ZipInputStream
> doesn't read anything in it's construction phase, that's why the whole "fast
> forward skipping works at all".
> And yes this is a somewhat hackish solution but it works.
> 

1. I do not know whether this is a concern (I have not looked at the patch),
but note the behaviour that was recently reported as bug 60940:

JarInputStream constructor does read MANIFEST.MF and META-INF/ directory entry
that may precede it.

2. Zip* and Jar* APIs differ in their handling of i18n filenames. JAR
specification uses UTF-8 for file names, Zip uses platform encoding by default.

-- 
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 60963] Optimize class loading for unpackWARs=false case

2017-04-19 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60963

--- Comment #10 from Thomas Meyer  ---
(In reply to Mark Thomas from comment #9)

> The one thing that worries me about this patch is the degree to which it
> depends on the JVM internals. While this works with the current Oracle JVM,
> my concern is for JVMs from other vendors and future Oracle versions.

I ha exactly the same concerns! But I was sure about how much change the
upstream development would accept.

> 
> I did take a quick look at the ZIP specification [1] and it appears it
> should be fairly simple to read the file names and data offsets from the
> local file headers. I wonder if writing a parser that extracts just the info
> we need and skips the rest might be a better option.

Yes, I had the same idea while figuring how to abuse the ZipInputStream for
above solution. How hard could it be to parse an header entry...

> 
> Finally, there are a few changes in the patch that aren't strictly related
> to fixing the problem at hand. It is generally better to put that sort of
> clean-up in a separate patch (no need to re-submit this patch - the comment
> is more for future reference).

Okay, I always try to separate the relevant changes from unrelated stuff, but
sometimes I miss something while preparing a patch.

> 
> [1] https://pkware.cachefly.net/webdocs/casestudies/

Another remark from my side:
The JarInputStream is used to parse each i.e. Jar file once per Webapp class
loader. I tried to understand the verifying of the manifest and possible signed
entries, but I failed. Do you have a better understanding of this topic and can
you say if something did break in this area? How to check?

-- 
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: Read events suspend/resume logic in websocket impl to achieve backpressure

2017-04-19 Thread Violeta Georgieva
Hi,

2017-03-29 23:59 GMT+03:00 Mark Thomas :
>
> On 29/03/17 08:02, Violeta Georgieva wrote:
> >> 2017-02-27 16:50 GMT+02:00 Mark Thomas :
>
> 
>
> >>> Overall, I like the approach and would support apply a patch along
these
> >>> lines once the timing issues are resolved.
> >
> > Any feedback about the new changes?
>
> First of all, kudos for implementing what is potentially complex
> processing cleanly. It makes reviewing it much easier.
>
> I think the fix for the previous timing issue has introduced a different
> one. Consider the following scenario.
>
> - thread A is in onDataAvailable() processing data
> - thread B calls suspendonDataAvailable()
> - thread A exits onDataAvailable()
> - thread A enters the if statement and prepares to return SUSPENDED
> - thread B calls resume which is a NO-OP because the reading flag is set
> - thread A enters finally block and clears reading flag
> - thread A returns SUSPENDED
>
> and processing hangs.
>
> I think the problem is that "reading in progress" and suspended are
> treated separately when it is the combination of the two that represents
> the current state.
>
> If it were me, I'd probably look at adding a state machine (but that is
> just how I tend to approach these sorts of problems).

You are right. I reworked the patch, the new implementation is using a
state machine. The changes are available here
https://github.com/apache/tomcat/pull/42

Can you please take a look?

Thanks for the review,
Violeta

> Mark
>
>
> >
> > Thanks for the review,
> > Violeta
> >>
> >>> 
> >>>
> >> This approach would mean some internal API changes but that is fine
> > for
>  9.0.x and I don't see a problem with 8.5.x either. Whether this is
>  back-ported to 8.0.x and 7.0.x is TBD. It also opens up the
> > possibility of
>  being able to suspend/resume other protocols but I haven't thought a
> > great
>  deal about how that might work.
> >
> > I need this functionality only for 9.0.x and 8.5.x.
> >>>
> >>> Then let's not back-port this any earlier than 8.5.x.
> >>>
> >>> Mark
> >>>
> >>>
> >>> -
> >>> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> >>> For additional commands, e-mail: dev-h...@tomcat.apache.org
> >>>
> >>
> >
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>


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

2017-04-19 Thread markt
Author: markt
Date: Wed Apr 19 09:58:35 2017
New Revision: 1791893

URL: http://svn.apache.org/viewvc?rev=1791893&view=rev
Log:
Update docs for 8.5.14 release


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

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



svn commit: r19204 - /release/tomcat/tomcat-8/v8.5.13/

2017-04-19 Thread markt
Author: markt
Date: Wed Apr 19 09:53:17 2017
New Revision: 19204

Log:
Drop old release from mirrors

Removed:
release/tomcat/tomcat-8/v8.5.13/


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



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

2017-04-19 Thread markt
Author: markt
Date: Wed Apr 19 09:49:36 2017
New Revision: 1791892

URL: http://svn.apache.org/viewvc?rev=1791892&view=rev
Log:
Update site (excluding docs) for 8.5.14 release

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

Modified: tomcat/site/trunk/build.properties.default
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/build.properties.default?rev=1791892&r1=1791891&r2=1791892&view=diff
==
--- tomcat/site/trunk/build.properties.default (original)
+++ tomcat/site/trunk/build.properties.default Wed Apr 19 09:49:36 2017
@@ -39,7 +39,7 @@ tomcat.loc=http://www.apache.org/dist/to
 tomcat60=6.0.53
 tomcat70=7.0.77
 tomcat80=8.0.43
-tomcat85=8.5.13
+tomcat85=8.5.14
 tomcat90=9.0.0.M20
 
 # - Download destination -

Modified: tomcat/site/trunk/docs/doap_Tomcat.rdf
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/doap_Tomcat.rdf?rev=1791892&r1=1791891&r2=1791892&view=diff
==
--- tomcat/site/trunk/docs/doap_Tomcat.rdf (original)
+++ tomcat/site/trunk/docs/doap_Tomcat.rdf Wed Apr 19 09:49:36 2017
@@ -60,8 +60,8 @@
 
   
 Latest Stable 8.5.x Release
-2017-03-30
-8.5.13
+2017-04-18
+8.5.14
   
 
 

Modified: tomcat/site/trunk/docs/download-80.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-80.html?rev=1791892&r1=1791891&r2=1791892&view=diff
==
--- tomcat/site/trunk/docs/download-80.html (original)
+++ tomcat/site/trunk/docs/download-80.html Wed Apr 19 09:49:36 2017
@@ -230,7 +230,7 @@
 Quick Navigation
 
 
-[define v]8.5.13[end]
+[define v]8.5.14[end]
 [define w]8.0.43[end]
 https://www.apache.org/dist/tomcat/tomcat-8/KEYS";>KEYS |
 [v] |

Modified: tomcat/site/trunk/docs/index.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/index.html?rev=1791892&r1=1791891&r2=1791892&view=diff
==
--- tomcat/site/trunk/docs/index.html (original)
+++ tomcat/site/trunk/docs/index.html Wed Apr 19 09:49:36 2017
@@ -253,6 +253,42 @@ project logo are trademarks of the Apach
 
 
 
+
+2017-04-18 Tomcat 8.5.14 Released
+
+
+
+The Apache Tomcat Project is proud to announce the release of version 8.5.14
+of Apache Tomcat. Apache Tomcat 8.5.x is intended to replace 8.0.x and includes
+new features pulled forward from Tomcat 9.0.x. The minimum Java version and
+implemented specification versions remain unchanged. The notable changes
+compared to 8.5.13 include:
+
+
+
+Correct a regression that broke JMX operations (including the Manager web
+application) if the operation took parameters
+
+Calls to isReady() no longer throw exceptions after timeouts for async
+servlets
+
+
+
+
+
+Full details of these changes, and all the other changes, are available in the
+Tomcat 8.5
+changelog.
+
+
+
+
+
+Download
+
+
+
+
 
 2017-04-18 Tomcat 9.0.0.M20 (alpha) 
Released
 
@@ -279,7 +315,7 @@ Tomcat 9.0.x so that they may provide fe
 
 
 Full details of these changes, and all the other changes, are available in the
-Tomcat 9
+Tomcat 9
 changelog.
 
 
@@ -364,43 +400,6 @@ Full details of these changes, and all t
 
 
 
-
-
-2017-03-30 Tomcat 8.5.13 Released
-
-
-
-The Apache Tomcat Project is proud to announce the release of version 8.5.13
-of Apache Tomcat. Apache Tomcat 8.5.x is intended to replace 8.0.x and includes
-new features pulled forward from Tomcat 9.0.x. The minimum Java version and
-implemented specification versions remain unchanged. The notable changes
-compared to 8.5.12 include:
-
-
-
-Various HTTP/2 improvements
-
-Fixes for sendfile related issues that could cause subsequent requests to
-experience IllegalStateExceptions
-
-Servlet 4.0 early access updates
-
-
-
-
-
-Full details of these changes, and all the other changes, are available in the
-Tomcat 8.5
-changelog.
-
-
-
-
-
-Download
-
-
-
 
 
 2017-02-21 Tomcat Native 1.2.12 
Released

Modified: tomcat/site/trunk/docs/migration-85.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/migration-85.html?rev=1791892&r1=1791891&r2=1791892&view=diff
==
--- tomcat/site/trunk/docs/migration-85.html (original)
+++ tomcat/site/trunk/docs/migration-85.html 

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

2017-04-19 Thread markt
Author: markt
Date: Wed Apr 19 09:43:55 2017
New Revision: 1791890

URL: http://svn.apache.org/viewvc?rev=1791890&view=rev
Log:
Update docs for 9.0.0.M20 release


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

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



svn commit: r19203 - in /release/tomcat/tomcat-9: v9.0.0.M18/ v9.0.0.M19/

2017-04-19 Thread markt
Author: markt
Date: Wed Apr 19 09:38:47 2017
New Revision: 19203

Log:
Drop old releases from mirrors

Removed:
release/tomcat/tomcat-9/v9.0.0.M18/
release/tomcat/tomcat-9/v9.0.0.M19/


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



[Bug 60769] Problem with Jsp character encoding configuration

2017-04-19 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60769

--- Comment #10 from Lazar  ---
Thanks Mark! I tried the fix from 8.5 trunk and it works.

Something I noticed while debugging, probably it is not a problem, but I prefer
to mention it:

In EncodingDetector's constructor, on line 61
(https://github.com/apache/tomcat85/blob/c29a2b45f57e481380d88a8fa0c6f4f0f242aca1/java/org/apache/jasper/compiler/EncodingDetector.java#L61)

The buffered input stream is being reset, but on the next lines the number of
bytes which should be skipped are read from the initial input stream and not
from the buffered input stream. Is this intended? Because when the buffered
input stream is reset, the underlying input stream is not reset and its
position stays where it was - e.g., at 4. And then when the bytes which should
be skipped are read from it its position goes to e.g. 8. Is this intended?

-- 
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: r1791889 - in /tomcat/site/trunk: ./ docs/ xdocs/

2017-04-19 Thread markt
Author: markt
Date: Wed Apr 19 09:30:29 2017
New Revision: 1791889

URL: http://svn.apache.org/viewvc?rev=1791889&view=rev
Log:
Update site (excluding docs) for 9.0.0.M20 release

Modified:
tomcat/site/trunk/build.properties.default
tomcat/site/trunk/docs/download-90.html
tomcat/site/trunk/docs/index.html
tomcat/site/trunk/docs/migration-9.html
tomcat/site/trunk/docs/oldnews.html
tomcat/site/trunk/docs/whichversion.html
tomcat/site/trunk/xdocs/download-90.xml
tomcat/site/trunk/xdocs/index.xml
tomcat/site/trunk/xdocs/migration-9.xml
tomcat/site/trunk/xdocs/oldnews.xml
tomcat/site/trunk/xdocs/whichversion.xml

Modified: tomcat/site/trunk/build.properties.default
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/build.properties.default?rev=1791889&r1=1791888&r2=1791889&view=diff
==
--- tomcat/site/trunk/build.properties.default (original)
+++ tomcat/site/trunk/build.properties.default Wed Apr 19 09:30:29 2017
@@ -40,7 +40,7 @@ tomcat60=6.0.53
 tomcat70=7.0.77
 tomcat80=8.0.43
 tomcat85=8.5.13
-tomcat90=9.0.0.M19
+tomcat90=9.0.0.M20
 
 # - Download destination -
 tomcat-site-docs.home=${base.path}/tomcat-site-docs/

Modified: tomcat/site/trunk/docs/download-90.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-90.html?rev=1791889&r1=1791888&r2=1791889&view=diff
==
--- tomcat/site/trunk/docs/download-90.html (original)
+++ tomcat/site/trunk/docs/download-90.html Wed Apr 19 09:30:29 2017
@@ -230,7 +230,7 @@
 Quick Navigation
 
 
-[define v]9.0.0.M19[end]
+[define v]9.0.0.M20[end]
 https://www.apache.org/dist/tomcat/tomcat-9/KEYS";>KEYS |
 [v] |
 Browse |

Modified: tomcat/site/trunk/docs/index.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/index.html?rev=1791889&r1=1791888&r2=1791889&view=diff
==
--- tomcat/site/trunk/docs/index.html (original)
+++ tomcat/site/trunk/docs/index.html Wed Apr 19 09:30:29 2017
@@ -253,6 +253,44 @@ project logo are trademarks of the Apach
 
 
 
+
+2017-04-18 Tomcat 9.0.0.M20 (alpha) 
Released
+
+
+
+The Apache Tomcat Project is proud to announce the release of version 9.0.0.M20
+(alpha) of Apache Tomcat. The is a milestone release of the 9.0.x branch and 
has
+been made to provide users with early access to the new features in Apache
+Tomcat 9.0.x so that they may provide feedback. The notable changes compared to
+9.0.0.M19 include:
+
+
+
+Correct a regression that broke JMX operations (including the Manager web
+application) if the operation took parameters
+
+Add JMX support for Tribes components
+
+Calls to isReady() no longer throw exceptions after timeouts for async
+servlets
+
+
+
+
+
+Full details of these changes, and all the other changes, are available in the
+Tomcat 9
+changelog.
+
+
+
+
+
+Download
+
+
+
+
 
 2017-04-07 Tomcat 6.0.53 Released
 
@@ -263,6 +301,7 @@ Apache Tomcat. This release includes a n
 Apache Tomcat 6.0.51.
 
 
+
 
 Note: Apache Tomcat 6.0.x has reached end of life.
 Read more...
@@ -362,43 +401,6 @@ changelog.
 
 
 
-
-
-2017-03-30 Tomcat 9.0.0.M19 (alpha) 
Released
-
-
-
-The Apache Tomcat Project is proud to announce the release of version 9.0.0.M19
-(alpha) of Apache Tomcat. The is a milestone release of the 9.0.x branch and 
has
-been made to provide users with early access to the new features in Apache
-Tomcat 9.0.x so that they may provide feedback. The notable changes compared to
-9.0.0.M18 include:
-
-
-
-Various HTTP/2 improvements
-
-Fixes for sendfile related issues that could cause subsequent requests to
-experience IllegalStateExceptions
-
-Servlet 4.0 updates
-
-
-
-
-
-Full details of these changes, and all the other changes, are available in the
-Tomcat 9
-changelog.
-
-
-
-
-
-Download
-
-
-
 
 
 2017-02-21 Tomcat Native 1.2.12 
Released

Modified: tomcat/site/trunk/docs/migration-9.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/migration-9.html?rev=1791889&r1=1791888&r2=1791889&view=diff
==
--- tomcat/site/trunk/docs/migration-9.html (original)
+++ tomcat/site/trunk/docs/migration-9.html Wed Apr 19 09:30:29 2017
@@ -825,7 +825,8 @@ of Apache Tomcat.
   "9.0.0.M15":"1772668",
   "9.0.0.M17":"1778197",
   "9.0.0.M18":"1785983",
-  "9.0.0.M19":"1788896"
+  "9.0.0.M19":"1788896",
+  "9.0.0.M20":"1791176"
 };
 
 formSubmit.action = "http://svn.apache.org/viewvc/tomcat/trunk/"; +
@@ -867,8 +868,9 @@ of Apache Tomcat.
 9.0.0.M13
 9.0.0.M15
 9.0.0.M17
-9.0.0.M18
-9.0.0.M19
+9.0.0.M18
+9.0.0.M19
+9.0.0.M20
 , new version:
 
 9.0.0.M1
@@ -883,7 +885,8 @@ of Apache Tomcat.
 9.0.0.M15
 9.0.0

svn commit: r1791887 - /tomcat/trunk/webapps/docs/changelog.xml

2017-04-19 Thread markt
Author: markt
Date: Wed Apr 19 09:29:16 2017
New Revision: 1791887

URL: http://svn.apache.org/viewvc?rev=1791887&view=rev
Log:
Add M20 release date

Modified:
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1791887&r1=1791886&r2=1791887&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Apr 19 09:29:16 2017
@@ -91,7 +91,7 @@
 
   
 
-
+
   
 
   



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



Re: TC 8.5 and Log4J2 via Juli: Wrong location info

2017-04-19 Thread Mark Thomas
On 17/04/17 13:41, Rainer Jung wrote:
> Am 17.04.2017 um 11:49 schrieb Rémy Maucherat:
>> 2017-04-15 23:32 GMT+02:00 Rainer Jung :
>>
>>> Coming back to this.
>>>
>>> Reminder:
>>>
>>> - in TC 8.5 we removed explicit support for Log4J(2)
>>>
>>> - we direct users at the Log4J2 JUL bridge
>>>
>>> - the Log4J2 JUL bridge works by adding the additional Log4J2 jar
>>> files to
>>> the CLASSPATH and setting LOGGING_MANAGER to
>>> -Djava.util.logging.manager=or
>>> g.apache.logging.log4j.jul.LogManager
>>>
>>> Now there's a problem: the log4j2 implementation of retrieving location
>>> info (e.g. %C, %l, %F, %L) from the stack isn't aware of our juli
>>> sitting
>>> between the real jul classes and log4J2 and so always results in
>>> org.apache.juli.logging.DirectJDKLog as location of the log event
>>> instead
>>> of the real class containing the log statement.
>>>
>>> Of course location info patterns are not recommended for performance
>>> reasons, nevertheless I think they should work correctly for debugging
>>> purposes.
>>>
>>> One suggested solution was:
>>>
>>> - add a org.apache.juli.logging.Log impl that delegates to Log4J2
>>> (instead
>>> of the JUL bridge)
>>>
>>> and
>>>
>>> - add a Log4jLogEventFactory that additionally skips our DirectJDKLog
>>> when
>>> looking for the location info in the stack.
>>>
>>> I implemented this. See the patch for 8.5 at
>>>
>>> http://home.apache.org/~rjung/patches/tc8.5.x-juli-log4j2.patch
>>>
>>> The way I did it, is adding back a tomcat-juli-adapters.jar, which
>>> contains the above two classes. Adding this instead of the Log4J2 JUL
>>> bridge to the CLASSPATH (plus the Log4J2 api and core jars, but no
>>> changes
>>> to LOGGING_MANAGER) result in Log4J2 being used and logging with correct
>>> location info.
>>>
>>> Would that make a useful addition for TC 8.5 (and 9)?
>>>
>>> Ok, so the dependency from extras to log4j is removed just to be added
>> back 5 minutes later as a real dependency. Interesting !
>> Personally, I'm probably going to vote "no".
> 
> The idea here is not to remove some dependency but to fix the "wrong
> location info" problem/bug.
> 
> Or do you see a new dependency creeping in here? The patch does
> introduce a compile time dependency to log4j but not a runtime
> dependency unless you are using the optional adapters jar (to fix the
> location info bug).
> 
> I still do not see a better way to fix the problem.

It is a pity it looks like we'll have to re-introduce the adapter
concept to support log4j2 directly but I don't see a way around it.

Mark


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



[Bug 59703] RFC 6265 Cookie Processor doesn't allow cookie domains with a leading dot.

2017-04-19 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59703

--- Comment #3 from Mark Thomas  ---
There is also this thread:
http://tomcat.markmail.org/thread/lmqxehlhuqjnleym

By all means, add something to the migration guide about the RFC 6265 processor
and cookie domains.

-- 
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: r1791884 - in /tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors: TcpFailureDetector.java TcpPingInterceptor.java ThroughputInterceptor.java

2017-04-19 Thread markt
Author: markt
Date: Wed Apr 19 09:06:57 2017
New Revision: 1791884

URL: http://svn.apache.org/viewvc?rev=1791884&view=rev
Log:
Add missing override annotations

Modified:

tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java

tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java

tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java

Modified: 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java?rev=1791884&r1=1791883&r2=1791884&view=diff
==
--- 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java
 (original)
+++ 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java
 Wed Apr 19 09:06:57 2017
@@ -218,6 +218,7 @@ public class TcpFailureDetector extends
 checkMembers(false);
 }
 
+@Override
 public void checkMembers(boolean checkAll) {
 try {
 if (membership == null) setupMembership();
@@ -360,42 +361,52 @@ public class TcpFailureDetector extends
 return false;
 }
 
+@Override
 public long getReadTestTimeout() {
 return readTestTimeout;
 }
 
+@Override
 public boolean getPerformSendTest() {
 return performSendTest;
 }
 
+@Override
 public boolean getPerformReadTest() {
 return performReadTest;
 }
 
+@Override
 public long getConnectTimeout() {
 return connectTimeout;
 }
 
+@Override
 public int getRemoveSuspectsTimeout() {
 return removeSuspectsTimeout;
 }
 
+@Override
 public void setPerformReadTest(boolean performReadTest) {
 this.performReadTest = performReadTest;
 }
 
+@Override
 public void setPerformSendTest(boolean performSendTest) {
 this.performSendTest = performSendTest;
 }
 
+@Override
 public void setReadTestTimeout(long readTestTimeout) {
 this.readTestTimeout = readTestTimeout;
 }
 
+@Override
 public void setConnectTimeout(long connectTimeout) {
 this.connectTimeout = connectTimeout;
 }
 
+@Override
 public void setRemoveSuspectsTimeout(int removeSuspectsTimeout) {
 this.removeSuspectsTimeout = removeSuspectsTimeout;
 }

Modified: 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java?rev=1791884&r1=1791883&r2=1791884&view=diff
==
--- 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java
 (original)
+++ 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java
 Wed Apr 19 09:06:57 2017
@@ -103,6 +103,7 @@ public class TcpPingInterceptor extends
 if (!getUseThread()) sendPing();
 }
 
+@Override
 public long getInterval() {
 return interval;
 }
@@ -119,6 +120,7 @@ public class TcpPingInterceptor extends
 this.staticOnly = staticOnly;
 }
 
+@Override
 public boolean getUseThread() {
 return useThread;
 }

Modified: 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java?rev=1791884&r1=1791883&r2=1791884&view=diff
==
--- 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
 (original)
+++ 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
 Wed Apr 19 09:06:57 2017
@@ -94,6 +94,7 @@ public class ThroughputInterceptor exten
 
 }
 
+@Override
 public void report(double timeTx) {
 if ( log.isInfoEnabled() )
 log.info(sm.getString("throughputInterceptor.report",
@@ -102,6 +103,7 @@ public class ThroughputInterceptor exten
 df.format(mbRx)));
 }
 
+@Override
 public void setInterval(int interval) {
 this.interval = interval;
 }
@@ -110,42 +112,52 @@ public class ThroughputInterceptor exten
 return interval;
 }
 
+@Override
 public double getLastCnt() {
 return lastCnt;
 }
 
+@Override
 public double getMbAppTx() {
 return mbAppTx;
 }
 
+@Override
 public double getMbRx() {
 return mbRx;
 }
 
+@Override
 public double getMbTx() {
 return mbTx;
 }
 
+@Override
 public AtomicLong getMsgRxCnt() {
   

[Bug 60769] Problem with Jsp character encoding configuration

2017-04-19 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60769

--- Comment #9 from Mark Thomas  ---
Thew "unrelated bug" I fixed appears to have fixed the issue you were seeing.
The fix is r1791298. If you can test with 9.0.x trunk or 8.5.x trunk to confirm
that would be great.

-- 
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 60963] Optimize class loading for unpackWARs=false case

2017-04-19 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60963

--- Comment #9 from Mark Thomas  ---
I've spent a little time looking at this.

I can confirm that I see similar performance improvements with local testing.

I can also confirm I have not observed any file locking. I haven't looked for
other leaks but if there are any, I expect them to be simple to fix.

The one thing that worries me about this patch is the degree to which it
depends on the JVM internals. While this works with the current Oracle JVM, my
concern is for JVMs from other vendors and future Oracle versions.

I did take a quick look at the ZIP specification [1] and it appears it should
be fairly simple to read the file names and data offsets from the local file
headers. I wonder if writing a parser that extracts just the info we need and
skips the rest might be a better option. 

Finally, there are a few changes in the patch that aren't strictly related to
fixing the problem at hand. It is generally better to put that sort of clean-up
in a separate patch (no need to re-submit this patch - the comment is more for
future reference).

[1] https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT

-- 
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: r1791873 - in /tomcat/trunk: java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptorMBean.java weba

2017-04-19 Thread kfujino
Author: kfujino
Date: Wed Apr 19 08:21:06 2017
New Revision: 1791873

URL: http://svn.apache.org/viewvc?rev=1791873&view=rev
Log:
Add MBean for TcpPingInterceptor.

Added:

tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptorMBean.java
   (with props)
Modified:

tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java?rev=1791873&r1=1791872&r2=1791873&view=diff
==
--- 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java
 (original)
+++ 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java
 Wed Apr 19 08:21:06 2017
@@ -40,7 +40,7 @@ import org.apache.juli.logging.LogFactor
  * @version 1.0
  */
 
-public class TcpPingInterceptor extends ChannelInterceptorBase {
+public class TcpPingInterceptor extends ChannelInterceptorBase implements 
TcpPingInterceptorMBean {
 
 private static final Log log = LogFactory.getLog(TcpPingInterceptor.class);
 protected static final StringManager sm = 
StringManager.getManager(TcpPingInterceptor.class);

Added: 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptorMBean.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptorMBean.java?rev=1791873&view=auto
==
--- 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptorMBean.java
 (added)
+++ 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptorMBean.java
 Wed Apr 19 08:21:06 2017
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.catalina.tribes.group.interceptors;
+
+public interface TcpPingInterceptorMBean {
+
+public int getOptionFlag();
+
+public long getInterval();
+
+public boolean getUseThread();
+
+}

Propchange: 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptorMBean.java
--
svn:eol-style = native

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1791873&r1=1791872&r2=1791873&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Apr 19 08:21:06 2017
@@ -84,8 +84,9 @@
   
   
 Add JMX support for Channel Interceptors. The 
Interceptors
-that implement jmx support are TcpFailureDetector
-and ThroughputInterceptor. (kfujino)
+that implement jmx support are TcpFailureDetector,
+ThroughputInterceptor and TcpPingInterceptor.
+(kfujino)
   
 
   



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



svn commit: r1791871 - in /tomcat/trunk: java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptorMBean.jav

2017-04-19 Thread kfujino
Author: kfujino
Date: Wed Apr 19 08:09:43 2017
New Revision: 1791871

URL: http://svn.apache.org/viewvc?rev=1791871&view=rev
Log:
Add MBean for ThroughputInterceptor.

Added:

tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptorMBean.java
   (with props)
Modified:

tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java?rev=1791871&r1=1791870&r2=1791871&view=diff
==
--- 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
 (original)
+++ 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
 Wed Apr 19 08:09:43 2017
@@ -38,7 +38,9 @@ import org.apache.juli.logging.LogFactor
  *
  * @version 1.0
  */
-public class ThroughputInterceptor extends ChannelInterceptorBase {
+public class ThroughputInterceptor extends ChannelInterceptorBase
+implements ThroughputInterceptorMBean {
+
 private static final Log log = 
LogFactory.getLog(ThroughputInterceptor.class);
 protected static final StringManager sm = 
StringManager.getManager(ThroughputInterceptor.class);
 

Added: 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptorMBean.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptorMBean.java?rev=1791871&view=auto
==
--- 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptorMBean.java
 (added)
+++ 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptorMBean.java
 Wed Apr 19 08:09:43 2017
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.catalina.tribes.group.interceptors;
+
+import java.util.concurrent.atomic.AtomicLong;
+
+public interface ThroughputInterceptorMBean {
+
+public int getOptionFlag();
+
+// Attributes
+public void setInterval(int interval);
+
+// stats
+public double getLastCnt();
+
+public double getMbAppTx();
+
+public double getMbRx();
+
+public double getMbTx();
+
+public AtomicLong getMsgRxCnt();
+
+public AtomicLong getMsgTxCnt();
+
+public AtomicLong getMsgTxErr();
+
+public long getRxStart();
+
+public double getTimeTx();
+
+public long getTxStart();
+
+// Operations
+public void report(double timeTx);
+
+}

Propchange: 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptorMBean.java
--
svn:eol-style = native

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1791871&r1=1791870&r2=1791871&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Apr 19 08:09:43 2017
@@ -82,6 +82,11 @@
 Add maxIdleTime attribute to NioReceiverMBean
 in order to expose to JMX. (kfujino)
   
+  
+Add JMX support for Channel Interceptors. The 
Interceptors
+that implement jmx support are TcpFailureDetector
+and ThroughputInterceptor. (kfujino)
+  
 
   
 



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



svn commit: r1791867 - in /tomcat/trunk/java/org/apache/catalina/tribes/group: ChannelInterceptorBase.java interceptors/TcpFailureDetector.java interceptors/TcpFailureDetectorMBean.java

2017-04-19 Thread kfujino
Author: kfujino
Date: Wed Apr 19 07:49:11 2017
New Revision: 1791867

URL: http://svn.apache.org/viewvc?rev=1791867&view=rev
Log:
Add JMX support for Channel Interceptors.
Add MBean for TcpFailureDetector.

Added:

tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpFailureDetectorMBean.java
   (with props)
Modified:

tomcat/trunk/java/org/apache/catalina/tribes/group/ChannelInterceptorBase.java

tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java

Modified: 
tomcat/trunk/java/org/apache/catalina/tribes/group/ChannelInterceptorBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/ChannelInterceptorBase.java?rev=1791867&r1=1791866&r2=1791867&view=diff
==
--- 
tomcat/trunk/java/org/apache/catalina/tribes/group/ChannelInterceptorBase.java 
(original)
+++ 
tomcat/trunk/java/org/apache/catalina/tribes/group/ChannelInterceptorBase.java 
Wed Apr 19 07:49:11 2017
@@ -16,11 +16,14 @@
  */
 package org.apache.catalina.tribes.group;
 
+import javax.management.ObjectName;
+
 import org.apache.catalina.tribes.Channel;
 import org.apache.catalina.tribes.ChannelException;
 import org.apache.catalina.tribes.ChannelInterceptor;
 import org.apache.catalina.tribes.ChannelMessage;
 import org.apache.catalina.tribes.Member;
+import org.apache.catalina.tribes.jmx.JmxRegistry;
 
 /**
  * Abstract class for the interceptor base class.
@@ -33,6 +36,11 @@ public abstract class ChannelInterceptor
 //default value, always process
 protected int optionFlag = 0;
 
+/**
+ * the ObjectName of this ChannelInterceptor.
+ */
+private ObjectName oname = null;
+
 public ChannelInterceptorBase() {
 
 }
@@ -155,6 +163,10 @@ public abstract class ChannelInterceptor
 @Override
 public void start(int svc) throws ChannelException {
 if ( getNext()!=null ) getNext().start(svc);
+// register jmx
+JmxRegistry jmxRegistry = JmxRegistry.getRegistry(channel);
+if (jmxRegistry != null) this.oname = jmxRegistry.registerJmx(
+",component=Interceptor,interceptorName=" + 
getClass().getSimpleName(), this);
 }
 
 /**
@@ -171,6 +183,10 @@ public abstract class ChannelInterceptor
 @Override
 public void stop(int svc) throws ChannelException {
 if (getNext() != null) getNext().stop(svc);
+if (oname != null) {
+JmxRegistry.getRegistry(channel).unregisterJmx(oname);
+oname = null;
+}
 channel = null;
 }
 

Modified: 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java?rev=1791867&r1=1791866&r2=1791867&view=diff
==
--- 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java
 (original)
+++ 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java
 Wed Apr 19 07:49:11 2017
@@ -59,7 +59,7 @@ import org.apache.juli.logging.LogFactor
  *
  * @version 1.0
  */
-public class TcpFailureDetector extends ChannelInterceptorBase {
+public class TcpFailureDetector extends ChannelInterceptorBase implements 
TcpFailureDetectorMBean {
 
 private static final Log log = LogFactory.getLog(TcpFailureDetector.class);
 protected static final StringManager sm = 
StringManager.getManager(TcpFailureDetector.class);

Added: 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpFailureDetectorMBean.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpFailureDetectorMBean.java?rev=1791867&view=auto
==
--- 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpFailureDetectorMBean.java
 (added)
+++ 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpFailureDetectorMBean.java
 Wed Apr 19 07:49:11 2017
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ *