[Bug 56304] New: WebSocket send locks and timeout does not occur after 20 seconds

2014-03-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56304

Bug ID: 56304
   Summary: WebSocket send locks and timeout does not occur after
20 seconds
   Product: Tomcat 7
   Version: 7.0.52
  Hardware: PC
OS: Linux
Status: NEW
  Severity: major
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: rstoyanc...@yahoo.com

Created attachment 31429
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=31429action=edit
Extract from thread dump

Start a WebSocket server on one computer.
Connect from aonther using a browser.
Starts sending messages from server to client periodically.

Turn off wifi or unplug network cable on client side. Initially Tomcat appears 
to be sending messages but eventually one of the sends hangs indefinitely.

The 20 second timeout as documented on the WebSocket FAQ does not occur and
attempts to close the WebSocket session from another thread also locks that
thread as well.

If you now turn the wifi back on or plug the network cable, at last the two
threads that are stuck are released and the WebSocket handler gets a
notification of the session closing.

In the attachment, the first two stack traces are of (1) the thread trying to
send and (2) the thread that attempted to close. The 3rd stack trace is of
another hung thread.

NOTE that this does not occur on Tomcat 8 where the timout does occur and also
attempts to close a session do succeed.

Also I am told that the timeout does occur on Windows but I haven't verified it
myself. I am using Linux.

-- 
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 report for Tomcat 7 [2014/03/23]

2014-03-23 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=Critical  REG=Regression  MAJ=Major   |
| |   |   MIN=Minor   NOR=NormalENH=Enhancement TRV=Trivial |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
|18500|New|Enh|2003-03-30|Host aliases to match by regular expression   |
|28039|Opn|Enh|2004-03-30|Cluster Support for SingleSignOn  |
|40881|Opn|Enh|2006-11-02|Unable to receive message through  TCP channel - |
|41007|Opn|Enh|2006-11-20|Can't define customized 503 error page|
|43866|New|Enh|2007-11-14|add support for session attribute propagation with|
|43925|Opn|Enh|2007-11-21|org.apache.jasper.runtime.BodyContentImpl causing |
|44216|New|Enh|2008-01-11|Don't reuse session ID even if emptySessionPath=tr|
|49395|New|Enh|2010-06-06|manager.findLeaks : display the date when the leak|
|49589|New|Enh|2010-07-12|Tag handlers with constant attribute values are al|
|49785|New|Enh|2010-08-19|Enabling TLS for JNDIRealm|
|49821|New|Enh|2010-08-25|Tomcat CLI|
|50019|New|Enh|2010-09-28|Adding JNDI lookup-name support In XML and Resou|
|50175|New|Enh|2010-10-28|Enhance memory leak detection by selectively apply|
|50234|New|Enh|2010-11-08|JspC use servlet 3.0 features |
|50504|New|Enh|2010-12-21|Allow setting query string character set trough re|
|50670|New|Enh|2011-01-27|Tribes | RpcChannel | Add option to specify extern|
|50944|Ver|Blk|2011-03-18|JSF: java.lang.NullPointerException at com.sun.fac|
|51195|New|Enh|2011-05-13|Find leaks reports a false positive memory/class|
|51423|Inf|Enh|2011-06-23|[Patch] to add a path and a version parameters to |
|51463|New|Enh|2011-07-01|Tomcat.setBaseDir  (package org.apache.catalina.st|
|51496|New|Enh|2011-07-11|NSIS - Warn that duplicate service name will resul|
|51587|New|Enh|2011-07-29|Implement status and uptime commands  |
|51953|New|Enh|2011-10-04|Proposal: netmask filtering valve and filter  |
|52235|New|Enh|2011-11-23|Please do a bit of SEO tuning for the web site|
|52381|New|Enh|2011-12-22|Please add OSGi metadata  |
|52448|New|Enh|2012-01-11|Cache jar indexes in WebappClassLoader to speed up|
|52489|New|Enh|2012-01-19|Enhancement request for code signing of war files |
|52688|New|Enh|2012-02-16|Add ability to remove old access log files|
|52751|Opn|Enh|2012-02-23|Optimized configuration of the system info display|
|52952|New|Enh|2012-03-20|Improve ExtensionValidator handling for embedded s|
|53085|New|Enh|2012-04-16|[perf] [concurrency] DefaultInstanceManager.annota|
|53387|New|Enh|2012-06-08|SSI: Allow to use $1 to get result of regular expr|
|53411|Opn|Enh|2012-06-13|NullPointerException in org.apache.tomcat.util.buf|
|53492|New|Enh|2012-07-01|Make JspC shell multithreaded |
|53553|New|Enh|2012-07-16|[PATCH] Deploy uploaded WAR with context.xml from |
|53620|New|Enh|2012-07-30|[juli] delay opening a file until something gets l|
|54330|New|Enh|2012-12-19|Patch with some refactoring of Member.java|
|54499|New|Enh|2013-01-29|Implementation of Extensible EL Interpreter   |
|54618|New|Enh|2013-02-28|Add filter implementing HTTP Strict Transport Secu|
|54802|New|Enh|2013-04-04|Provide location information for exceptions thrown|
|55104|New|Enh|2013-06-16|Allow passing arguments with spaces to Commons Dae|
|55470|New|Enh|2013-08-23|Help users for ClassNotFoundExceptions during star|
|55477|New|Enh|2013-08-23|Add a solution to map an realm name to a security |
|55662|New|Enh|2013-10-17|Add a way to set an instance of java.sql.Driver di|
|56051|Inf|Nor|2014-01-22|FarmWarDeployer sporadically fails with applicati|
|56148|New|Enh|2014-02-17|support (multiple) ocsp stapling  |
|56181|New|Enh|2014-02-23|RemoteIpValve  RemoteIpFilter: HttpServletRequest|
|56273|New|Nor|2014-03-15|Manager webapp: when command is skipped because we|
|56293|New|Nor|2014-03-20|WebappClassLoader does not cache META-INF/services|
|56296|New|Nor|2014-03-21|AjpNioProcessor throws java.nio.BufferOverflowExce|
|56300|New|Nor|2014-03-22|[Tribes] No useful examples, lack of documentation|

Bug report for Taglibs [2014/03/23]

2014-03-23 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=Critical  REG=Regression  MAJ=Major   |
| |   |   MIN=Minor   NOR=NormalENH=Enhancement TRV=Trivial |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
|38193|Ass|Enh|2006-01-09|[RDC] BuiltIn Grammar support for Field   |
|38600|Ass|Enh|2006-02-10|[RDC] Enable RDCs to be used in X+V markup (X+RDC)|
|42413|New|Enh|2007-05-14|[PATCH] Log Taglib enhancements   |
|46052|New|Nor|2008-10-21|SetLocaleSupport is slow to initialize when many l|
|48333|New|Enh|2009-12-02|TLD generator |
|55609|New|Enh|2013-09-28|c:forEach loop on integer range consumes unnecessa|
+-+---+---+--+--+
| Total6 bugs   |
+---+

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



Bug report for Tomcat Modules [2014/03/23]

2014-03-23 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=Critical  REG=Regression  MAJ=Major   |
| |   |   MIN=Minor   NOR=NormalENH=Enhancement TRV=Trivial |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
|48240|New|Nor|2009-11-19|Tomcat-Lite missing @Override markers |
|48268|New|Nor|2009-11-23|Patch to fix generics in tomcat-lite  |
|48861|New|Nor|2010-03-04|Files without AL headers  |
|49685|New|Nor|2010-08-02|Unsafe synchronization in class ManagedBean   |
|49686|New|Nor|2010-08-02|Using an instance lock to protect static shared da|
|50571|Inf|Nor|2011-01-11|Tomcat 7 JDBC connection pool exception enhancemen|
|51595|Inf|Nor|2011-08-01|org.apache.tomcat.jdbc.pool.jmx.ConnectionPool sho|
|51879|Inf|Enh|2011-09-22|Improve access to Native Connection Methods   |
|52024|Inf|Enh|2011-10-13|Custom interceptor to support automatic failover o|
|53088|Opn|Min|2012-04-17|Give PoolCleaner TimerTask a better name  |
|53198|New|Cri|2012-05-07|'driverClassName' Data Source Property Being Manda|
|53199|Inf|Enh|2012-05-07|Refactor ConnectionPool to use ScheduledExecutorSe|
|53200|New|Enh|2012-05-07|Be able to use SlowQueryReport without reporting f|
|53770|New|Enh|2012-08-23|tomcat-pool: always log validation query syntax er|
|53853|New|Nor|2012-09-11|Can tomcat-jdbc consider Thread#getContextClassLoa|
|54225|New|Nor|2012-11-30|if initSQL property is set to an empty string a Nu|
|54227|New|Nor|2012-11-30|maxAge should be checked on borrow|
|54235|New|Nor|2012-12-03|tomcat jdbc pool stackoverflow error used with spr|
|54395|New|Nor|2013-01-09|JdbcInterceptor config parameter parsing errors   |
|54437|New|Enh|2013-01-16|Update PoolProperties javadoc for ConnectState int|
|54537|New|Cri|2013-02-07|StatementFinalizer closeInvoked is too slow for la|
|54929|New|Nor|2013-05-05|jdbc-pool cannot be used with Java 1.5, java.lang|
|54978|New|Nor|2013-05-15|Validate on Borrow should be tested on Reconnect i|
|55078|New|Nor|2013-06-07|Configuring a DataSource Resource with dataSourceJ|
|55444|New|Nor|2013-08-18|Support JDBC Drivers outside of tomcat/lib/   |
|56046|New|Enh|2014-01-21|org.apache.tomcat.jdbc.pool.XADataSource InitSQL p|
|56088|New|Maj|2014-01-29|AbstractQueryReport$StatementProxy throws exceptio|
+-+---+---+--+--+
| Total   27 bugs   |
+---+

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



Bug report for Tomcat Connectors [2014/03/23]

2014-03-23 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=Critical  REG=Regression  MAJ=Major   |
| |   |   MIN=Minor   NOR=NormalENH=Enhancement TRV=Trivial |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
|34526|Opn|Nor|2005-04-19|Truncated content in decompressed requests from mo|
|35959|Opn|Enh|2005-08-01|mod_jk not independant of UseCanonicalName|
|43303|New|Enh|2007-09-04|Versioning under Windows not reported by many conn|
|43968|Inf|Enh|2007-11-26|[patch] support ipv6 with mod_jk  |
|44290|Inf|Nor|2008-01-24|mod_jk/1.2.26: retry is not useful for an importan|
|44349|Inf|Maj|2008-02-04|mod_jk/1.2.26 module does not read worker.status.s|
|44379|New|Enh|2008-02-07|convert the output of strftime into UTF-8 |
|44454|New|Nor|2008-02-19|busy count reported in mod_jk inflated, causes inc|
|44571|New|Enh|2008-03-10|Limits busy per worker to a threshold |
|45063|New|Nor|2008-05-22|JK-1.2.26 IIS ISAPI filter issue when running diff|
|45313|New|Nor|2008-06-30|mod_jk 1.2.26  apache 2.2.9 static compiled on so|
|46337|New|Nor|2008-12-04|real worker name is wrong |
|46767|New|Enh|2009-02-25|mod_jk to send DECLINED in case no fail-over tomca|
|47327|New|Enh|2009-06-07|remote_user not logged in apache logfile  |
|47617|Inf|Enh|2009-07-31|include time spent doing ajp_get_endpoint() in err|
|47678|New|Cri|2009-08-11|Unable to allocate shared memory when using isapi_|
|47714|New|Cri|2009-08-20|Reponse mixed between users   |
|47750|New|Maj|2009-08-27|Loss of worker settings when changing via jkstatus|
|47795|New|Maj|2009-09-07|service sticky_session not being set correctly wit|
|47840|Inf|Min|2009-09-14|A broken worker name is written in the log file.  |
|48191|New|Maj|2009-11-13|Problem with mod_jk 1.2.28 - Can not render up the|
|48460|New|Nor|2009-12-30|mod_proxy_ajp document has three misleading portio|
|48490|New|Nor|2010-01-05|Changing a node to stopped in uriworkermap.propert|
|48513|New|Enh|2010-01-09|IIS Quick setup instructions  |
|48564|New|Nor|2010-01-18|Unable to turn off retries for LB worker  |
|48830|New|Nor|2010-03-01|IIS shutdown blocked in endpoint service when serv|
|48891|Opn|Enh|2010-03-11|Missing EOL-style settings in tomcat/jk/trunk |
|49035|New|Maj|2010-04-01|data lost when post a multipart/form-data form|
|49063|New|Enh|2010-04-07|Please add JkStripSession status in jk-status work|
|49135|New|Enh|2010-04-16|SPDY Connector for The Tomcat |
|49469|New|Enh|2010-06-19|Workers status page has negative number of connect|
|49732|Opn|Nor|2010-08-10|reply_timeout can't wait forever. |
|49822|New|Enh|2010-08-25|Add hash lb worker method |
|49903|New|Enh|2010-09-09|Make workers file reloadable  |
|50186|New|Nor|2010-10-31|Wrong documentation of connection_pool_timeout / c|
|52334|New|Maj|2011-12-14|recover_time is not properly used |
|52483|New|Enh|2012-01-18|Print JkOptions's options in log file and jkstatus|
|52651|New|Nor|2012-02-13|JKSHMFile size limitation |
|53324|Opn|Nor|2012-05-30|Starting with mod_jk 1.2.35 I cannot modify worker|
|53542|New|Min|2012-07-13|Spelling mistake on 503 service unavailable page  |
|53762|New|Nor|2012-08-22|JK status manager: mass nodes handling doesn't wor|
|53883|New|Maj|2012-09-17|isapi_redirect v 1.2.37 crashes w3wp.exe  on the p|
|53977|New|Maj|2012-10-07|32bits isapi connector cannot work in wow64 mode  |
|54027|New|Cri|2012-10-18|isapi send request to outside address instead of i|
|54112|Opn|Blk|2012-11-07|ISAPI redirector not working when IIS recycles|
|54117|New|Maj|2012-11-08|access violation exception in isapi_redirect.dll  |
|54177|New|Nor|2012-11-20|jkmanager generates non-well-formed XML for certai|
|54596|New|Nor|2013-02-22|Relative path functionality truncates last charact|
|54621|New|Nor|2013-02-28|[PATCH] custom mod_jk availability checks |
|54646|New|Trv|2013-03-06|socket_keepalive is sometimes 1 or true or True in|
|54923|New|Nor|2013-05-03|nsapi_redirect.so does not work with iPlanet on So|

Bug report for Tomcat Native [2014/03/23]

2014-03-23 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=Critical  REG=Regression  MAJ=Major   |
| |   |   MIN=Minor   NOR=NormalENH=Enhancement TRV=Trivial |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
|46179|Opn|Maj|2008-11-10|apr ssl client authentication |
|48655|Inf|Nor|2010-02-02|Active multipart downloads prevent tomcat shutdown|
|49038|Inf|Nor|2010-04-02|Crash in tcnative |
|52319|Inf|Maj|2011-12-12|Tomcat 6 crashes with [libapr-1.so.0+0x196da]  sig|
|52627|New|Min|2012-02-08|Segmentation fault in org.apache.tomcat.jni.File.i|
|53605|Inf|Nor|2012-07-26|use tcnative-1.1.24 Tomcat shutdown still crash   |
|53847|Inf|Nor|2012-09-10|High CPU usage in tomcat native 1.22+ |
|53940|New|Enh|2012-09-27|Added support for new CRL loading after expiration|
|53952|New|Nor|2012-10-02|Add support for TLS 1.1 and 1.2   |
|54085|New|Nor|2012-11-01|ssl_socket_recv sometimes loops infinitely with no|
|54664|New|Reg|2013-03-11|[1.1.27 branch] Poll.remove incorrectly reports AP|
|55087|New|Cri|2013-06-10|tomcat crashes in tcnative-1.dll with OCSP when OC|
|55113|Inf|Nor|2013-06-18|FIPS-compatible OpenSSL fails fingerprint test in |
|55114|New|Nor|2013-06-18|BUILDING file in win32 source package contains UNI|
|55706|New|Nor|2013-10-25|broken apr version check in native v1.1.29 build; |
|55771|New|Maj|2013-11-12|Memory leak and then crash in org.apache.tomcat.jn|
|55797|Inf|Nor|2013-11-19|Tomcat 7.0.47 crashes using server jvm.dll and APR|
|55915|New|Nor|2013-12-20|Add EECDH support to tcnative-1.dll   |
|55938|New|Nor|2013-12-29|clang-analyzer report for 1.1.29  |
|56027|New|Nor|2014-01-17|Unable to use TCN on RHEL6 boxes if box is booted |
|56108|New|Nor|2014-02-04|Allow user-defined Diffie-Hellman parameters  |
+-+---+---+--+--+
| Total   21 bugs   |
+---+

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



Bug report for Tomcat 6 [2014/03/23]

2014-03-23 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=Critical  REG=Regression  MAJ=Major   |
| |   |   MIN=Minor   NOR=NormalENH=Enhancement TRV=Trivial |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
|41679|New|Enh|2007-02-22|SemaphoreValve should be able to filter on url pat|
|43001|New|Enh|2007-07-30|JspC lacks setMappedFile and setDie for use in Ant|
|43400|New|Enh|2007-09-14|enum support for tag libs |
|43548|Opn|Enh|2007-10-04|xml schema for tomcat-users.xml   |
|43682|New|Enh|2007-10-23|JULI: web-inf/classes/logging.properties to suppor|
|43742|New|Enh|2007-10-30|.tag compiles  performed one at a time -- extremel|
|43979|New|Enh|2007-11-27|Add abstraction for Java and Classfile output |
|44199|New|Enh|2008-01-10|expose current backlog queue size |
|44225|New|Enh|2008-01-14|SSL connector tries to load the private keystore f|
|44294|New|Enh|2008-01-25|Support for EL functions with varargs |
|44645|New|Enh|2008-03-20|[Patch] JNDIRealm - Doesn't support JNDI java.nam|
|44787|New|Enh|2008-04-09|provide more error context on java.lang.IllegalSt|
|45014|New|Enh|2008-05-15|Request and Response classes should have wrappers |
|45282|New|Enh|2008-06-25|NioReceiver doesn't close cleanly, leaving sockets|
|45832|New|Enh|2008-09-18|add DIGEST authentication support to Ant tasks|
|45878|New|Enh|2008-09-24|Generated jars do not contain proper manifests or |
|45879|Opn|Enh|2008-09-24|Windows installer fails to install NOTICE and RELE|
|45931|Opn|Enh|2008-10-01|trimSpaces incorrectly modifies output|
|46173|New|Enh|2008-11-09|Small patch for manager app: Setting an optional c|
|46263|Opn|Enh|2008-11-21|Tomcat reloading of context.xml does not update do|
|46284|New|Enh|2008-11-24|Add flag to DeltaManager that blocks processing cl|
|46350|New|Enh|2008-12-05|Maven repository should contain source bundles|
|46558|Opn|Enh|2009-01-19|Shutdown port with address binding|
|46902|New|Enh|2009-03-24|LoginValve to bypass restrictions of j_security_ch|
|47214|New|Enh|2009-05-17|Inner classes that are explicitly referenced - sho|
|47242|New|Enh|2009-05-22|request for AJP command line client   |
|47281|New|Enh|2009-05-28|Efficiency of the JDBCStore   |
|47407|New|Enh|2009-06-23|HttpSessionListener doesn't operate in the session|
|47467|New|Enh|2009-07-02|Deployment of the war file by URL when contextpath|
|47834|New|Enh|2009-09-14|TldConfig throws Exception when exploring unpacked|
|47919|New|Enh|2009-09-30|Log Tomcat  Java environment variables in additio|
|48358|Opn|Enh|2009-12-09|JSP-unloading reloaded|
|48543|New|Enh|2010-01-14|[Patch] More flexibility in specifying -Dcatalina.|
|48672|New|Enh|2010-02-03|Tomcat Virtual Host Manager (/host-manager) have b|
|48674|New|Enh|2010-02-03|Tomcat Virtual Host Manager application doesn't pe|
|48743|New|Enh|2010-02-15|Make the SLEEP variable in catalina.sh settable fr|
|48899|New|Enh|2010-03-12|Guess URI charset should solve lot of problems|
|48922|New|Enh|2010-03-16|org.apache.catalina.connector.Request clone static|
|48928|New|Enh|2010-03-17|An alternative solution to preloading classes when|
|49176|Opn|Enh|2010-04-23|Jasper in Dev Mode Is Memory Inefficient  |
|49464|New|Enh|2010-06-18|DefaultServlet and CharacterEncoding  |
|49531|New|Enh|2010-06-30|singlesignon failover not working on DeltaManager/|
|49804|New|Enh|2010-08-23|Allow Embedded.redirectStreams value to be configu|
|49939|New|Enh|2010-09-16|Expose a method via JMX which empties the webapp f|
|49943|New|Enh|2010-09-16|Logging (via juli) does not reread configuration c|
|50285|New|Enh|2010-11-17|Standard HTTP and AJP connectors silently ignore a|
|50288|New|Enh|2010-11-17|Uploading a war file that already exists should au|
|50677|Opn|Enh|2011-01-27|Allow system property variables in catalina.proper|
|50692|New|Enh|2011-01-31|Improve log message in ThreadPool.logFull |
|51142|New|Enh|2011-05-03|Offer possible resolution of StringIndexOutOfBound|
|51513|New|Enh|2011-07-15|GzipInterceptor: Do not compress small packages   |

[Bug 56304] WebSocket send locks and timeout does not occur after 20 seconds

2014-03-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56304

--- Comment #1 from Mark Thomas ma...@apache.org ---
Are you sure you used the same connector on Tomcat 7 and Tomcat 8? The default
connector on Tomcat 7 is BIO whereas it is NIO on Tomcat 8.

When you refer to Windows or Linux is that client side, server side or both?

-- 
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: r1580475 - in /tomcat/tc6.0.x/trunk: STATUS.txt webapps/docs/changelog.xml

2014-03-23 Thread markt
Author: markt
Date: Sun Mar 23 09:12:12 2014
New Revision: 1580475

URL: http://svn.apache.org/r1580475
Log:
Additional changelog entry for r1580472

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

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1580475r1=1580474r2=1580475view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Sun Mar 23 09:12:12 2014
@@ -72,11 +72,6 @@ PATCHES PROPOSED TO BACKPORT:
 kkolinko: Beware that changelog part of this patch merges into a wrong
 place. This change belongs to Jasper, not Catalina.
 
-* Update tc-native to 1.1.29
-  http://people.apache.org/~markt/patches/2014-03-19-tc-native-tc6-v1.patch
-  +1: markt, kkolinko, schultz, remm
-  -1:
-
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56275
   Fix memory leak if a Filter throws an exception during its destroy() method
   http://people.apache.org/~markt/patches/2014-03-19-bug56275-tc6-v1.patch

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=1580475r1=1580474r2=1580475view=diff
==
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Sun Mar 23 09:12:12 2014
@@ -79,6 +79,9 @@
 Fix possible overflow when parsing long values from a byte array.
 (markt)
   /fix
+  update
+Update tc-native to 1.1.29. (markt)
+  /update
 /changelog
   /subsection
   subsection name=Jasper



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



svn propchange: r1580472 - svn:log

2014-03-23 Thread markt
Author: markt
Revision: 1580472
Modified property: svn:log

Modified: svn:log at Sun Mar 23 09:13:47 2014
--
--- svn:log (original)
+++ svn:log Sun Mar 23 09:13:47 2014
@@ -1 +1,2 @@
 Use StringBuilder in DefaultServlet
+Update tc-native to 1.1.29


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



svn commit: r1580478 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/jasper/compiler/Generator.java java/org/apache/jasper/compiler/Validator.java webapps/docs/changelog.xml

2014-03-23 Thread markt
Author: markt
Date: Sun Mar 23 09:34:30 2014
New Revision: 1580478

URL: http://svn.apache.org/r1580478
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56265
Don't escape values for dynamic tag attributes

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java
tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Validator.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1580478r1=1580477r2=1580478view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Sun Mar 23 09:34:30 2014
@@ -64,14 +64,6 @@ PATCHES PROPOSED TO BACKPORT:
  Thus I am OK with this change.
   -1:
 
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56265
-  Don't escape values for dynamic tag attributes
-  http://people.apache.org/~markt/patches/2014-03-19-bug56265-tc6-v1.patch
-  +1: markt, kkolinko, remm
-  -1:
-kkolinko: Beware that changelog part of this patch merges into a wrong
-place. This change belongs to Jasper, not Catalina.
-
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56275
   Fix memory leak if a Filter throws an exception during its destroy() method
   http://people.apache.org/~markt/patches/2014-03-19-bug56275-tc6-v1.patch

Modified: tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java?rev=1580478r1=1580477r2=1580478view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java Sun Mar 
23 09:34:30 2014
@@ -1838,7 +1838,7 @@ class Generator {
 out.print( + );
 } else {
 out.print(DOUBLE_QUOTE);
-out.print(attrs.getValue(i).replace(\, quot;));
+out.print(jspAttrs[i].getValue().replace(\, quot;));
 out.print(DOUBLE_QUOTE);
 }
 }

Modified: tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Validator.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Validator.java?rev=1580478r1=1580477r2=1580478view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Validator.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Validator.java Sun Mar 
23 09:34:30 2014
@@ -1331,34 +1331,46 @@ class Validator {
 result = new Node.JspAttribute(tai, qName, uri, localName,
 value.substring(3, value.length() - 2), true, null,
 dynamic);
-} else if (pageInfo.isELIgnored()) {
-result = new Node.JspAttribute(tai, qName, uri, localName,
-value, false, null, dynamic);
 } else {
-// The attribute can contain expressions but is not a
-// scriptlet expression; thus, we want to run it through
-// the expression interpreter
-
-// validate expression syntax if string contains
-// expression(s)
-ELNode.Nodes el = ELParser.parse(value, pageInfo
-.isDeferredSyntaxAllowedAsLiteral());
-
-if (el.containsEL()) {
+ELNode.Nodes el = null;
+if (!pageInfo.isELIgnored()) {
+// The attribute can contain expressions but is not a
+// scriptlet expression; thus, we want to run it 
through
+// the expression interpreter
+
+// validate expression syntax if string contains
+// expression(s)
+el = ELParser.parse(value,
+pageInfo.isDeferredSyntaxAllowedAsLiteral());
 
-validateFunctions(el, n);
+if (el.containsEL()) {
+validateFunctions(el, n);
+} else {
+el = null;
+}
+}
 
-if (n.getRoot().isXmlSyntax()) {
-// The non-EL elements need to be XML escaped
+if (n instanceof Node.UninterpretedTag 
+n.getRoot().isXmlSyntax()) {
+// Attribute values of uninterpreted tags will have 
been
+// XML 

svn commit: r1580479 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/catalina/core/ApplicationFilterConfig.java java/org/apache/catalina/core/LocalStrings.properties webapps/docs/changelog.xml

2014-03-23 Thread markt
Author: markt
Date: Sun Mar 23 09:36:32 2014
New Revision: 1580479

URL: http://svn.apache.org/r1580479
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56275
Fix memory leak if a Filter throws an exception during its destroy() method

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationFilterConfig.java
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/LocalStrings.properties
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1580479r1=1580478r2=1580479view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Sun Mar 23 09:36:32 2014
@@ -64,12 +64,6 @@ PATCHES PROPOSED TO BACKPORT:
  Thus I am OK with this change.
   -1:
 
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56275
-  Fix memory leak if a Filter throws an exception during its destroy() method
-  http://people.apache.org/~markt/patches/2014-03-19-bug56275-tc6-v1.patch
-  +1: markt, schultz, kkolinko, remm
-  -1:
-
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54475
   Add Java 8 support to SMAP generation for JSPs.
   Patch by Robbie Gibson.

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationFilterConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationFilterConfig.java?rev=1580479r1=1580478r2=1580479view=diff
==
--- 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationFilterConfig.java 
(original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationFilterConfig.java 
Sun Mar 23 09:36:32 2014
@@ -44,6 +44,7 @@ import org.apache.catalina.security.Secu
 import org.apache.catalina.util.Enumerator;
 import org.apache.catalina.util.StringManager;
 import org.apache.juli.logging.LogFactory;
+import org.apache.tomcat.util.ExceptionUtils;
 import org.apache.tomcat.util.log.SystemLogHandler;
 import org.apache.tomcat.util.modeler.Registry;
 
@@ -112,8 +113,10 @@ public final class ApplicationFilterConf
 }
 
 this.context = context;
-setFilterDef(filterDef);
+this.filterDef = filterDef;
 
+// Allocate a new filter instance
+getFilter();
 }
 
 
@@ -346,16 +349,22 @@ public final class ApplicationFilterConf
 
 if (this.filter != null)
 {
-if (Globals.IS_SECURITY_ENABLED) {
-try {
-SecurityUtil.doAsPrivilege(destroy, filter); 
-} catch(java.lang.Exception ex){
-
context.getLogger().error(ApplicationFilterConfig.doAsPrivilege, ex);
-} finally {
-SecurityUtil.remove(filter);
+try {
+if (Globals.IS_SECURITY_ENABLED) {
+try {
+SecurityUtil.doAsPrivilege(destroy, filter); 
+} finally {
+SecurityUtil.remove(filter);
+}
+} else { 
+filter.destroy();
 }
-} else { 
-filter.destroy();
+} catch (Throwable t) {
+ExceptionUtils.handleThrowable(t);
+context.getLogger().error(sm.getString(
+applicationFilterConfig.release,
+filterDef.getFilterName(),
+filterDef.getFilterClass()), t);
 }
 if (!context.getIgnoreAnnotations()) {
 try {
@@ -370,64 +379,6 @@ public final class ApplicationFilterConf
  }
 
 
-/**
- * Set the filter definition we are configured for.  This has the side
- * effect of instantiating an instance of the corresponding filter class.
- *
- * @param filterDef The new filter definition
- *
- * @exception ClassCastException if the specified class does not implement
- *  the codejavax.servlet.Filter/code interface
- * @exception ClassNotFoundException if the filter class cannot be found
- * @exception IllegalAccessException if the filter class cannot be
- *  publicly instantiated
- * @exception InstantiationException if an exception occurs while
- *  instantiating the filter object
- * @exception ServletException if thrown by the filter's init() method
- * @throws NamingException 
- * @throws InvocationTargetException 
- */
-void setFilterDef(FilterDef filterDef)
-throws ClassCastException, ClassNotFoundException,
-   IllegalAccessException, InstantiationException,
-   ServletException, InvocationTargetException, NamingException {
-
-this.filterDef = 

[Bug 56275] Classloader leak in DirContextURLStreamHandler

2014-03-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56275

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

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

--- Comment #4 from Mark Thomas ma...@apache.org ---
This has been fixed in 6.0.x and will be included in 6.0.40 onwards.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



svn commit: r1580480 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/jasper/compiler/SmapUtil.java webapps/docs/changelog.xml

2014-03-23 Thread markt
Author: markt
Date: Sun Mar 23 09:38:50 2014
New Revision: 1580480

URL: http://svn.apache.org/r1580480
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54475
Add Java 8 support to SMAP generation for JSPs.
Patch by Robbie Gibson.

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/SmapUtil.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1580480r1=1580479r2=1580480view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Sun Mar 23 09:38:50 2014
@@ -64,13 +64,6 @@ PATCHES PROPOSED TO BACKPORT:
  Thus I am OK with this change.
   -1:
 
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54475
-  Add Java 8 support to SMAP generation for JSPs.
-  Patch by Robbie Gibson.
-  http://people.apache.org/~markt/patches/2014-03-20-smap-java8-tc6-v1.patch
-  +1: markt, kkolinko, schultz, remm
-  -1:
-
 
 PATCHES/ISSUES THAT ARE STALLED:
 

Modified: tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/SmapUtil.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/SmapUtil.java?rev=1580480r1=1580479r2=1580480view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/SmapUtil.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/SmapUtil.java Sun Mar 
23 09:38:50 2014
@@ -440,18 +440,25 @@ public class SmapUtil {
 int tag = readU1();
 writeU1(tag);
 switch (tag) {
-case 7 : // Class
-case 8 : // String
+case 7 :  // Class
+case 8 :  // String
+case 16 : // MethodType
 if (log.isDebugEnabled())
 log.debug(i +  copying 2 bytes);
 copy(2);
 break;
-case 9 : // Field
+case 15 : // MethodHandle
+if (log.isDebugEnabled())
+log.debug(i +  copying 3 bytes);
+copy(3);
+break;
+case 9 :  // Field
 case 10 : // Method
 case 11 : // InterfaceMethod
-case 3 : // Integer
-case 4 : // Float
+case 3 :  // Integer
+case 4 :  // Float
 case 12 : // NameAndType
+case 18 : // InvokeDynamic
 if (log.isDebugEnabled())
 log.debug(i +  copying 4 bytes);
 copy(4);

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=1580480r1=1580479r2=1580480view=diff
==
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Sun Mar 23 09:38:50 2014
@@ -102,6 +102,10 @@
 controls the validation of *.tld files when Jasper parses them. (markt)
   /fix
   fix
+bug54475/bug: Add Java 8 support to SMAP generation for JSPs. Patch
+by Robbie Gibson. (markt)
+  /fix
+  fix
 bug56010/bug: Donapos;t throw an
 codeIllegalArgumentException/code when
 codeJspFactory.getPageContext/code is used with



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



[Bug 54475] SMAP broken in Java 8 for JSP compile

2014-03-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54475

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

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

--- Comment #8 from Mark Thomas ma...@apache.org ---
Fixed in 8.0.x for 8.0.5 onwards, 7.0.x for 7.0.53 onwards and 6.0.x for 6.0.40
onwards.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



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

2014-03-23 Thread markt
Author: markt
Date: Sun Mar 23 09:47:03 2014
New Revision: 1580481

URL: http://svn.apache.org/r1580481
Log:
Update 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=1580481r1=1580480r2=1580481view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Sun Mar 23 09:47:03 2014
@@ -52,6 +52,7 @@ PATCHES PROPOSED TO BACKPORT:
 * Fix http://issues.apache.org/bugzilla/show_bug.cgi?id=56283
   Add Java 8 support to Jasper's default configuration
   http://people.apache.org/~markt/patches/2014-03-19-Jasper-Java8-tc6-v1.patch
+  
http://people.apache.org/~markt/patches/2014-03-23-Jasper-Java8-tc6-part2-v1.patch
   +1: markt, remm
   +0: kkolinko:
- See r1557990. There are noTldJars lists in TldConfig, 
TldLocationsCache
@@ -62,6 +63,7 @@ PATCHES PROPOSED TO BACKPORT:
  so it will be inlined at compile time. At runtime Jasper will be
  compatible with any earlier versions of ecj 4.3.x.
  Thus I am OK with this change.
+  markt: Additional patch added
   -1:
 
 



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



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

2014-03-23 Thread kkolinko
Author: kkolinko
Date: Sun Mar 23 12:32:23 2014
New Revision: 1580497

URL: http://svn.apache.org/r1580497
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=1580497r1=1580496r2=1580497view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Sun Mar 23 12:32:23 2014
@@ -54,7 +54,7 @@ PATCHES PROPOSED TO BACKPORT:
   http://people.apache.org/~markt/patches/2014-03-19-Jasper-Java8-tc6-v1.patch
   
http://people.apache.org/~markt/patches/2014-03-23-Jasper-Java8-tc6-part2-v1.patch
   +1: markt, remm
-  +0: kkolinko:
+  +1: kkolinko:
- See r1557990. There are noTldJars lists in TldConfig, 
TldLocationsCache
  that have to be updated. Maybe add support for ecj-*.jar pattern
  there? (If not, then just add 4.3.2 and P20140317-1600 versions).
@@ -64,6 +64,7 @@ PATCHES PROPOSED TO BACKPORT:
  compatible with any earlier versions of ecj 4.3.x.
  Thus I am OK with this change.
   markt: Additional patch added
+  kkolinko: Thank you. Changing the vote to +1.
   -1:
 
 



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



[Bug 56273] Manager webapp: when command is skipped because web application is being serviced, say about it

2014-03-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56273

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
 OS||All

--- Comment #1 from Mark Thomas ma...@apache.org ---
This has been fixed in 8.0.x for 8.0.5 onwards and in 7.0.x for 7.0.53 onwards.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



buildbot success in ASF Buildbot on tomcat-trunk

2014-03-23 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/5627

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

Buildslave for this Build: bb-vm_ubuntu

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

Build succeeded!

sincerely,
 -The Buildbot





Tomcat JDBC, WebappClassLoader delegation

2014-03-23 Thread John Vasileff
In Tomcat 8, WebappClassLoader disallows overrides of org.apache.tomcat.* 
classes which includes org.apache.tomcat.jdbc.*.  As a result, it is impossible 
to use the Tomcat JDBC pool with a JDBC driver in WEB-INF/lib. On Tomcat 7 this 
is possible by packaging both tomcat-jdbc.jar and the driver in WEB-INF/lib.

Would it be possible to add an exception for “org.apache.tomcat.jdbc” to the 
regex below to restore this capability?

protected final Matcher packageTriggersPermit =
Pattern.compile(^javax\\.servlet\\.jsp\\.jstl\\.).matcher(”);

I know the intent of the org.apache.x patterns in the corresponding 
packageTriggersDeny regex is to disallow overriding of container implementation 
classes. But really, the Tomcat JDBC Connection Pool is a reusable library that 
happens to share a package namespace with container classes. It is, after all, 
offered as a standalone module.

It is fair to debate whether it is a good idea to place JDBC drivers in 
WEB-INF/lib in the first place, but it's often quite convenient. Further, with 
the current behavior, applications using the Tomcat JDBC pool behave 
differently based on whether the container they are deployed on provides these 
non-servlet-spec classes, which seems a bit ugly, given that the module is 
intended for reuse.

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



Re: Tomcat JDBC, WebappClassLoader delegation

2014-03-23 Thread Mark Thomas
On 23/03/2014 18:40, John Vasileff wrote:
 In Tomcat 8, WebappClassLoader disallows overrides of
 org.apache.tomcat.* classes which includes org.apache.tomcat.jdbc.*.
 As a result, it is impossible to use the Tomcat JDBC pool with a JDBC
 driver in WEB-INF/lib. On Tomcat 7 this is possible by packaging both
 tomcat-jdbc.jar and the driver in WEB-INF/lib.

Strictly, that is not correct. If you remove tomcat-jdbc.jar from the
$CATALINA_HOME/lib the version in the web application should be used.

 Would it be possible to add an exception for “org.apache.tomcat.jdbc”
 to the regex below to restore this capability?
 
 protected final Matcher packageTriggersPermit = 
 Pattern.compile(^javax\\.servlet\\.jsp\\.jstl\\.).matcher(”);

Seems reasonable.

I've applied a fix to 8.0.x which will be included in 8.0.5 onwards.

Mark

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



svn commit: r1580572 - in /tomcat/trunk: java/org/apache/catalina/loader/WebappClassLoader.java webapps/docs/changelog.xml

2014-03-23 Thread markt
Author: markt
Date: Sun Mar 23 19:06:57 2014
New Revision: 1580572

URL: http://svn.apache.org/r1580572
Log:
Allow web applications to package tomcat-jdbc.jar and their JDBC driver of 
choice in the web application.

Modified:
tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java?rev=1580572r1=1580571r2=1580572view=diff
==
--- tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java Sun Mar 
23 19:06:57 2014
@@ -196,7 +196,8 @@ public class WebappClassLoader extends U
  * {@link #packageTriggersDeny}.
  */
 protected final Matcher packageTriggersPermit =
-Pattern.compile(^javax\\.servlet\\.jsp\\.jstl\\.).matcher();
+Pattern.compile(^javax\\.servlet\\.jsp\\.jstl\\.| +
+^org\\.apache\\.tomcat\\.jdbc\\.).matcher();
 
 
 /**

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1580572r1=1580571r2=1580572view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Sun Mar 23 19:06:57 2014
@@ -51,6 +51,10 @@
 Rework the fix for bug56190/bug as the previous fix did not recycle
 the request in all cases leading to mis-routing of requests. (markt)
   /fix
+  fix
+Allow web applications to package tomcat-jdbc.jar and their JDBC driver
+of choice in the web application. (markt)
+  /fix
 /changelog
   /subsection
   subsection name=Coyote



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



Fwd: svn commit: r1569398 - in /tomcat/trunk/java/org/apache/catalina/loader: LocalStrings.properties WebappClassLoader.java

2014-03-23 Thread Romain Manni-Bucau
Hi

any planned date for a tomcat 7.0.53 with this fix?

Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau




-- Forwarded message --
From:  ma...@apache.org
Date: 2014-02-18 17:00 GMT+01:00
Subject: svn commit: r1569398 - in
/tomcat/trunk/java/org/apache/catalina/loader: LocalStrings.properties
WebappClassLoader.java
To: dev@tomcat.apache.org


Author: markt
Date: Tue Feb 18 16:00:34 2014
New Revision: 1569398

URL: http://svn.apache.org/r1569398
Log:
Make it easier for TomEE to modify the j2seClassLoader

Modified:
tomcat/trunk/java/org/apache/catalina/loader/LocalStrings.properties
tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java

Modified: tomcat/trunk/java/org/apache/catalina/loader/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/LocalStrings.properties?rev=1569398r1=1569397r2=1569398view=diff
==
--- tomcat/trunk/java/org/apache/catalina/loader/LocalStrings.properties
(original)
+++ tomcat/trunk/java/org/apache/catalina/loader/LocalStrings.properties
Tue Feb 18 16:00:34 2014
@@ -37,6 +37,7 @@ webappClassLoader.loadedByThisOrChildFai
 webappClassLoader.jarsAdded=One or more JARs have been added to the
web application [{0}]
 webappClassLoader.jarsModified=One or more JARs have been modified in
the web application [{0}]
 webappClassLoader.jarsRemoved=One or more JARs have been removed from
the web application [{0}]
+webappClassLoader.j2seClassLoaderNull=The j2seClassLoader attribute
may not be null
 webappClassLoader.resourceModified=Resource [{0}] has been modified.
The last modified time was [{1}] and is now [{2}]
 webappClassLoader.stopThreadFail=Failed to terminate thread named
[{0}] for web application [{1}]
 webappClassLoader.stopTimerThreadFail=Failed to terminate TimerThread
named [{0}] for web application [{1}]

Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java?rev=1569398r1=1569397r2=1569398view=diff
==
--- tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
Tue Feb 18 16:00:34 2014
@@ -339,7 +339,7 @@ public class WebappClassLoader extends U
  * those cases {@link ClassLoader#getParent()} will be called
recursively on
  * the system class loader and the last non-null result used.
  */
-protected final ClassLoader j2seClassLoader;
+private ClassLoader j2seClassLoader;


 /**
@@ -1240,9 +1240,10 @@ public class WebappClassLoader extends U
 // (0.2) Try loading the class with the system class loader, to prevent
 //   the webapp from overriding J2SE classes
 String resourceName = binaryNameToPath(name, false);
-if (j2seClassLoader.getResource(resourceName) != null) {
+ClassLoader j2seLoader = getJ2seClassLoader();
+if (j2seLoader.getResource(resourceName) != null) {
 try {
-clazz = j2seClassLoader.loadClass(name);
+clazz = j2seLoader.loadClass(name);
 if (clazz != null) {
 if (resolve)
 resolveClass(clazz);
@@ -1505,6 +1506,18 @@ public class WebappClassLoader extends U

 // -- Protected Methods

+protected ClassLoader getJ2seClassLoader() {
+return j2seClassLoader;
+}
+
+protected void setJ2seClassLoader(ClassLoader classLoader) {
+if (classLoader == null) {
+throw new IllegalArgumentException(
+sm.getString(webappClassLoader.j2seClassLoaderNull));
+}
+j2seClassLoader = classLoader;
+}
+
 /**
  * Clear references.
  */



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

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



Re: Tomcat JDBC, WebappClassLoader delegation

2014-03-23 Thread John Vasileff
On Mar 23, 2014, at 3:06 PM, Mark Thomas ma...@apache.org wrote:

 On 23/03/2014 18:40, John Vasileff wrote:
 Would it be possible to add an exception for “org.apache.tomcat.jdbc”
 to the regex below to restore this capability?
 
 protected final Matcher packageTriggersPermit = 
 Pattern.compile(^javax\\.servlet\\.jsp\\.jstl\\.).matcher(”);
 
 Seems reasonable.
 
 I've applied a fix to 8.0.x which will be included in 8.0.5 onwards.
 
 Mark

Awesome, thanks!

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



svn commit: r1580591 - /tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java

2014-03-23 Thread markt
Author: markt
Date: Sun Mar 23 20:16:24 2014
New Revision: 1580591

URL: http://svn.apache.org/r1580591
Log:
Minor clean-up

Modified:
tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java

Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java?rev=1580591r1=1580590r2=1580591view=diff
==
--- tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java Sun Mar 
23 20:16:24 2014
@@ -2527,12 +2527,14 @@ public class WebappClassLoader extends U
 return null;
 }
 
-if ((name == null) || (path == null))
+if (name == null || path == null) {
 return null;
+}
 
 ResourceEntry entry = resourceEntries.get(path);
-if (entry != null)
+if (entry != null) {
 return entry;
+}
 
 boolean isClassResource = path.endsWith(CLASS_FILE_SUFFIX);
 
@@ -2551,10 +2553,8 @@ public class WebappClassLoader extends U
 entry.codeBase = entry.source;
 entry.lastModified = resource.getLastModified();
 
-if (needConvert) {
-if (path.endsWith(.properties)) {
-fileNeedConvert = true;
-}
+if (needConvert  path.endsWith(.properties)) {
+fileNeedConvert = true;
 }
 
 /* Only cache the binary content if there is some content
@@ -2629,7 +2629,6 @@ public class WebappClassLoader extends U
 }
 
 return entry;
-
 }
 
 



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



svn commit: r1580598 - in /tomcat/trunk: java/org/apache/catalina/loader/WebappClassLoader.java webapps/docs/changelog.xml

2014-03-23 Thread markt
Author: markt
Date: Sun Mar 23 20:33:13 2014
New Revision: 1580598

URL: http://svn.apache.org/r1580598
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56293
Cache resources loaded by the class loader from /META-INF/services/ for better 
performance for repeated look ups.

Modified:
tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java?rev=1580598r1=1580597r2=1580598view=diff
==
--- tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java Sun Mar 
23 20:33:13 2014
@@ -136,6 +136,7 @@ public class WebappClassLoader extends U
 private static final String JVN_THREAD_GROUP_SYSTEM = system;
 
 private static final String CLASS_FILE_SUFFIX = .class;
+private static final String SERVIVES_PREFIX = /META-INF/services/;
 
 static {
 JVM_THREAD_GROUP_NAMES.add(JVN_THREAD_GROUP_SYSTEM);
@@ -2537,6 +2538,10 @@ public class WebappClassLoader extends U
 }
 
 boolean isClassResource = path.endsWith(CLASS_FILE_SUFFIX);
+boolean isCacheable = isClassResource;
+if (!isCacheable) {
+ isCacheable = path.startsWith(SERVIVES_PREFIX);
+}
 
 WebResource resource = null;
 
@@ -2558,18 +2563,21 @@ public class WebappClassLoader extends U
 }
 
 /* Only cache the binary content if there is some content
- * available and either:
+ * available one of the following is true:
  * a) It is a class file since the binary content is only cached
  *until the class has been loaded
  *or
  * b) The file needs conversion to address encoding issues (see
  *below)
+ *or
+ * c) The resource is a service provider configuration file located
+ *under META=INF/services
  *
  * In all other cases do not cache the content to prevent
  * excessive memory usage if large resources are present (see
  * https://issues.apache.org/bugzilla/show_bug.cgi?id=53081).
  */
-if (isClassResource || fileNeedConvert) {
+if (isCacheable || fileNeedConvert) {
 byte[] binaryContent = resource.getContent();
 if (binaryContent != null) {
  if (fileNeedConvert) {

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1580598r1=1580597r2=1580598view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Sun Mar 23 20:33:13 2014
@@ -55,6 +55,11 @@
 Allow web applications to package tomcat-jdbc.jar and their JDBC driver
 of choice in the web application. (markt)
   /fix
+  fix
+bug56293/bug: Cache resources loaded by the class loader from
+code/META-INF/services//code for better performance for repeated
+look ups. (markt)
+  /fix
 /changelog
   /subsection
   subsection name=Coyote



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



svn commit: r1580610 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/loader/WebappClassLoader.java webapps/docs/changelog.xml

2014-03-23 Thread markt
Author: markt
Date: Sun Mar 23 20:44:13 2014
New Revision: 1580610

URL: http://svn.apache.org/r1580610
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56293
Cache resources loaded by the class loader from /META-INF/services/ for better 
performance for repeated look ups.

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

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

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java?rev=1580610r1=1580609r2=1580610view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java 
Sun Mar 23 20:44:13 2014
@@ -139,6 +139,8 @@ public class WebappClassLoader
 
 private static final String JVN_THREAD_GROUP_SYSTEM = system;
 
+private static final String SERVIVES_PREFIX = META-INF/services/;
+
 static {
 JVM_THREAD_GROUP_NAMES.add(JVN_THREAD_GROUP_SYSTEM);
 JVM_THREAD_GROUP_NAMES.add(RMI Runtime);
@@ -3012,6 +3014,10 @@ public class WebappClassLoader
 int contentLength = -1;
 InputStream binaryStream = null;
 boolean isClassResource = path.endsWith(.class);
+boolean isCacheable = isClassResource;
+if (!isCacheable) {
+ isCacheable = path.startsWith(SERVIVES_PREFIX);
+}
 
 int jarFilesLength = jarFiles.length;
 int repositoriesLength = repositories.length;
@@ -3214,19 +3220,22 @@ public class WebappClassLoader
 }
 
 /* Only cache the binary content if there is some content
- * available and either:
+ * available one of the following is true:
  * a) It is a class file since the binary content is only 
cached
  *until the class has been loaded
  *or
  * b) The file needs conversion to address encoding issues (see
  *below)
+ *or
+ * c) The resource is a service provider configuration file 
located
+ *under META=INF/services
  *
  * In all other cases do not cache the content to prevent
  * excessive memory usage if large resources are present (see
  * https://issues.apache.org/bugzilla/show_bug.cgi?id=53081).
  */
 if (binaryStream != null 
-(isClassResource || fileNeedConvert)) {
+(isCacheable || fileNeedConvert)) {
 
 byte[] binaryContent = new byte[contentLength];
 

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1580610r1=1580609r2=1580610view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Sun Mar 23 20:44:13 2014
@@ -107,6 +107,11 @@
 just the file name to refer to refer to the JavaEE schema on which they
 are based. (markt)
   /add
+  fix
+bug56293/bug: Cache resources loaded by the class loader from
+code/META-INF/services//code for better performance for repeated
+look ups. (markt)
+  /fix
 /changelog
   /subsection
   subsection name=Coyote



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



[Bug 56293] WebappClassLoader does not cache META-INF/services which leads to performance issues

2014-03-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56293

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

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

--- Comment #4 from Mark Thomas ma...@apache.org ---
This has been fixed in 8.0.x for 8.0.5 onwards and in 7.0.x for 7.0.53 onwards.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



Re: svn commit: r1580598 - in /tomcat/trunk: java/org/apache/catalina/loader/WebappClassLoader.java webapps/docs/changelog.xml

2014-03-23 Thread Cyril Bonté

Hi Mark,

Le 23/03/2014 21:33, ma...@apache.org a écrit :

  private static final String CLASS_FILE_SUFFIX = .class;
+private static final String SERVIVES_PREFIX = /META-INF/services/;


Warning, a typo is introduced in the constant name.
SERVIVES instead of SERVICES.

--
Cyril Bonté

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



Re: svn commit: r1580598 - in /tomcat/trunk: java/org/apache/catalina/loader/WebappClassLoader.java webapps/docs/changelog.xml

2014-03-23 Thread Cyril Bonté

Hi again,

Le 23/03/2014 21:48, Cyril Bonté a écrit : Hi Mark,

 Le 23/03/2014 21:33, ma...@apache.org a écrit :
   private static final String CLASS_FILE_SUFFIX = .class;
 +private static final String SERVIVES_PREFIX = 
/META-INF/services/;


 Warning, a typo is introduced in the constant name.
 SERVIVES instead of SERVICES.

It appears that another typo was added from a previous commit.
See below :

 --- 
tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java 
(original)
 +++ 
tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java Sun 
Mar 23 20:33:13 2014

 @@ -136,6 +136,7 @@ public class WebappClassLoader extends U
   private static final String JVN_THREAD_GROUP_SYSTEM = system;


I assume it should be JVM_THREAD_GROUP_SYSTEM.

Hope this helps.

--
Cyril Bonté

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



Re: svn commit: r1580598 - in /tomcat/trunk: java/org/apache/catalina/loader/WebappClassLoader.java webapps/docs/changelog.xml

2014-03-23 Thread Mark Thomas
On 23/03/2014 20:57, Cyril Bonté wrote:
 Hi again,
 
 Le 23/03/2014 21:48, Cyril Bonté a écrit : Hi Mark,

 Le 23/03/2014 21:33, ma...@apache.org a écrit :
   private static final String CLASS_FILE_SUFFIX = .class;
 +private static final String SERVIVES_PREFIX =
 /META-INF/services/;

 Warning, a typo is introduced in the constant name.
 SERVIVES instead of SERVICES.
 
 It appears that another typo was added from a previous commit.
 See below :
 
 ---
 tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
 (original)
 +++
 tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java Sun
 Mar 23 20:33:13 2014
 @@ -136,6 +136,7 @@ public class WebappClassLoader extends U
   private static final String JVN_THREAD_GROUP_SYSTEM = system;
 
 
 I assume it should be JVM_THREAD_GROUP_SYSTEM.
 
 Hope this helps.

It does. Many thanks. I've just fixed these.

Mark


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



svn commit: r1580622 - /tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java

2014-03-23 Thread markt
Author: markt
Date: Sun Mar 23 21:48:33 2014
New Revision: 1580622

URL: http://svn.apache.org/r1580622
Log:
Fix typos spotted by Cyril Bonté.

Modified:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java?rev=1580622r1=1580621r2=1580622view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java 
Sun Mar 23 21:48:33 2014
@@ -137,12 +137,12 @@ public class WebappClassLoader
 private static final ListString JVM_THREAD_GROUP_NAMES =
 new ArrayListString();
 
-private static final String JVN_THREAD_GROUP_SYSTEM = system;
+private static final String JVM_THREAD_GROUP_SYSTEM = system;
 
-private static final String SERVIVES_PREFIX = META-INF/services/;
+private static final String SERVICES_PREFIX = META-INF/services/;
 
 static {
-JVM_THREAD_GROUP_NAMES.add(JVN_THREAD_GROUP_SYSTEM);
+JVM_THREAD_GROUP_NAMES.add(JVM_THREAD_GROUP_SYSTEM);
 JVM_THREAD_GROUP_NAMES.add(RMI Runtime);
 }
 
@@ -3016,7 +3016,7 @@ public class WebappClassLoader
 boolean isClassResource = path.endsWith(.class);
 boolean isCacheable = isClassResource;
 if (!isCacheable) {
- isCacheable = path.startsWith(SERVIVES_PREFIX);
+ isCacheable = path.startsWith(SERVICES_PREFIX);
 }
 
 int jarFilesLength = jarFiles.length;



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



Re: Connectors, blocking, and keepalive

2014-03-23 Thread Christopher Schultz
Mark,

On 2/27/14, 12:56 PM, Christopher Schultz wrote:
 Mark,
 
 On 2/25/14, 3:31 AM, Mark Thomas wrote:
 On 25/02/2014 06:03, Christopher Schultz wrote:
 All,

 I'm looking at the comparison table at the bottom of the HTTP
 connectors page, and I have a few questions about it.

 First, what does Polling size mean?

 Maximum number of connections in the poller. I'd simply remove it from
 the table. It doesn't add anything.
 
 Okay, thanks.
 
 Second, under the NIO connector, both Read HTTP Body and Write
 HTTP Response say that they are sim-Blocking... does that mean
 that the API itself is stream-based (i.e. blocking) but that the
 actual under-the-covers behavior is to use non-blocking I/O?

 It means simulated blocking. The low level writes use a non-blocking
 API but blocking is simulated by not returning to the caller until the
 write completes.
 
 That's what I was thinking. Thanks for confirming.

Another quick question: during the sim-blocking for reading the
request-body, does the request go back into the poller queue, or does it
just sit waiting single-threaded-style? I would assume that latter,
otherwise we'd either violate the spec (one thread serves the whole
request) or spend a lot of resources making sure we got the same thread
back, etc.

Thanks,
-chris



signature.asc
Description: OpenPGP digital signature


[Bug 56296] AjpNioProcessor throws java.nio.BufferOverflowException

2014-03-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56296

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 OS||All

--- Comment #1 from Mark Thomas ma...@apache.org ---
The trigger for this series of stack traces is the java.io.IOException: Broken
pipe which normally indicates that the client has dropped the connection or a
network issue that looks like the client has dropped the connection.

The initial error causes a write to fail and as a result the buffer is not
cleared (it should be). The next attempt to write therefore fails because the
buffer has not been cleared.

I'll see what I can do to fix this.

-- 
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: Connectors, blocking, and keepalive

2014-03-23 Thread Mark Thomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 23/03/2014 22:07, Christopher Schultz wrote:
 Mark,
 
 On 2/27/14, 12:56 PM, Christopher Schultz wrote:
 Mark,
 
 On 2/25/14, 3:31 AM, Mark Thomas wrote:
 On 25/02/2014 06:03, Christopher Schultz wrote:
 All,
 
 I'm looking at the comparison table at the bottom of the
 HTTP connectors page, and I have a few questions about it.
 
 First, what does Polling size mean?
 
 Maximum number of connections in the poller. I'd simply remove
 it from the table. It doesn't add anything.
 
 Okay, thanks.
 
 Second, under the NIO connector, both Read HTTP Body and
 Write HTTP Response say that they are sim-Blocking...
 does that mean that the API itself is stream-based (i.e.
 blocking) but that the actual under-the-covers behavior is to
 use non-blocking I/O?
 
 It means simulated blocking. The low level writes use a
 non-blocking API but blocking is simulated by not returning to
 the caller until the write completes.
 
 That's what I was thinking. Thanks for confirming.
 
 Another quick question: during the sim-blocking for reading the 
 request-body, does the request go back into the poller queue, or
 does it just sit waiting single-threaded-style? I would assume that
 latter, otherwise we'd either violate the spec (one thread serves
 the whole request) or spend a lot of resources making sure we got
 the same thread back, etc.

Both.

The socket gets added to the BlockPoller and the thread waits on a
latch for the BlockPoller to data can be read.

Mark

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIbBAEBAgAGBQJTL1xiAAoJEBDAHFovYFnnJGcP9jBIyVGXlYL8pSVMzMNvf1dd
t6d66bajcWMTINmnCcXOzowdnBpDQHyIPKaS0U7RjmBpbOGrK0r+rfVBqkFNPcPR
J9ivXJeZHHgRFVHFyfanBKUwWGGYcFKQuLBfd9vzai2bAyX3/Le0NvZc0/c+/PAA
FPJPDVOUNtN57GKUa+VWJ0Hm7U9YH1VufcvNp/ULNnzkeeg0pnpa8aXroxdtMqw2
j65K3C9O8EQyYU3AzcVMlaxmP+0bGyhCBK3gWb/ZXAh2+0E/14zrBKVqNnRjxo8c
zAPjN79BY+xQ6Un4gEb/XInPFekUlh+IQRSQy7IZ9gmHAmfF/HQ73fEMyS5D6QJ4
Ezs8+K56QniZLE2funSvHX3VWCUyqh/lCYMi0u8RuZw7xOrwsKVK37pmPpk8xDAc
jWcKASOaA4nLDOypb8ys7KNhZSMWLxwcIyLTT8Ck7BDX4PWrE3bPly2cJ2GAkd4v
slRLMuoddMziKgG0dJyi4lpMkR4FQPU1NVS8d+ohoUccfbYSVNM3cLPCOeVJjdeC
ywvhVgKvUItESvuOuhTdyx/sYjA6UJ9bWl1esYh6CVBFQqpnTIsK499ORqJGcosI
N6l2XBIiRhvW3EuF1moppYXX6rUtCz8m+9MWmlpiB6TSU6bI9fu48xFx0JvoN+dD
jruU5ZNKVlRYAYbIh+Y=
=21mp
-END PGP SIGNATURE-

-
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

2014-03-23 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/1830

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] 1580622
Blamelist: markt

Build succeeded!

sincerely,
 -The Buildbot





[Bug 56296] AjpNioProcessor throws java.nio.BufferOverflowException

2014-03-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56296

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #2 from Mark Thomas ma...@apache.org ---
I've back-ported the AJP NIO fix to 7.0.x and it will be included in 7.0.53
onwards.

*** This bug has been marked as a duplicate of bug 53119 ***

-- 
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: r1580654 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/coyote/ajp/AjpNioProcessor.java webapps/docs/changelog.xml

2014-03-23 Thread markt
Author: markt
Date: Sun Mar 23 22:58:54 2014
New Revision: 1580654

URL: http://svn.apache.org/r1580654
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53119
Make sure the NIO AJP output buffer is cleared on any error to prevent any 
possible overflow if it is written to again before the connection is closed. 
This extends the original fix for the APR/native output buffer to the NIO 
connector.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

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

Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java?rev=1580654r1=1580653r2=1580654view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java Sun 
Mar 23 22:58:54 2014
@@ -290,16 +290,18 @@ public class AjpNioProcessor extends Abs
 @Override
 protected void output(byte[] src, int offset, int length)
 throws IOException {
+
+KeyAttachment att =
+(KeyAttachment) socketWrapper.getSocket().getAttachment(false);
+if ( att == null ) throw new IOException(Key must be cancelled);
+
 ByteBuffer writeBuffer =
 socketWrapper.getSocket().getBufHandler().getWriteBuffer();
 
 writeBuffer.put(src, offset, length);
 
 writeBuffer.flip();
-
-KeyAttachment att =
-(KeyAttachment) socketWrapper.getSocket().getAttachment(false);
-if ( att == null ) throw new IOException(Key must be cancelled);
+
 long writeTimeout = att.getWriteTimeout();
 Selector selector = null;
 try {
@@ -311,9 +313,9 @@ public class AjpNioProcessor extends Abs
 pool.write(writeBuffer, socketWrapper.getSocket(), selector,
 writeTimeout, true);
 }finally { 
+writeBuffer.clear();
 if ( selector != null ) pool.put(selector);
 }
-writeBuffer.clear();
 }
 
 

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1580654r1=1580653r2=1580654view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Sun Mar 23 22:58:54 2014
@@ -117,6 +117,12 @@
   subsection name=Coyote
 changelog
   fix
+bug53119/bug: Make sure the NIO AJP output buffer is cleared on any
+error to prevent any possible overflow if it is written to again before
+the connection is closed. This extends the original fix for the
+APR/native output buffer to the NIO connector. (kkolinko)
+  /fix
+  fix
 bug56172/bug: Avoid possible request corruption when using the AJP
 NIO connector and a request is sent using more than one AJP message.
 Patch provided by Amund Elstad. (markt)



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



[Bug 53119] java.nio.BufferOverflowException in AjpAprProcessor.output() when AJP client disconnects

2014-03-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53119

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 CC||hugo.lums...@blackrock.com

--- Comment #11 from Mark Thomas ma...@apache.org ---
*** Bug 56296 has been marked as a duplicate of this bug. ***

-- 
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: r1580658 - /tomcat/trunk/webapps/docs/tribes/introduction.xml

2014-03-23 Thread markt
Author: markt
Date: Sun Mar 23 23:05:04 2014
New Revision: 1580658

URL: http://svn.apache.org/r1580658
Log:
Fix bug in example

Modified:
tomcat/trunk/webapps/docs/tribes/introduction.xml

Modified: tomcat/trunk/webapps/docs/tribes/introduction.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/tribes/introduction.xml?rev=1580658r1=1580657r2=1580658view=diff
==
--- tomcat/trunk/webapps/docs/tribes/introduction.xml (original)
+++ tomcat/trunk/webapps/docs/tribes/introduction.xml Sun Mar 23 23:05:04 2014
@@ -69,7 +69,7 @@ Serializable myMsg = new MyMessage();
 Member[] group = myChannel.getMembers();
 
 //send the message
-channel.send(group,myMsg,Channel.SEND_OPTIONS_DEFAULT);]]/source
+myChannel.send(group,myMsg,Channel.SEND_OPTIONS_DEFAULT);]]/source
 /li
   /ul
   p



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



svn commit: r1580659 - /tomcat/tc7.0.x/trunk/webapps/docs/tribes/introduction.xml

2014-03-23 Thread markt
Author: markt
Date: Sun Mar 23 23:06:11 2014
New Revision: 1580659

URL: http://svn.apache.org/r1580659
Log:
Fix bug in example

Modified:
tomcat/tc7.0.x/trunk/webapps/docs/tribes/introduction.xml

Modified: tomcat/tc7.0.x/trunk/webapps/docs/tribes/introduction.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/tribes/introduction.xml?rev=1580659r1=1580658r2=1580659view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/tribes/introduction.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/tribes/introduction.xml Sun Mar 23 
23:06:11 2014
@@ -70,7 +70,7 @@
 Member[] group = myChannel.getMembers();
 
 //send the message
-channel.send(group,myMsg,Channel.SEND_OPTIONS_DEFAULT);
+myChannel.send(group,myMsg,Channel.SEND_OPTIONS_DEFAULT);
   /source
 /li
   /ul



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



[Bug 56300] [Tribes] No useful examples, lack of documentation

2014-03-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56300

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

   Severity|normal  |enhancement

--- Comment #1 from Mark Thomas ma...@apache.org ---
I've fixed the obvious bug in the example.

The errors you see are because you only have a single member in the cluster so
there is nowhere to send the message to.

Patches to improve the documentation are always welcome.

You may want to take a look in the unit tests as there are some Tribes demos /
samples / tests that you might want to refer to and/or adapt for use in the
docs.

-- 
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 failure in ASF Buildbot on tomcat-trunk

2014-03-23 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/5629

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

Buildslave for this Build: bb-vm_ubuntu

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

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot





svn commit: r1580678 - /tomcat/tc7.0.x/trunk/STATUS.txt

2014-03-23 Thread kkolinko
Author: kkolinko
Date: Mon Mar 24 00:39:42 2014
New Revision: 1580678

URL: http://svn.apache.org/r1580678
Log:
Remove proposal
This have been applied in r1580654 ;)

Modified:
tomcat/tc7.0.x/trunk/STATUS.txt

Modified: tomcat/tc7.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/STATUS.txt?rev=1580678r1=1580677r2=1580678view=diff
==
--- tomcat/tc7.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc7.0.x/trunk/STATUS.txt Mon Mar 24 00:39:42 2014
@@ -29,16 +29,6 @@ PATCHES ACCEPTED TO BACKPORT:
 PATCHES PROPOSED TO BACKPORT:
   [ New proposals should be added at the end of the list ]
 
-* For https://issues.apache.org/bugzilla/show_bug.cgi?id=53119
-  Prevent possible overflow exception with buffer in
-  AjpNioProcessor.output() if it is called again after previous write
-  failed with IOException.
-  I have not observed it, but it is from analogy with AjpAprProcessor fix
-  in r1344253.
-  http://svn.apache.org/viewvc?view=revisionrevision=1346365
-  +1: kkolinko
-  -1:
-
 * https://issues.apache.org/bugzilla/show_bug.cgi?id=54330
   Refactor Member interface to reduce dependency on concrete implementation.
   Based on a patch by Greg Turnquist.



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



Re: Connectors, blocking, and keepalive

2014-03-23 Thread Christopher Schultz
Mark,

On 3/23/14, 6:12 PM, Mark Thomas wrote:
 On 23/03/2014 22:07, Christopher Schultz wrote:
 Mark,
 
 On 2/27/14, 12:56 PM, Christopher Schultz wrote:
 Mark,

 On 2/25/14, 3:31 AM, Mark Thomas wrote:
 On 25/02/2014 06:03, Christopher Schultz wrote:
 All,

 I'm looking at the comparison table at the bottom of the
 HTTP connectors page, and I have a few questions about it.

 First, what does Polling size mean?

 Maximum number of connections in the poller. I'd simply remove
 it from the table. It doesn't add anything.

 Okay, thanks.

 Second, under the NIO connector, both Read HTTP Body and
 Write HTTP Response say that they are sim-Blocking...
 does that mean that the API itself is stream-based (i.e.
 blocking) but that the actual under-the-covers behavior is to
 use non-blocking I/O?

 It means simulated blocking. The low level writes use a
 non-blocking API but blocking is simulated by not returning to
 the caller until the write completes.

 That's what I was thinking. Thanks for confirming.
 
 Another quick question: during the sim-blocking for reading the 
 request-body, does the request go back into the poller queue, or
 does it just sit waiting single-threaded-style? I would assume that
 latter, otherwise we'd either violate the spec (one thread serves
 the whole request) or spend a lot of resources making sure we got
 the same thread back, etc.
 
 Both.
 
 The socket gets added to the BlockPoller and the thread waits on a
 latch for the BlockPoller to data can be read.

Okay, but it's still one-thread-one-request... /The/ thread will stay
with that request until its complete, right? The BlockPoller will just
wake-up the same waiting thread.. no funny-business? ;)

Okay, one more related question: for the BIO connector, does the
request/connection go back into any kind of queue after the initial
(keep-alive) request has completed, or does the thread that has already
processed the first request on the connection keep going until there are
no more keep-alive requests? I can't see a mechanism in the BIO
connector to ensure any kind of fairness with respect to request
priority: once the client is in, it can make as many requests as it
wants (up to maxKeepAliveRequests) without getting back in line.

Thanks,
-chris



signature.asc
Description: OpenPGP digital signature


buildbot success in ASF Buildbot on tomcat-trunk

2014-03-23 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/5630

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

Buildslave for this Build: bb-vm_ubuntu

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

Build succeeded!

sincerely,
 -The Buildbot