Bug report for Tomcat 6 [2013/03/24]

2013-03-24 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|
|41883|Ass|Enh|2007-03-18|use abstract wrapper instead of plain X509Certific|
|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|
|44818|New|Enh|2008-04-13|tomcat hangs with GET when content-length is defin|
|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|
|45428|New|Enh|2008-07-18|warn if the tomcat stop doesn't complete  |
|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|New|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|
|46727|New|Enh|2009-02-17|DefaultServlet - serving multiple encodings   |
|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|
|49161|New|Enh|2010-04-21|Unknown Publisher when installing tomcat 6.0.26   |
|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|
|50692|

Bug report for Tomcat 8 [2013/03/24]

2013-03-24 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  |
| |   |   |  |  |
|51497|New|Enh|2011-07-11|Use canonical IPv6 text representation in logs|
|53737|Opn|Enh|2012-08-18|Use ServletContext.getJspConfigDescriptor() in Jas|
|53930|New|Enh|2012-09-24|allow capture of catalina stdout/stderr to a comma|
|53987|New|Enh|2012-10-09|Log uncovered HTTP methods in combined security co|
|54095|New|Enh|2012-11-03|[patch] support gzipped versions of static resourc|
|54503|New|Enh|2013-01-29|SAML2 based single sign on|
|54522|New|Nor|2013-02-04|Add patch binary as prerequisite in BUILDING.txt  |
|54700|New|Enh|2013-03-15|Improvement: Add support for system property to sp|
|54729|New|Enh|2013-03-20|new HttpParser.parseAuthorizationBasic method |
|54734|New|Maj|2013-03-20|Tomcat Servlet 3.1 API needs to be synchronized wi|
|54740|New|Nor|2013-03-21|Aggressive scan for ServerEndpointConfig  |
|54741|New|Enh|2013-03-22|Add org.apache.catalina.startup.Tomcat#addWebapp(S|
|54745|New|Maj|2013-03-22|Tomcat JarScanning does not work when Tomcat start|
|54746|New|Maj|2013-03-24|Cannot obtain information from Session in onClose |
+-+---+---+--+--+
| Total   14 bugs   |
+---+

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



Bug report for Taglibs [2013/03/24]

2013-03-24 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 |
+-+---+---+--+--+
| Total5 bugs   |
+---+

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



Bug report for Tomcat 7 [2013/03/24]

2013-03-24 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  |
| |   |   |  |  |
|16579|New|Enh|2003-01-30|documentation page layout/style breaks wrapping to|
|18500|New|Enh|2003-03-30|Host aliases to match by regular expression   |
|28039|Opn|Enh|2004-03-30|Cluster Support for SingleSignOn  |
|40728|Inf|Enh|2006-10-11|Catalina MBeans use non-serializable classes  |
|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|
|48550|Inf|Enh|2010-01-14|Update examples and default server.xml to use UTF-|
|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|
|51195|New|Enh|2011-05-13|"Find leaks" reports a false positive memory/class|
|51294|Opn|Enh|2011-05-30|Since 7.0.12 do not work option unpackWARs=true fo|
|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|
|51526|New|Enh|2011-07-18|Process web application context config with embedd|
|51587|New|Enh|2011-07-29|Implement status and uptime commands  |
|51953|New|Enh|2011-10-04|Proposal: netmask filtering valve and filter  |
|52092|New|Enh|2011-10-26|Please make AsyncFileHandler and OneLineFormatter |
|52235|New|Enh|2011-11-23|Please do a bit of SEO tuning for the web site|
|52323|New|Enh|2011-12-13|Cobertura test code coverage support for build.xml|
|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 |
|52558|New|Enh|2012-01-30|CometConnectionManagerValve is adding non-serializ|
|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 |
|53602|New|Enh|2012-07-25|Support for HTTP status code 451  |
|53620|New|Enh|2012-07-30|[juli] delay opening a file until something gets l|
|53665|New|Enh|2012-08-06|Minor JNDI Howto document enhancement concerning m|
|53776|New|Enh|2012-08-24|Multitenancy support for JDBCRealm|
|53777|New|Enh|2012-08-24|Ability to bundle JAAS Configuration in Webappp   |
|54013|New|Enh|2012-10-16|Catalina.sh force kill to wait till process exits |
|54083|New|Enh|2012-10-31|Provide jarsToSkip on a per-webapp basis  |
|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|

Bug report for Tomcat Connectors [2013/03/24]

2013-03-24 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 paths truncates last character of values |
|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 in docu   |
+-+---+---+--+--+
| Total

Bug report for Tomcat Native [2013/03/24]

2013-03-24 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 |
|51655|New|Nor|2011-08-12|Index page does not say what native does  |
|51813|New|Cri|2011-09-14|Tomcat randomly crashes with [libtcnative-1.so.1+0|
|52153|New|Maj|2011-11-08|periodic JVM crash (access violation) on buffer fl|
|52231|New|Nor|2011-11-23|Ant Tasks need to reflect changes in manager comma|
|52319|New|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|
|53110|New|Cri|2012-04-20|Access Violation Error while creating SHM |
|53605|New|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+ |
|53937|New|Reg|2012-09-26|Double call to apr_pool_destroy() if OCSP checking|
|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|
+-+---+---+--+--+
| Total   17 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 [2013/03/24]

2013-03-24 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|
|54693|New|Enh|2013-03-13|Add a validationQueryTimeout property |
+-+---+---+--+--+
| Total   22 bugs   |
+---+

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



svn commit: r1460304 - /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractStandaloneWarMojo.java

2013-03-24 Thread olamy
Author: olamy
Date: Sun Mar 24 10:17:22 2013
New Revision: 1460304

URL: http://svn.apache.org/r1460304
Log:
[MTOMCAT-214] Default attachArtifactClassifierType for 
AbstractStandaloneWarMojo should be war
Submitted by Tim Astle.

Modified:

tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractStandaloneWarMojo.java

Modified: 
tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractStandaloneWarMojo.java
URL: 
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractStandaloneWarMojo.java?rev=1460304&r1=1460303&r2=1460304&view=diff
==
--- 
tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractStandaloneWarMojo.java
 (original)
+++ 
tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractStandaloneWarMojo.java
 Sun Mar 24 10:17:22 2013
@@ -68,6 +68,13 @@ public abstract class AbstractStandalone
required = true)
 protected String attachArtifactClassifier;
 
+/**
+ * the type to use for the attached/generated artifact
+ * @since 2.2
+ */
+@Parameter( property = "maven.tomcat.exec.war.attachArtifactType", 
defaultValue = "war", required = true )
+protected String attachArtifactClassifierType;
+
 public void execute()
 throws MojoExecutionException, MojoFailureException
 {



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



svn commit: r1460305 - /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java

2013-03-24 Thread olamy
Author: olamy
Date: Sun Mar 24 10:17:52 2013
New Revision: 1460305

URL: http://svn.apache.org/r1460305
Log:
[MTOMCAT-215] Multiple manifests under META-INF, two Main-Class entries
Submitted by Tim Astle.

Modified:

tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java

Modified: 
tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java
URL: 
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java?rev=1460305&r1=1460304&r2=1460305&view=diff
==
--- 
tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java
 (original)
+++ 
tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java
 Sun Mar 24 10:17:52 2013
@@ -69,45 +69,45 @@ public abstract class AbstractExecWarMoj
 extends AbstractTomcat7Mojo
 {
 
-@Parameter( defaultValue = "${project.artifact}", required = true, 
readonly = true )
+@Parameter(defaultValue = "${project.artifact}", required = true, readonly 
= true)
 protected Artifact projectArtifact;
 
 /**
  * The maven project.
  */
-@Parameter( defaultValue = "${project}", required = true, readonly = true )
+@Parameter(defaultValue = "${project}", required = true, readonly = true)
 protected MavenProject project;
 
-@Parameter( defaultValue = "${plugin.artifacts}", required = true )
+@Parameter(defaultValue = "${plugin.artifacts}", required = true)
 protected List pluginArtifacts;
 
-@Parameter( defaultValue = "${project.build.directory}" )
+@Parameter(defaultValue = "${project.build.directory}")
 protected File buildDirectory;
 
 /**
  * Path under {@link #buildDirectory} where this mojo may do temporary 
work.
  */
-@Parameter( defaultValue = 
"${project.build.directory}/tomcat7-maven-plugin-exec" )
+@Parameter(defaultValue = 
"${project.build.directory}/tomcat7-maven-plugin-exec")
 private File pluginWorkDirectory;
 
-@Parameter( property = "maven.tomcat.exec.war.tomcatConf", defaultValue = 
"src/main/tomcatconf" )
+@Parameter(property = "maven.tomcat.exec.war.tomcatConf", defaultValue = 
"src/main/tomcatconf")
 protected File tomcatConfigurationFilesDirectory;
 
-@Parameter( defaultValue = "src/main/tomcatconf/server.xml", property = 
"maven.tomcat.exec.war.serverXml" )
+@Parameter(defaultValue = "src/main/tomcatconf/server.xml", property = 
"maven.tomcat.exec.war.serverXml")
 protected File serverXml;
 
 /**
  * Name of the generated exec JAR.
  */
-@Parameter( property = "tomcat.jar.finalName",
-defaultValue = 
"${project.artifactId}-${project.version}-war-exec.jar", required = true )
+@Parameter(property = "tomcat.jar.finalName",
+   defaultValue = 
"${project.artifactId}-${project.version}-war-exec.jar", required = true)
 protected String finalName;
 
 /**
  * The webapp context path to use for the web application being run.
  * The name to store webapp in exec jar. Do not use /
  */
-@Parameter( property = "maven.tomcat.path", defaultValue = 
"${project.artifactId}", required = true )
+@Parameter(property = "maven.tomcat.path", defaultValue = 
"${project.artifactId}", required = true)
 protected String path;
 
 @Parameter
@@ -125,13 +125,13 @@ public abstract class AbstractExecWarMoj
 /**
  * Location of the local repository.
  */
-@Parameter( defaultValue = "${localRepository}", required = true, readonly 
= true )
+@Parameter(defaultValue = "${localRepository}", required = true, readonly 
= true)
 protected ArtifactRepository local;
 
 /**
  * List of Remote Repositories used by the resolver
  */
-@Parameter( defaultValue = "${project.remoteArtifactRepositories}", 
required = true, readonly = true )
+@Parameter(defaultValue = "${project.remoteArtifactRepositories}", 
required = true, readonly = true)
 protected List remoteRepos;
 
 @Component
@@ -140,35 +140,35 @@ public abstract class AbstractExecWarMoj
 /**
  * Attach or not the generated artifact to the build (use true if you want 
to install or deploy it)
  */
-@Parameter( property = "maven.tomcat.exec.war.attachArtifact", 
defaultValue = "true", required = true )
+@Parameter(property = "maven.tomcat.exec.war.attachArtifact", defaultValue 
= "true", required = true)
 protected boolean attachArtifact;
 
 
 /**
  * the classifier to use for the attached/generated artifact
  */
-@Parameter( property = "maven.tomcat.exec.war.attachArtifactClassifier", 
defaultValue = "exec-war",
-

[jira] [Closed] (MTOMCAT-214) Default attachArtifactClassifierType for AbstractStandaloneWarMojo should be war

2013-03-24 Thread *$^¨%`£

 [ 
https://issues.apache.org/jira/browse/MTOMCAT-214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Olivier Lamy (*$^¨%`£) closed MTOMCAT-214.
--

   Resolution: Fixed
Fix Version/s: 2.2

applied.
Thanks!

> Default attachArtifactClassifierType for AbstractStandaloneWarMojo should be 
> war
> 
>
> Key: MTOMCAT-214
> URL: https://issues.apache.org/jira/browse/MTOMCAT-214
> Project: Apache Tomcat Maven Plugin
>  Issue Type: Bug
>  Components: tomcat7
>Affects Versions: 2.1
>Reporter: Tim Astle
>Assignee: Olivier Lamy (*$^¨%`£)
>Priority: Minor
> Fix For: 2.2
>
> Attachments: AbstractStandaloneWarMojo.java.patch
>
>
> This problem can be worked around by explicitly defining "war" for the 
> attachArtifactClassifierType, but it should be war by default.
> This behaviour was discovered when deploying.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Closed] (MTOMCAT-215) Multiple manifests under META-INF, two Main-Class entries

2013-03-24 Thread *$^¨%`£

 [ 
https://issues.apache.org/jira/browse/MTOMCAT-215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Olivier Lamy (*$^¨%`£) closed MTOMCAT-215.
--

   Resolution: Fixed
Fix Version/s: 2.2

applied.
Thanks!

> Multiple manifests under META-INF, two Main-Class entries
> -
>
> Key: MTOMCAT-215
> URL: https://issues.apache.org/jira/browse/MTOMCAT-215
> Project: Apache Tomcat Maven Plugin
>  Issue Type: Bug
>  Components: tomcat7
>Affects Versions: 2.1
>Reporter: Tim Astle
>Assignee: Olivier Lamy (*$^¨%`£)
>Priority: Minor
> Fix For: 2.2
>
> Attachments: AbstractExecWarMojo.java.patch
>
>
> Relates to this post: 
> http://www.mail-archive.com/users@tomcat.apache.org/msg104817.html
> When using the -standalone jar / war mojos and looked into the artifact that 
> they produced, I noticed that the META-INF directory contained mulitple 
> MANIFEST.MF entries.  I know that the zip archive format supports this, but 
> I'm worried that it may produce undesirable behaviour as two of the manifest 
> entries define a Main-Class.  I'm uncertain how a winner is determined when 
> -jar is the only option provided via command line.
> Additionally, for users who unzip an archive to make modifications, they 
> could potentially blow-away the desirable manifest when manifests are 
> overwritten to the same location on disk, thus crippling the executable jar / 
> war functionality.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



svn commit: r1460309 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/http/Parameters.java

2013-03-24 Thread kkolinko
Author: kkolinko
Date: Sun Mar 24 10:32:27 2013
New Revision: 1460309

URL: http://svn.apache.org/r1460309
Log:
Merged revision 1460234 from tomcat/trunk:
No need to create a new String if data length is 0.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/Parameters.java

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

Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/Parameters.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/Parameters.java?rev=1460309&r1=1460308&r2=1460309&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/Parameters.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/Parameters.java Sun 
Mar 24 10:32:27 2013
@@ -332,7 +332,7 @@ public final class Parameters {
 UserDataHelper.Mode logMode = userDataLog.getNextMode();
 if (logMode != null) {
 String extract;
-if (valueEnd >= nameStart) {
+if (valueEnd > nameStart) {
 extract = new String(bytes, nameStart, valueEnd
 - nameStart, DEFAULT_CHARSET);
 } else {



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



Re: [VOTE] Release Apache Tomcat 7.0.39

2013-03-24 Thread Violeta Georgieva
2013/3/22 Mark Thomas wrote:
> The proposed Apache Tomcat 7.0.39 release is now available for voting.
>
> It can be obtained from:
> https://dist.apache.org/repos/dist/dev/tomcat/tomcat-7/v7.0.39/
> The Maven staging repo is:
> https://repository.apache.org/content/repositories/orgapachetomcat-015/
> The svn tag is:
> http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_39/
>
> The proposed 7.0.39 release is:
> [ ] Broken - do not release
 [X ] Stable - go ahead and release as 7.0.39 Stable

Tested Tomcat in OSGi environment - successful
Basic performance tests - successful

Regards
Violeta

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



svn commit: r1460313 - /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReportJmx.java

2013-03-24 Thread kkolinko
Author: kkolinko
Date: Sun Mar 24 11:15:47 2013
New Revision: 1460313

URL: http://svn.apache.org/r1460313
Log:
Fix NPE in TestSlowQueryReport test

The TestSlowQueryReport L107 calls "new SlowQueryReportJmx().getObjectName(..)",
and thus properties field in new SlowQueryReportJmx is never set
and accessing it caused NPE in getObjectName(..).

Modified:

tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReportJmx.java

Modified: 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReportJmx.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReportJmx.java?rev=1460313&r1=1460312&r2=1460313&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReportJmx.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReportJmx.java
 Sun Mar 24 11:15:47 2013
@@ -270,9 +270,10 @@ public class SlowQueryReportJmx extends 
 
 
 public ObjectName getObjectName(Class clazz, String poolName) throws 
MalformedObjectNameException {
-ObjectName oname = null;
-if (getProperties().containsKey(objectNameAttribute)) {
-oname = new 
ObjectName(getProperties().get(objectNameAttribute).getValue());
+ObjectName oname;
+Map properties = getProperties();
+if (properties != null && properties.containsKey(objectNameAttribute)) 
{
+oname = new 
ObjectName(properties.get(objectNameAttribute).getValue());
 } else {
 oname = new 
ObjectName(ConnectionPool.POOL_JMX_TYPE_PREFIX+clazz.getName()+",name=" + 
poolName);
 }



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



buildbot success in ASF Buildbot on tomcat-7-trunk

2013-03-24 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/1153

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] 1460309
Blamelist: kkolinko

Build succeeded!

sincerely,
 -The Buildbot





Re: [VOTE] Release Apache Tomcat 7.0.39

2013-03-24 Thread Yoav Shapira
On Fri, Mar 22, 2013 at 6:48 PM, Mark Thomas  wrote:
> The proposed Apache Tomcat 7.0.39 release is now available for voting.
>
> The proposed 7.0.39 release is:
> [ ] Broken - do not release
> [ X ] Stable - go ahead and release as 7.0.39 Stable

The usual home-brewed app testing, no regressions.

Yoav

>
> Cheers,
>
> 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: r1460316 - in /tomcat/tc7.0.x/trunk: ./ modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReportJmx.java webapps/docs/changelog.xml

2013-03-24 Thread kkolinko
Author: kkolinko
Date: Sun Mar 24 11:32:10 2013
New Revision: 1460316

URL: http://svn.apache.org/r1460316
Log:
Merged revision 1460313 from tomcat/trunk:
Fix NPE in SlowQueryReportJmx.getObjectName() when running TestSlowQueryReport 
test

When SlowQueryReportJmx.getObjectName(..) was converted from being a static 
method into an instance one in r1354173,
TestSlowQueryReport was changed to call "new 
SlowQueryReportJmx().getObjectName(..)".
The call fails with NPE, because the SlowQueryReportJmx.getProperties() returns 
null.

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

tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReportJmx.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

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

Modified: 
tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReportJmx.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReportJmx.java?rev=1460316&r1=1460315&r2=1460316&view=diff
==
--- 
tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReportJmx.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReportJmx.java
 Sun Mar 24 11:32:10 2013
@@ -270,9 +270,10 @@ public class SlowQueryReportJmx extends 
 
 
 public ObjectName getObjectName(Class clazz, String poolName) throws 
MalformedObjectNameException {
-ObjectName oname = null;
-if (getProperties().containsKey(objectNameAttribute)) {
-oname = new 
ObjectName(getProperties().get(objectNameAttribute).getValue());
+ObjectName oname;
+Map properties = getProperties();
+if (properties != null && properties.containsKey(objectNameAttribute)) 
{
+oname = new 
ObjectName(properties.get(objectNameAttribute).getValue());
 } else {
 oname = new 
ObjectName(ConnectionPool.POOL_JMX_TYPE_PREFIX+clazz.getName()+",name=" + 
poolName);
 }

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=1460316&r1=1460315&r2=1460316&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Sun Mar 24 11:32:10 2013
@@ -69,6 +69,10 @@
 54732: Fix leak of statements in StatementCache
 interceptor. (kkolinko)
   
+  
+Fix NPE in SlowQueryReportJmx when running
+TestSlowQueryReport test. (kkolinko)
+  
 
   
   



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



buildbot failure in ASF Buildbot on tomcat-7-trunk

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

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] 1460316
Blamelist: kkolinko

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot





svn commit: r1460342 - /tomcat/trunk/webapps/docs/setup.xml

2013-03-24 Thread kkolinko
Author: kkolinko
Date: Sun Mar 24 12:44:18 2013
New Revision: 1460342

URL: http://svn.apache.org/r1460342
Log:
Change sample jsvc run command to
a) include proper configuration for logging
b) explicitly use CATALINA_HOME and CATALINA_BASE variables, as it is more 
guaranteed to work (as suggested by a comment via comments.a.o)

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

Modified: tomcat/trunk/webapps/docs/setup.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/setup.xml?rev=1460342&r1=1460341&r2=1460342&view=diff
==
--- tomcat/trunk/webapps/docs/setup.xml (original)
+++ tomcat/trunk/webapps/docs/setup.xml Sun Mar 24 12:44:18 2013
@@ -119,9 +119,16 @@
 Tomcat can then be run as a daemon using the following commands.
 
 
+CATALINA_BASE=$CATALINA_HOME
 cd $CATALINA_HOME
-./bin/jsvc -cp ./bin/bootstrap.jar:./bin/tomcat-juli.jar \
--outfile ./logs/catalina.out -errfile ./logs/catalina.err \
+./bin/jsvc \
+-classpath 
$CATALINA_HOME/bin/bootstrap.jar:$CATALINA_HOME/bin/tomcat-juli.jar \
+-outfile $CATALINA_BASE/logs/catalina.out \
+-errfile $CATALINA_BASE/logs/catalina.err \
+-Dcatalina.home=$CATALINA_HOME \
+-Dcatalina.base=$CATALINA_BASE \
+-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
+-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties 
\
 org.apache.catalina.startup.Bootstrap
 
 



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



svn commit: r1460382 - /tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java

2013-03-24 Thread markt
Author: markt
Date: Sun Mar 24 14:20:41 2013
New Revision: 1460382

URL: http://svn.apache.org/r1460382
Log:
Fix visibility. Thanks to kkolinko.

Modified:

tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java?rev=1460382&r1=1460381&r2=1460382&view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java 
(original)
+++ 
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java 
Sun Mar 24 14:20:41 2013
@@ -57,7 +57,7 @@ public class WsHttpUpgradeHandler implem
 private String subProtocol;
 private Map pathParameters;
 private boolean secure;
-WebConnection connection;
+private WebConnection connection;
 
 private WsSession wsSession;
 



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



Re: svn commit: r1459288 - in /tomcat/trunk/java: javax/servlet/http/ org/apache/coyote/http11/upgrade/ org/apache/tomcat/websocket/server/

2013-03-24 Thread Mark Thomas
On 23/03/2013 13:10, Konstantin Kolinko wrote:
> 2013/3/21  :
>> Author: markt
>> Date: Thu Mar 21 13:09:41 2013
>> New Revision: 1459288
>>
>> URL: http://svn.apache.org/r1459288

>> @@ -50,12 +57,10 @@ public class WsHttpUpgradeHandler implem
>>  private String subProtocol;
>>  private Map pathParameters;
>>  private boolean secure;
>> +WebConnection connection;
>>
> 
> I think the above field was supposed to be "private". It is not used
> anywhere outside of this class in this commit.

Fixed. Thanks.

Mark


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



Re: Getting my head around NIO 'simulated' blocking (trying to)

2013-03-24 Thread Mark Thomas
On 23/03/2013 16:46, igaz wrote:
> OK, did a quick check of the servlet spec - and I could find nothing that
> proscribes the kind of thing I was thinking about (in fact it has nothing to
> say even about the semantics of using the javax.servlet.ServletInputStream)

Take a closer look. ServletInputStream (up to Servlet 3.0) is clearly
blocking.

> Here is some pseudocode for what I had in mind (I'm eliding quite a bit:



> Note requestIncomplete() returns true only when the *entire* http request
> (headers and body) has been read.
> Now, this is idiomatic java nio and I have used this pattern in implementing
> my own nio server (not for http requests)
> I see nothing in the servlet spec that would proscribe this and it scales
> wonderfully.

No, it doesn't. Think about what happens if someone wants to upload a
5Gb file.

> Yet it seems that Tomcats NIO connector does not do this.  Hence, my
> confusion/curiosity

Tomcat reads the headers (and does so in a non-blocking mode for NIO)
but reading request bodies is an application concern and is performed
with blocking IO (as required by the Servlet specification). Likewise,
writing the response is done with blocking IO as that is also a
requirement of the specification.

All of this changes with Servlet 3.1.

Mark


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



Re: Getting my head around NIO 'simulated' blocking (trying to)

2013-03-24 Thread igaz
markt wrote
>>Take a closer look. ServletInputStream (up to Servlet 3.0) is clearly
>>blocking.
> 
> Where in the spec is this?  I don't see it.  ServletInputStream is not
> even mentioned - neither is blocking.  ServletInputStream's javadoc also
> mentions nothing about it.  
> Are you talking about section 3.1.1 "When parameters are available"?
> This  is the only place I could find in the 3.0 servlet spec that even
> touches on request.getInputStream() and of course it mentions nothing
> about blocking.
> Now, you might have more context than is available from the straight text
> since I assume someone from the tomcat team is in the expert group
> 
>> Here is some pseudocode for what I had in mind (I'm eliding quite a bit:
> 
>>> Note requestIncomplete() returns true only when the *entire* http
>>> request
>> >(headers and body) has been read.
>>> Now, this is idiomatic java nio and I have used this pattern in
>>> implementing
>>> my own nio server (not for http requests)
>>> I see nothing in the servlet spec that would proscribe this and it
>>> scales
>>> wonderfully.
> 
>>No, it doesn't. Think about what happens if someone wants to upload a
>>5Gb file.
> 
> Well, there is a pretty good software engineering principle that I employ:  
>Don't make the 99% (or 95% or 90%) case pay for the 1%; but yes, you
> are right that large file uploads would be problematic to be sure (not
> because of the non-blocking read of course, but because of the memory
> usage).  I might point out that if you're using servlets to upload 5GB
> files, well you have a bigger issue than blocking vs. non-blocking reads. 
> I'm not sure what your argument is: are you suggesting that Tomcat doesn't
> do non-blocking reads of the http request body because of large file
> uploads or because "it's required by the spec"?
> 
>> >Yet it seems that Tomcats NIO connector does not do this.  Hence, my
>> >confusion/curiosity
> 
>>Tomcat reads the headers (and does so in a non-blocking mode for NIO)
>>but reading request bodies is an application concern and is performed
> 
> well, what about the request's parameter set?  strictly speaking, your
> statement is just incorrect (why for instance isn't reading the headers
> (other than the path info) an 'application' concern, by which I presume
> you mean a servlet's responsibility?)
> 
> 
> 
> 
>>All of this changes with Servlet 3.1.
> 
> Mark
> 
> 
> -
> To unsubscribe, e-mail: 

> dev-unsubscribe@.apache

> For additional commands, e-mail: 

> dev-help@.apache





--
View this message in context: 
http://tomcat.10.n6.nabble.com/Getting-my-head-around-NIO-simulated-blocking-trying-to-tp4996773p4996822.html
Sent from the Tomcat - Dev mailing list archive at Nabble.com.

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



svn commit: r1460421 - in /tomcat/trunk/java/org/apache/tomcat/websocket/pojo: LocalStrings.properties PojoMessageHandlerPartialBase.java PojoMessageHandlerWholeBase.java PojoMethodMapping.java

2013-03-24 Thread markt
Author: markt
Date: Sun Mar 24 18:34:24 2013
New Revision: 1460421

URL: http://svn.apache.org/r1460421
Log:
Better @PathParam handling
- null can be coerced to some types (e.g. boolean)
- if decoding fails, need to throw DecodeException from onMessage

Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/pojo/LocalStrings.properties

tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerPartialBase.java

tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerWholeBase.java
tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/websocket/pojo/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/pojo/LocalStrings.properties?rev=1460421&r1=1460420&r2=1460421&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/pojo/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/pojo/LocalStrings.properties 
Sun Mar 24 18:34:24 2013
@@ -18,6 +18,7 @@ pojoEndpointBase.onCloseFail=Failed to c
 pojoEndpointBase.onErrorFail=Failed to call onError method of POJO end point 
for POJO of type [{0}]
 pojoEndpointBase.onOpenFail=Failed to call onOpen method of POJO end point for 
POJO of type [{0}]
 pojoEndpointServer.getPojoInstanceFail=Failed to create instance of POJO of 
type [{0}]
+pojoMethodMapping.decodePathParamFail=Failed to decode path parameter value 
[{0}] to expected type [{1}]
 pojoMethodMapping.duplicateLastParam=Multiple boolean (last) parameters 
present on the method [{0}] of class [{1}] that was annotated with OnMessage
 pojoMethodMapping.duplicateMessageParam=Multiple message parameters present on 
the method [{0}] of class [{1}] that was annotated with OnMessage
 pojoMethodMapping.duplicatePongMessageParam=Multiple PongMessage parameters 
present on the method [{0}] of class [{1}] that was annotated with OnMessage
@@ -28,5 +29,4 @@ pojoMethodMapping.partialInputStream=Inv
 pojoMethodMapping.partialPong=Invalid PongMesssge and boolean parameters 
present on the method [{0}] of class [{1}] that was annotated with OnMessage
 pojoMethodMapping.partialReader=Invalid Reader and boolean parameters present 
on the method [{0}] of class [{1}] that was annotated with OnMessage
 pojoMethodMapping.pongWithPayload=Invalid PongMessgae and Message parameters 
present on the method [{0}] of class [{1}] that was annotated with OnMessage
-pojoMessageHandlerWhole.decodeFail=Failed to decode received message with 
first matching Decoder instance
 pojoMessageHandlerWhole.decodeIoFail=IO error while decoding message
\ No newline at end of file

Modified: 
tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerPartialBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerPartialBase.java?rev=1460421&r1=1460420&r2=1460421&view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerPartialBase.java
 (original)
+++ 
tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerPartialBase.java
 Sun Mar 24 18:34:24 2013
@@ -20,9 +20,12 @@ import java.lang.reflect.InvocationTarge
 import java.lang.reflect.Method;
 import java.nio.ByteBuffer;
 
+import javax.websocket.DecodeException;
 import javax.websocket.MessageHandler;
 import javax.websocket.Session;
 
+import org.apache.tomcat.websocket.WsSession;
+
 /**
  * Common implementation code for the POJO partial message handlers. All
  * the real work is done in this class and in the superclass.
@@ -45,6 +48,12 @@ public abstract class PojoMessageHandler
 
 @Override
 public final void onMessage(T message, boolean last) {
+if (params != null && params.length == 1 &&
+params[0] instanceof DecodeException) {
+((WsSession) session).getLocal().onError(session,
+(DecodeException) params[0]);
+return;
+}
 Object[] parameters = params.clone();
 if (indexBoolean != -1) {
 parameters[indexBoolean] = Boolean.valueOf(last);

Modified: 
tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerWholeBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerWholeBase.java?rev=1460421&r1=1460420&r2=1460421&view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerWholeBase.java
 (original)
+++ 
tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerWholeBase.java
 Sun Mar 24 18:34:24 2013
@@ -22,9 +22,7 @@ import java.lang.reflect.Method;
 import javax.websocket.DecodeException;
 import javax.websocket.MessageHandler;
 import javax.websocket.Session;

svn commit: r1460462 - /tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java

2013-03-24 Thread markt
Author: markt
Date: Sun Mar 24 21:00:59 2013
New Revision: 1460462

URL: http://svn.apache.org/r1460462
Log:
Once we have all of a partial message send it on if we can. Don't buffer it as 
we have no idea if/when the next part of the message might arrive.

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

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java?rev=1460462&r1=1460461&r2=1460462&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java Sun Mar 24 
21:00:59 2013
@@ -450,18 +450,24 @@ public abstract class WsFrameBase {
 }
 
 // Frame is fully received
-if (continuationExpected) {
-// More data for this message expected
-newFrame();
-} else {
-// Message is complete - send it
+// Send the message if either:
+// - partial messages are supported
+// - the message is complete
+if (usePartial() || !continuationExpected) {
 messageBufferBinary.flip();
 ByteBuffer copy =
 ByteBuffer.allocate(messageBufferBinary.limit());
 copy.put(messageBufferBinary);
 copy.flip();
-sendMessageBinary(copy, true);
+sendMessageBinary(copy, !continuationExpected);
 messageBufferBinary.clear();
+}
+
+if (continuationExpected) {
+// More data for this message expected, start a new frame
+newFrame();
+} else {
+// Message is complete, start a new message
 newMessage();
 }
 



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



svn commit: r1460468 - /tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java

2013-03-24 Thread markt
Author: markt
Date: Sun Mar 24 21:33:27 2013
New Revision: 1460468

URL: http://svn.apache.org/r1460468
Log:
Once we have all of a partial message send it on if we can. Don't buffer it 
unless we have to as we have no idea if/when the next part of the message might 
arrive.

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

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java?rev=1460468&r1=1460467&r2=1460468&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java Sun Mar 24 
21:33:27 2013
@@ -402,6 +402,13 @@ public abstract class WsFrameBase {
 // End of frame and possible message as well.
 
 if (continuationExpected) {
+// If partial messages are supported, send what we have
+// managed to decode
+if (usePartial()) {
+messageBufferText.flip();
+sendMessageText(false);
+messageBufferText.clear();
+}
 messageBufferBinary.compact();
 newFrame();
 // Process next frame



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



svn commit: r1460477 - /tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java

2013-03-24 Thread markt
Author: markt
Date: Sun Mar 24 22:35:58 2013
New Revision: 1460477

URL: http://svn.apache.org/r1460477
Log:
Use URI not URL

Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java?rev=1460477&r1=1460476&r2=1460477&view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java 
(original)
+++ 
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java 
Sun Mar 24 22:35:58 2013
@@ -54,7 +54,7 @@ public class WsHandshakeRequest implemen
 httpSession = request.getSession(false);
 
 // URI
-StringBuffer sb = request.getRequestURL();
+StringBuffer sb = new StringBuffer(request.getRequestURI());
 if (queryString != null) {
 sb.append("?");
 sb.append(queryString);



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



svn commit: r1460478 - /tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java

2013-03-24 Thread markt
Author: markt
Date: Sun Mar 24 22:49:18 2013
New Revision: 1460478

URL: http://svn.apache.org/r1460478
Log:
Need to flip the buffer before converting it

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

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java?rev=1460478&r1=1460477&r2=1460478&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java Sun Mar 24 
22:49:18 2013
@@ -290,6 +290,7 @@ public abstract class WsFrameBase {
 // There will be no overflow as the output buffer is big
 // enough. There will be no underflow as all the data is
 // passed to the decoder in a single call.
+controlBufferText.flip();
 reason = controlBufferText.toString();
 }
 }



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



svn commit: r1460482 - /tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java

2013-03-24 Thread markt
Author: markt
Date: Sun Mar 24 22:56:26 2013
New Revision: 1460482

URL: http://svn.apache.org/r1460482
Log:
Types won't be exact matches. Use isAssignableFrom

Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java?rev=1460482&r1=1460481&r2=1460482&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java 
Sun Mar 24 22:56:26 2013
@@ -286,7 +286,7 @@ public class PojoMethodMapping {
 if (paramFound) {
 continue;
 }
-if (types[i] == String.class) {
+if (String.class.isAssignableFrom(types[i])) {
 if (indexString == -1) {
 indexString = i;
 } else {
@@ -294,7 +294,7 @@ public class PojoMethodMapping {
 "pojoMethodMapping.duplicateMessageParam",
 m.getName(), m.getDeclaringClass().getName()));
 }
-} else if (types[i] == Reader.class) {
+} else if (Reader.class.isAssignableFrom(types[i])) {
 if (indexReader == -1) {
 indexReader = i;
 } else {
@@ -302,7 +302,7 @@ public class PojoMethodMapping {
 "pojoMethodMapping.duplicateMessageParam",
 m.getName(), m.getDeclaringClass().getName()));
 }
-} else if (types[i] == boolean.class) {
+} else if (boolean.class == types[i]) {
 if (indexBoolean == -1) {
 indexBoolean = i;
 } else {
@@ -310,7 +310,7 @@ public class PojoMethodMapping {
 "pojoMethodMapping.duplicateLastParam",
 m.getName(), m.getDeclaringClass().getName()));
 }
-} else if (types[i] == ByteBuffer.class) {
+} else if (ByteBuffer.class.isAssignableFrom(types[i])) {
 if (indexByteBuffer == -1) {
 indexByteBuffer = i;
 } else {
@@ -318,7 +318,7 @@ public class PojoMethodMapping {
 "pojoMethodMapping.duplicateMessageParam",
 m.getName(), m.getDeclaringClass().getName()));
 }
-} else if (types[i] == byte[].class) {
+} else if (byte[].class == types[i]) {
 if (indexByteArray == -1) {
 indexByteArray = i;
 } else {
@@ -326,7 +326,7 @@ public class PojoMethodMapping {
 "pojoMethodMapping.duplicateMessageParam",
 m.getName(), m.getDeclaringClass().getName()));
 }
-} else if (types[i] == InputStream.class) {
+} else if (InputStream.class.isAssignableFrom(types[i])) {
 if (indexInputStream == -1) {
 indexInputStream = i;
 } else {
@@ -342,7 +342,7 @@ public class PojoMethodMapping {
 "pojoMethodMapping.duplicateMessageParam",
 m.getName(), m.getDeclaringClass().getName()));
 }
-} else if (types[i] == Session.class) {
+} else if (Session.class.isAssignableFrom(types[i])) {
 if (indexSession == -1) {
 indexSession = i;
 } else {
@@ -350,7 +350,7 @@ public class PojoMethodMapping {
 "pojoMethodMapping.duplicateSessionParam",
 m.getName(), m.getDeclaringClass().getName()));
 }
-} else if (types[i] == PongMessage.class) {
+} else if (PongMessage.class.isAssignableFrom(types[i])) {
 if (indexPong == -1) {
 indexPong = i;
 } else {
@@ -447,7 +447,7 @@ public class PojoMethodMapping {
 }
 if (indexPayload == -1 && indexPrimitive == -1 &&
 indexBoolean != -1) {
-// The boolean we found is a payload, not an last flag
+// The boolean we found is a payload, not a last flag
 indexPayload = indexBoolean;
 indexPrimitive = indexBoolean;
 indexBoolean = -1;



--

Re: Getting my head around NIO 'simulated' blocking (trying to)

2013-03-24 Thread Mark Thomas
On 24/03/2013 15:23, igaz wrote:
> markt wrote
>>> Take a closer look. ServletInputStream (up to Servlet 3.0) is clearly
>>> blocking.
>>
>> Where in the spec is this?  I don't see it.  ServletInputStream is not
>> even mentioned - neither is blocking.  ServletInputStream's javadoc also
>> mentions nothing about it.

You need to read the Javadoc more carefully. While the words "blocking
and "non-blocking" are not used in ServletInputStream blocking IO is the
only way to implement readLine. Also, look at the Javadoc for the
readXXX methods for InputStream.

>> Are you talking about section 3.1.1 "When parameters are available"?
>> This  is the only place I could find in the 3.0 servlet spec that even
>> touches on request.getInputStream() and of course it mentions nothing
>> about blocking.
>> Now, you might have more context than is available from the straight text
>> since I assume someone from the tomcat team is in the expert group

I happen to be on the EG but all the information is in the Javadoc. See
above. Personally, I really dislike that a) some parts of the spec are
only defined in the Javadoc and b) the Javadoc is not included in the
spec pdf. The spec was a lot easier to search when everything was in a
single document. Unfortunately, I lost that argument with the spec lead.

>>> Here is some pseudocode for what I had in mind (I'm eliding quite a bit:
>> 
 Note requestIncomplete() returns true only when the *entire* http
 request
 (headers and body) has been read.
 Now, this is idiomatic java nio and I have used this pattern in
 implementing
 my own nio server (not for http requests)
 I see nothing in the servlet spec that would proscribe this and it
 scales
 wonderfully.
>>
>>> No, it doesn't. Think about what happens if someone wants to upload a
>>> 5Gb file.
>>
>> Well, there is a pretty good software engineering principle that I employ:  
>>Don't make the 99% (or 95% or 90%) case pay for the 1%; but yes, you
>> are right that large file uploads would be problematic to be sure (not
>> because of the non-blocking read of course, but because of the memory
>> usage).

Exactly. Reading the entire request body into memory doesn't scale.
Performance also gets worse as request size increases.

There is a similar issue with responses and that is why HTTP/1.1 has
chunked encoding so 1) the entire response doesn't have to be held in
memory and 2) the server can start sending the response to the client
before it has finished generating all of it.

>  I might point out that if you're using servlets to upload 5GB
>> files, well you have a bigger issue than blocking vs. non-blocking reads.

Such as? If you are doing uploads over HTTP then Servlets are no better
or worse than any other option.

>> I'm not sure what your argument is: are you suggesting that Tomcat doesn't
>> do non-blocking reads of the http request body because of large file
>> uploads or because "it's required by the spec"?

I am saying that the Servlet specification (up to and including 3.0)
clearly requires reading of request bodies and writing of response
bodies to use blocking IO.

 Yet it seems that Tomcats NIO connector does not do this.  Hence, my
 confusion/curiosity
>>
>>> Tomcat reads the headers (and does so in a non-blocking mode for NIO)
>>> but reading request bodies is an application concern and is performed
>>
>> well, what about the request's parameter set?  strictly speaking, your
>> statement is just incorrect

Nope. My statement was correct.

Parsing of parameters from the request body is an application concern
and is triggered by the application. The Servlet API provides some
convenience methods for doing the work but it is the application that
triggers the processing. The application is free to process them
manually if it wishes and it is also free to completely ignore them (in
which case the container just swallows the bytes).

> (why for instance isn't reading the headers
>> (other than the path info) an 'application' concern, by which I presume
>> you mean a servlet's responsibility?)

Because of where the Servlet specification draws the (sometimes rather
fuzzy) line. There are some aspects of the HTTP protocol that the
container has to manage (e.g. chunking) and to do that it needs to read
and write the headers. Also, if you study the Servlet API - and I'll
grant you this may not be immediately obvious until you start
implementing a Servlet container - the point at which control passes
from the container to the application is once all the HTTP headers have
been read.

The reason for this is that HTTP headers can be in any order so to be
sure that the request is valid, that it is handled correctly and that
the container does any pre/post precessing it is required to do, the
container has to read all the headers before passing control to the
application.

Mark


-
To unsubscribe, e-mail: dev-unsubscr...

Re: Getting my head around NIO 'simulated' blocking (trying to)

2013-03-24 Thread igaz
>You need to read the Javadoc more carefully. 

I suggest you take a look at java.io.ByteArrayInputStream (both source and
javadoc).
Perfectly good InputStream (never heard anyone claim otherwise)
Never blocks.
>While the words "blocking
>and "non-blocking" are not used in ServletInputStream blocking IO is the
>only way to implement readLine. 
Nope.  readLine is beyond trivial (just delegates to #read()) -- has nothing
to do with blocking/non-blocking.
Could implement a non-blocking ServletInputStream (only defines extra
readLine method) in a minute or two.
If I had to guess, you're confusing non-blocking io with asynchronous io 
(it's a common mistake).  The servlet 3.0 spec does proscribe asynchronous
reads when servlets access the http request body (and headers as well for
that matter)

The reason that I'm even bringing this up is that more and more web
applications receive an increasing share of their traffic from GPS devices,
cellphones, etc.  And these devices often use comparatively unreliable
networks, where it is not uncommon for tcp segments to arrive seconds apart
(and I mean tcp segments that are part of the same http request body).
In such a case, Tomcat's current NIO connector leaves us in the same old
place: a dedicated thread per socket, in an io-wait state (i.e. blocking). 
If that's the majority of your traffic, that doesn't scale (and that's just
an empirical statement, not a judgment).

Do you really think that is optimal?  I don't and I think (hope) it is
unnecessary.
Now if the spec really does proscribe a java.io.ByteArrayInputStream-like
approach (and it's not in the pdf and it's not in the javadoc), then that's
unfortunate.

Are there tradeoffs with reading (not parsing, just reading) all the bytes
from the http request body before invoking the servlet FilterChain?  Sure.
Although for servlets that access the http request body via
HttpRequest.getParameter('') (which I submit are the vast majority)
there really is no tradeoff (memory usage is the same).  You certainly
identified one; I can think of others.  And if you're writing an online
backup service, those tradeoffs aren't going to make you very happy.

I'm sure the tomcat committers wouldn't be thrilled with yet another
configuration parameter, yet another code execution path (I know I wouldn't
be) ; maxPostSize is too coarse of course.  Ideally, you want something
where the container could ask the servlet (based upon the dynamic http
request header) - "should I read all of the request body (into memory) or
should I defer reading and let you do it (via request.getInputStream() or
request.getReader()).  This has to be asked *before* invoking the
FilterChain.  Now that is definitely not in the spec (maybe it should be)





--
View this message in context: 
http://tomcat.10.n6.nabble.com/Getting-my-head-around-NIO-simulated-blocking-trying-to-tp4996773p4996847.html
Sent from the Tomcat - Dev mailing list archive at Nabble.com.

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



svn commit: r1460528 - in /tomcat/tc7.0.x/trunk: ./ webapps/docs/setup.xml

2013-03-24 Thread kkolinko
Author: kkolinko
Date: Mon Mar 25 06:31:57 2013
New Revision: 1460528

URL: http://svn.apache.org/r1460528
Log:
Merged revision 1460342 from tomcat/trunk:
Change sample jsvc run command to
a) explicitly use CATALINA_HOME and CATALINA_BASE variables,
as it is more guaranteed to work (as suggested by a comment via comments.a.o),
and as it is needed for logging configuration.
b) include proper configuration for logging

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/webapps/docs/setup.xml

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

Modified: tomcat/tc7.0.x/trunk/webapps/docs/setup.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/setup.xml?rev=1460528&r1=1460527&r2=1460528&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/setup.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/setup.xml Mon Mar 25 06:31:57 2013
@@ -119,9 +119,16 @@
 Tomcat can then be run as a daemon using the following commands.
 
 
+CATALINA_BASE=$CATALINA_HOME
 cd $CATALINA_HOME
-./bin/jsvc -cp ./bin/bootstrap.jar:./bin/tomcat-juli.jar \
--outfile ./logs/catalina.out -errfile ./logs/catalina.err \
+./bin/jsvc \
+-classpath 
$CATALINA_HOME/bin/bootstrap.jar:$CATALINA_HOME/bin/tomcat-juli.jar \
+-outfile $CATALINA_BASE/logs/catalina.out \
+-errfile $CATALINA_BASE/logs/catalina.err \
+-Dcatalina.home=$CATALINA_HOME \
+-Dcatalina.base=$CATALINA_BASE \
+-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
+-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties 
\
 org.apache.catalina.startup.Bootstrap
 
 



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



svn commit: r1460529 - in /tomcat/tc6.0.x/trunk: ./ webapps/docs/setup.xml

2013-03-24 Thread kkolinko
Author: kkolinko
Date: Mon Mar 25 06:34:17 2013
New Revision: 1460529

URL: http://svn.apache.org/r1460529
Log:
CTR: docs
Merged revision 1460342 from tomcat/trunk:
Change sample jsvc run command to
a) explicitly use CATALINA_HOME and CATALINA_BASE variables,
as it is more guaranteed to work (as suggested by a comment via comments.a.o),
and as it is needed for logging configuration.
b) include proper configuration for logging

Modified:
tomcat/tc6.0.x/trunk/   (props changed)
tomcat/tc6.0.x/trunk/webapps/docs/setup.xml

Propchange: tomcat/tc6.0.x/trunk/
--
  Merged /tomcat/trunk:r1460342

Modified: tomcat/tc6.0.x/trunk/webapps/docs/setup.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/setup.xml?rev=1460529&r1=1460528&r2=1460529&view=diff
==
--- tomcat/tc6.0.x/trunk/webapps/docs/setup.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/setup.xml Mon Mar 25 06:34:17 2013
@@ -119,9 +119,16 @@
 Tomcat can then be run as a daemon using the following commands.
 
 
+CATALINA_BASE=$CATALINA_HOME
 cd $CATALINA_HOME
-./bin/jsvc -cp ./bin/bootstrap.jar \
--outfile ./logs/catalina.out -errfile ./logs/catalina.err \
+./bin/jsvc \
+-classpath $CATALINA_HOME/bin/bootstrap.jar \
+-outfile $CATALINA_BASE/logs/catalina.out \
+-errfile $CATALINA_BASE/logs/catalina.err \
+-Dcatalina.home=$CATALINA_HOME \
+-Dcatalina.base=$CATALINA_BASE \
+-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
+-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties 
\
 org.apache.catalina.startup.Bootstrap
 
 



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



[Bug 54747] New: Cluster not work due to registerManager failed

2013-03-24 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54747

Bug ID: 54747
   Summary: Cluster not work due to registerManager failed
   Product: Tomcat 7
   Version: 7.0.37
  Hardware: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: Cluster
  Assignee: dev@tomcat.apache.org
  Reporter: vincentj...@potix.com
Classification: Unclassified

Created attachment 30099
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=30099&action=edit
cluster setting

I setup two Tomcat nodes with Apache mod_jk to build cluster environment. In
the startup log, I find the following message.

Mar 25, 2013 2:13:59 PM org.apache.catalina.ha.tcp.SimpleTcpCluster
registerManager
WARNING: Manager [ org.apache.catalina.session.StandardManager[/test]] does not
implement ClusterManager, addition to cluster has been aborted.

To reproduce the issue
1. Start both Tomcat nodes and Apache Http server.
2. Navigation test.jsp and refresh several times, shall see counter increased.
3. Stop one Tomcat node, refresh the page again, the counter restart from 1
again.

The attached files are my settings and simple test case.

-- 
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 54747] Cluster not work due to registerManager failed

2013-03-24 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54747

--- Comment #1 from vincentj...@potix.com ---
Created attachment 30100
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=30100&action=edit
Test case

-- 
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 54747] Cluster not work due to registerManager failed

2013-03-24 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54747

vincentj...@potix.com changed:

   What|Removed |Added

 OS||All

--- Comment #2 from vincentj...@potix.com ---
I also test it with Tomcat 7.0.16 and it works fine.

-- 
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: r1460530 - in /tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool: DataSourceProxy.java JdbcInterceptor.java

2013-03-24 Thread kkolinko
Author: kkolinko
Date: Mon Mar 25 06:52:06 2013
New Revision: 1460530

URL: http://svn.apache.org/r1460530
Log:
Fix Javadoc. (partial backport of r1397873 )

Modified:

tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java

tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/JdbcInterceptor.java

Modified: 
tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java?rev=1460530&r1=1460529&r2=1460530&view=diff
==
--- 
tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
 Mon Mar 25 06:52:06 2013
@@ -1288,9 +1288,6 @@ public class DataSourceProxy implements 
 
getPoolProperties().setPropagateInterruptState(propagateInterruptState);
 }
 
-/**
- * {@inheritDoc}
- */
 public void purge()  {
 try {
 createPool().purge();
@@ -1299,9 +1296,6 @@ public class DataSourceProxy implements 
 }
 }
 
-/**
- * {@inheritDoc}
- */
 public void purgeOnReturn() {
 try {
 createPool().purgeOnReturn();

Modified: 
tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/JdbcInterceptor.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/JdbcInterceptor.java?rev=1460530&r1=1460529&r2=1460530&view=diff
==
--- 
tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/JdbcInterceptor.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/JdbcInterceptor.java
 Mon Mar 25 06:52:06 2013
@@ -62,7 +62,7 @@ public abstract class JdbcInterceptor im
 public static final String ISWRAPPERFOR_VAL = "isWrapperFor";
 
 /**
- * {@link java.sql.Connection#isValid(boolean)} method name
+ * {@link java.sql.Connection#isValid(int)} method name
  */
 public static final String ISVALID_VAL = "isValid";
 



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