svn commit: r934696 - /tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt

2010-04-15 Thread markt
Author: markt
Date: Fri Apr 16 06:45:39 2010
New Revision: 934696

URL: http://svn.apache.org/viewvc?rev=934696&view=rev
Log:
Review section 4. More stuff to do.

Modified:
tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt

Modified: tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt?rev=934696&r1=934695&r2=934696&view=diff
==
--- tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt (original)
+++ tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt Fri Apr 16 06:45:39 2010
@@ -27,7 +27,12 @@
 
 3. Implement all the new Servlet 3 features
- Sections 1 to 3 - Compliant
-   - Sections 4 to 6 - not checked
+   - Sections 4.1 to 4.3 - Compliant
+   - Section 4.4 - TODO - ServletContainerInitializer
+   - Section 4.5 - Compliant
+   - Section 4.6 - TODO getResource() & META-INF/resources
+   - Section 4.7 to 4.8 - Compliant
+   - Sections 5 to 6 - not checked
- Section 7 - Compliant
- Section 8 - in progress
  8.1 - not checked



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



DO NOT REPLY [Bug 49132] New: JNDI not working

2010-04-15 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49132

   Summary: JNDI not working
   Product: Tomcat 7
   Version: trunk
  Platform: All
OS/Version: All
Status: NEW
  Severity: blocker
  Priority: P2
 Component: Servlet & JSP API
AssignedTo: dev@tomcat.apache.org
ReportedBy: alvins1...@hotmail.com


Simple web-app test to lookup the environment context is throwing an exception
- below code is taken from tomcat 6/7 docs - 2nd line throws a NameNotFound
Exception 'comp' not found.

// Obtain our environment naming context
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- 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: r934677 - in /tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor: StatementCache.java StatementDecoratorInterceptor.java

2010-04-15 Thread fhanik
Author: fhanik
Date: Fri Apr 16 03:37:59 2010
New Revision: 934677

URL: http://svn.apache.org/viewvc?rev=934677&view=rev
Log:
Clean up a bit

Modified:

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/StatementDecoratorInterceptor.java

Modified: 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java?rev=934677&r1=934676&r2=934677&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java
 Fri Apr 16 03:37:59 2010
@@ -105,7 +105,7 @@ public class StatementCache extends Stat
 /*end the cache size*/
 
 /*begin the actual statement cache*/
-
+@Override
 public void reset(ConnectionPool parent, PooledConnection con) {
 super.reset(parent, con);
 if (parent==null) {
@@ -120,7 +120,8 @@ public class StatementCache extends Stat
 }
 }
 }
-
+
+@Override
 public void disconnected(ConnectionPool parent, PooledConnection con, 
boolean finalizing) {
 ConcurrentHashMap statements = 
 
(ConcurrentHashMap)con.getAttributes().get(STATEMENT_CACHE_ATTR);
@@ -136,14 +137,8 @@ public class StatementCache extends Stat
 }
 
 public void closeStatement(CachedStatement st) {
-try {
-if (st==null) return;
-if (((PreparedStatement)st).isClosed()) return;
-cacheSize.decrementAndGet();
-st.forceClose();
-}catch (SQLException sqe) {
-//log debug message
-}
+if (st==null) return;
+st.forceClose();
 }
 
 @Override
@@ -167,22 +162,18 @@ public class StatementCache extends Stat
 
 
 public Object invoke(Object proxy, Method method, Object[] args) throws 
Throwable {
-if (compare(CLOSE_VAL,method)) {
-return super.invoke(proxy, method, args);
-} else {
-boolean process = process(this.types, method, false);
-if (process && args.length>0 && args[0] instanceof String) {
-CachedStatement statement = isCached((String)args[0]);
-if (statement!=null) {
-//remove it from the cache since it is used
-removeStatement(statement);
-return statement.getActualProxy();
-} else {
-return super.invoke(proxy, method, args);
-}
+boolean process = process(this.types, method, false);
+if (process && args.length>0 && args[0] instanceof String) {
+CachedStatement statement = isCached((String)args[0]);
+if (statement!=null) {
+//remove it from the cache since it is used
+removeStatement(statement);
+return statement.getActualProxy();
 } else {
-return super.invoke(proxy,method,args);
+return super.invoke(proxy, method, args);
 }
+} else {
+return super.invoke(proxy,method,args);
 }
 }
 
@@ -231,7 +222,7 @@ public class StatementCache extends Stat
 }
 
 @Override
-public void closedInvoked() {
+public void closeInvoked() {
 //should we cache it
 boolean shouldClose = true;
 if (cacheSize.get() < maxCacheSize) {
@@ -254,14 +245,14 @@ public class StatementCache extends Stat
 closed = true;
 delegate = null;
 if (shouldClose) {
-super.closedInvoked();
+super.closeInvoked();
 }

 }
 
-public void forceClose() throws SQLException {
-super.closedInvoked();
-((Statement)getDelegate()).close();
+public void forceClose() {
+removeStatement(this);
+super.closeInvoked();
 }
 
 }

Modified: 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/StatementDecoratorInterceptor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/StatementDecoratorInterceptor.java?rev=934677&r1=934676&r2=934677&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/StatementDecoratorInterceptor.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/StatementDe

svn commit: r934651 - in /tomcat/trunk/modules/jdbc-pool: java/org/apache/tomcat/jdbc/pool/ java/org/apache/tomcat/jdbc/pool/interceptor/ test/org/apache/tomcat/jdbc/test/

2010-04-15 Thread fhanik
Author: fhanik
Date: Fri Apr 16 00:02:53 2010
New Revision: 934651

URL: http://svn.apache.org/viewvc?rev=934651&view=rev
Log:
Add in statement cache

Added:

tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/TestStatementCache.java
   (with props)
Modified:

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PooledConnection.java

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractCreateStatementInterceptor.java

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractQueryReport.java

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/StatementDecoratorInterceptor.java

Modified: 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PooledConnection.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PooledConnection.java?rev=934651&r1=934650&r2=934651&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PooledConnection.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PooledConnection.java
 Fri Apr 16 00:02:53 2010
@@ -19,6 +19,7 @@ package org.apache.tomcat.jdbc.pool;
 
 import java.sql.SQLException;
 import java.sql.Statement;
+import java.util.HashMap;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 import org.apache.juli.logging.Log;
@@ -106,6 +107,8 @@ public class PooledConnection {
  * The parent
  */
 protected ConnectionPool parent;
+
+private HashMap attributes = new HashMap();
 
 /**
  * Weak reference to cache the list of interceptors for this connection
@@ -598,5 +601,9 @@ public class PooledConnection {
 public boolean isReleased() {
 return released.get();
 }
+
+public HashMap getAttributes() {
+return attributes;
+}
 
 }

Modified: 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractCreateStatementInterceptor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractCreateStatementInterceptor.java?rev=934651&r1=934650&r2=934651&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractCreateStatementInterceptor.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractCreateStatementInterceptor.java
 Fri Apr 16 00:02:53 2010
@@ -35,7 +35,7 @@ public abstract class  AbstractCreateSta
 protected static final String PREPARE_STATEMENT = "prepareStatement";
 protected static final intPREPARE_STATEMENT_IDX = 1;
 protected static final String PREPARE_CALL  = "prepareCall";
-protected static final intPREPARE_IDX   = 2;
+protected static final intPREPARE_CALL_IDX  = 2;
 
 protected static final String[] STATEMENT_TYPES = {CREATE_STATEMENT, 
PREPARE_STATEMENT, PREPARE_CALL};
 protected static final intSTATEMENT_TYPE_COUNT = 
STATEMENT_TYPES.length;

Modified: 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractQueryReport.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractQueryReport.java?rev=934651&r1=934650&r2=934651&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractQueryReport.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractQueryReport.java
 Fri Apr 16 00:02:53 2010
@@ -182,7 +182,7 @@ public abstract class AbstractQueryRepor
 }else if (compare(PREPARE_CALL,name)) {
 //prepareCall
 sql = (String)args[0];
-constructor = 
getConstructor(PREPARE_IDX,CallableStatement.class);
+constructor = 
getConstructor(PREPARE_CALL_IDX,CallableStatement.class);
 prepareCall(sql,time);
 }else {
 //do nothing, might be a future unsupported method

Modified: 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java?rev=934651&r1=934650&r2=934651&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/p

svn commit: r934647 - in /tomcat/trunk/res/META-INF: tomcat-coyote.jar.notice tomcat-embed-core.jar.notice

2010-04-15 Thread kkolinko
Author: kkolinko
Date: Thu Apr 15 23:41:52 2010
New Revision: 934647

URL: http://svn.apache.org/viewvc?rev=934647&view=rev
Log:
Correct a misprint (s/provide/provided), wrap the long line.

Modified:
tomcat/trunk/res/META-INF/tomcat-coyote.jar.notice
tomcat/trunk/res/META-INF/tomcat-embed-core.jar.notice

Modified: tomcat/trunk/res/META-INF/tomcat-coyote.jar.notice
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/res/META-INF/tomcat-coyote.jar.notice?rev=934647&r1=934646&r2=934647&view=diff
==
--- tomcat/trunk/res/META-INF/tomcat-coyote.jar.notice (original)
+++ tomcat/trunk/res/META-INF/tomcat-coyote.jar.notice Thu Apr 15 23:41:52 2010
@@ -4,5 +4,5 @@ Copyright 19...@year@ The Apache Softwar
 This product includes software developed by
 The Apache Software Foundation (http://www.apache.org/).
 
-Annotation scanning is provide by Apache Jakarta BCEL which includes open 
source
-software developed by IBM.
\ No newline at end of file
+Annotation scanning is provided by Apache Jakarta BCEL which includes
+open source software developed by IBM.

Modified: tomcat/trunk/res/META-INF/tomcat-embed-core.jar.notice
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/res/META-INF/tomcat-embed-core.jar.notice?rev=934647&r1=934646&r2=934647&view=diff
==
--- tomcat/trunk/res/META-INF/tomcat-embed-core.jar.notice (original)
+++ tomcat/trunk/res/META-INF/tomcat-embed-core.jar.notice Thu Apr 15 23:41:52 
2010
@@ -16,5 +16,5 @@ The original XML Schemas for Java EE Dep
  - web-fragment_3_0.xsd
 may be obtained from http://java.sun.com/xml/ns/javaee/
 
-Annotation scanning is provide by Apache Jakarta BCEL which includes open 
source
-software developed by IBM.
\ No newline at end of file
+Annotation scanning is provided by Apache Jakarta BCEL which includes
+open source software developed by IBM.



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



svn commit: r934644 [1/2] - in /tomcat/trunk/res/META-INF: tomcat-coyote.jar.license tomcat-coyote.jar.notice tomcat-embed-core.jar.license tomcat-embed-core.jar.notice

2010-04-15 Thread kkolinko
Author: kkolinko
Date: Thu Apr 15 23:36:49 2010
New Revision: 934644

URL: http://svn.apache.org/viewvc?rev=934644&view=rev
Log:
Followup to r934220.
Set svn:eol-style=native for the added files. No change in their content.

Modified:
tomcat/trunk/res/META-INF/tomcat-coyote.jar.license   (contents, props 
changed)
tomcat/trunk/res/META-INF/tomcat-coyote.jar.notice   (contents, props 
changed)
tomcat/trunk/res/META-INF/tomcat-embed-core.jar.license   (contents, props 
changed)
tomcat/trunk/res/META-INF/tomcat-embed-core.jar.notice   (contents, props 
changed)

Modified: tomcat/trunk/res/META-INF/tomcat-coyote.jar.license
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/res/META-INF/tomcat-coyote.jar.license?rev=934644&r1=934643&r2=934644&view=diff
==
--- tomcat/trunk/res/META-INF/tomcat-coyote.jar.license (original)
+++ tomcat/trunk/res/META-INF/tomcat-coyote.jar.license Thu Apr 15 23:36:49 2010
@@ -1,426 +1,426 @@
-
- Apache License
-   Version 2.0, January 2004
-http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-  "License" shall mean the terms and conditions for use, reproduction,
-  and distribution as defined by Sections 1 through 9 of this document.
-
-  "Licensor" shall mean the copyright owner or entity authorized by
-  the copyright owner that is granting the License.
-
-  "Legal Entity" shall mean the union of the acting entity and all
-  other entities that control, are controlled by, or are under common
-  control with that entity. For the purposes of this definition,
-  "control" means (i) the power, direct or indirect, to cause the
-  direction or management of such entity, whether by contract or
-  otherwise, or (ii) ownership of fifty percent (50%) or more of the
-  outstanding shares, or (iii) beneficial ownership of such entity.
-
-  "You" (or "Your") shall mean an individual or Legal Entity
-  exercising permissions granted by this License.
-
-  "Source" form shall mean the preferred form for making modifications,
-  including but not limited to software source code, documentation
-  source, and configuration files.
-
-  "Object" form shall mean any form resulting from mechanical
-  transformation or translation of a Source form, including but
-  not limited to compiled object code, generated documentation,
-  and conversions to other media types.
-
-  "Work" shall mean the work of authorship, whether in Source or
-  Object form, made available under the License, as indicated by a
-  copyright notice that is included in or attached to the work
-  (an example is provided in the Appendix below).
-
-  "Derivative Works" shall mean any work, whether in Source or Object
-  form, that is based on (or derived from) the Work and for which the
-  editorial revisions, annotations, elaborations, or other modifications
-  represent, as a whole, an original work of authorship. For the purposes
-  of this License, Derivative Works shall not include works that remain
-  separable from, or merely link (or bind by name) to the interfaces of,
-  the Work and Derivative Works thereof.
-
-  "Contribution" shall mean any work of authorship, including
-  the original version of the Work and any modifications or additions
-  to that Work or Derivative Works thereof, that is intentionally
-  submitted to Licensor for inclusion in the Work by the copyright owner
-  or by an individual or Legal Entity authorized to submit on behalf of
-  the copyright owner. For the purposes of this definition, "submitted"
-  means any form of electronic, verbal, or written communication sent
-  to the Licensor or its representatives, including but not limited to
-  communication on electronic mailing lists, source code control systems,
-  and issue tracking systems that are managed by, or on behalf of, the
-  Licensor for the purpose of discussing and improving the Work, but
-  excluding communication that is conspicuously marked or otherwise
-  designated in writing by the copyright owner as "Not a Contribution."
-
-  "Contributor" shall mean Licensor and any individual or Legal Entity
-  on behalf of whom a Contribution has been received by Licensor and
-  subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-  this License, each Contributor hereby grants to You a perpetual,
-  worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-  copyright license to reproduce, prepare Derivative Works of,
-  publicly display, publicly perform, sublicense, and distribute the
-  Work and such Derivative Works in Source or Ob

svn commit: r934640 - /tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt

2010-04-15 Thread markt
Author: markt
Date: Thu Apr 15 23:07:22 2010
New Revision: 934640

URL: http://svn.apache.org/viewvc?rev=934640&view=rev
Log:
Section 3 of spec checked

Modified:
tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt

Modified: tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt?rev=934640&r1=934639&r2=934640&view=diff
==
--- tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt (original)
+++ tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt Thu Apr 15 23:07:22 2010
@@ -26,12 +26,7 @@
- Done
 
 3. Implement all the new Servlet 3 features
-   - Sections 1 to 2 - Compliant
-   - Section 3 - in progress
- 3.1 - Compliant
- 3.2 - getParameter() aspect not yet implemented
- 3.3 to 3.6 - Compliant
- 3.7 to 3.11 - not checked
+   - Sections 1 to 3 - Compliant
- Sections 4 to 6 - not checked
- Section 7 - Compliant
- Section 8 - in progress



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



svn commit: r934634 - in /tomcat/trunk/java/org/apache: catalina/connector/Request.java catalina/core/ApplicationPart.java tomcat/util/http/Parameters.java

2010-04-15 Thread markt
Author: markt
Date: Thu Apr 15 22:57:36 2010
New Revision: 934634

URL: http://svn.apache.org/viewvc?rev=934634&view=rev
Log:
Implement SRV.3.2. Non file parts should be exposed via getParameters()
Cache results so multiple calls to getParts() work

Modified:
tomcat/trunk/java/org/apache/catalina/connector/Request.java
tomcat/trunk/java/org/apache/catalina/core/ApplicationPart.java
tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/Request.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Request.java?rev=934634&r1=934633&r2=934634&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/Request.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Request.java Thu Apr 15 
22:57:36 2010
@@ -318,6 +318,18 @@ public class Request
 
 
 /**
+ * The parts, if any, uploaded with this request.
+ */
+protected Collection parts = null;
+
+
+/**
+ * The exception thrown, if any when parsing the parts.
+ */
+protected Exception partsParseException = null;
+
+
+/**
  * The currently active session for this request.
  */
 protected Session session = null;
@@ -441,6 +453,8 @@ public class Request
 subject = null;
 sessionParsed = false;
 parametersParsed = false;
+parts = null;
+partsParseException = null;
 cookiesParsed = false;
 locales.clear();
 localesParsed = false;
@@ -2431,11 +2445,35 @@ public class Request
 public Collection getParts() throws IOException, 
IllegalStateException,
 ServletException {
 
+parseParts();
+
+if (partsParseException != null) {
+if (partsParseException instanceof IOException) { 
+throw (IOException) partsParseException;
+} else if (partsParseException instanceof IllegalStateException) {
+throw (IllegalStateException) partsParseException;
+} else if (partsParseException instanceof ServletException) {
+throw (ServletException) partsParseException;
+}
+}
+
+return parts;
+}
+
+private void parseParts() {
+
+// Return immediately if the parts have already been parsed
+if (parts != null || partsParseException != null)
+return;
+
 MultipartConfigElement mce = getWrapper().getMultipartConfigElement();
 if (mce == null) {
-return Collections.emptyList();
+parts = Collections.emptyList();
+return;
 }
 
+Parameters parameters = coyoteRequest.getParameters();
+
 File location;
 String locationStr = mce.getLocation();
 if (locationStr == null || locationStr.length() == 0) {
@@ -2446,14 +2484,20 @@ public class Request
 }
 
 if (!location.isAbsolute() || !location.isDirectory()) {
-throw new IOException(
+partsParseException = new IOException(
 sm.getString("coyoteRequest.uploadLocationInvalid",
 location));
+return;
 }
 
 // Create a new file upload handler
 DiskFileItemFactory factory = new DiskFileItemFactory();
-factory.setRepository(location.getCanonicalFile());
+try {
+factory.setRepository(location.getCanonicalFile());
+} catch (IOException ioe) {
+partsParseException = ioe;
+return;
+}
 factory.setSizeThreshold(mce.getFileSizeThreshold());
 
 ServletFileUpload upload = new ServletFileUpload();
@@ -2461,31 +2505,48 @@ public class Request
 upload.setFileSizeMax(mce.getMaxFileSize());
 upload.setSizeMax(mce.getMaxRequestSize());
 
-List result = new ArrayList();
+parts = new ArrayList();
 try {
-   List items = upload.parseRequest(this);
-   for (FileItem item : items) {
-result.add(new ApplicationPart(item, mce));
+List items = upload.parseRequest(this);
+for (FileItem item : items) {
+ApplicationPart part = new ApplicationPart(item, mce);
+parts.add(part);
+if (part.getFilename() == null) {
+try {
+parameters.addParameterValues(part.getName(),
+new String[] {part.getString(
+parameters.getEncoding())});
+} catch (UnsupportedEncodingException uee) {
+try {
+parameters.addParameterValues(part.getName(),
+new String[] {part.getString(
+ 

Re: building tomcat-oacc: missing some classes?

2010-04-15 Thread Rainer Jung
I updated OACC with all relevant patches from TC 5.5.x, TC 6.0.x and one 
form trunk between September 2009 and now. Have fun.


Regards,

Rainer

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



svn commit: r934587 - in /tomcat/sandbox/tomcat-oacc/trunk: docs/ src/share/org/apache/catalina/cluster/mcast/ src/share/org/apache/catalina/cluster/membership/ src/share/org/apache/catalina/cluster/t

2010-04-15 Thread rjung
Author: rjung
Date: Thu Apr 15 20:37:53 2010
New Revision: 934587

URL: http://svn.apache.org/viewvc?rev=934587&view=rev
Log:
Fix BZ48248: Use volatile since field is accessed by multiple threads.

Backport of r883200 from TC 7.0.x.

Modified:
tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml

tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java

tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/membership/McastServiceImpl.java

tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/tcp/WorkerThread.java

Modified: tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml?rev=934587&r1=934586&r2=934587&view=diff
==
--- tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml (original)
+++ tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml Thu Apr 15 20:37:53 2010
@@ -32,6 +32,10 @@
 
   
   
+48248: Use volatile since field is accessed by multiple 
threads.
+Port from Tomcat 7.0. (rjung)
+  
+  
 48790: Fix thread safety issue in the count of the maximum
 number of active session.
 Port from Tomcat 6.0. (rjung)

Modified: 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java?rev=934587&r1=934586&r2=934587&view=diff
==
--- 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java
 (original)
+++ 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java
 Thu Apr 15 20:37:53 2010
@@ -48,7 +48,7 @@ public class McastServiceImpl
 /**
  * Internal flag used for the listen thread that listens to the 
multicasting socket.
  */
-protected boolean doRun = false;
+protected volatile boolean doRun = false;
 /**
  * Socket that we intend to listen to
  */
@@ -416,7 +416,7 @@ public class McastServiceImpl
 
 protected static class RecoveryThread extends Thread {
 
-static boolean running = false;
+static volatile boolean running = false;
 
 McastServiceImpl parent = null;
 

Modified: 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/membership/McastServiceImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/membership/McastServiceImpl.java?rev=934587&r1=934586&r2=934587&view=diff
==
--- 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/membership/McastServiceImpl.java
 (original)
+++ 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/membership/McastServiceImpl.java
 Thu Apr 15 20:37:53 2010
@@ -48,12 +48,12 @@ public class McastServiceImpl
 /**
  * Receiver thread are listens to the multicasting socket.
  */
-protected boolean doRunReceiver = false;
+protected volatile boolean doRunReceiver = false;
 
 /**
  * Sender thread are listens to the multicasting socket.
  */
-protected boolean doRunSender = false;
+protected volatile boolean doRunSender = false;
 
 /**
  * Socket that we intend to listen to
@@ -460,7 +460,7 @@ public class McastServiceImpl
 
 protected static class RecoveryThread extends Thread {
 
-static boolean running = false;
+static volatile boolean running = false;
 
 McastServiceImpl parent = null;
 

Modified: 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/tcp/WorkerThread.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/tcp/WorkerThread.java?rev=934587&r1=934586&r2=934587&view=diff
==
--- 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/tcp/WorkerThread.java
 (original)
+++ 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/tcp/WorkerThread.java
 Thu Apr 15 20:37:53 2010
@@ -25,7 +25,7 @@ package org.apache.catalina.cluster.tcp;
 public class WorkerThread extends Thread
 {
 protected ThreadPool pool;
-protected boolean doRun = true;
+protected volatile boolean doRun = true;
 
 
 public void setPool(ThreadPool pool) {



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



svn commit: r934578 - in /tomcat/sandbox/tomcat-oacc/trunk: docs/changelog.xml src/share/org/apache/catalina/cluster/session/DeltaManager.java

2010-04-15 Thread rjung
Author: rjung
Date: Thu Apr 15 20:14:49 2010
New Revision: 934578

URL: http://svn.apache.org/viewvc?rev=934578&view=rev
Log:
Fix BZ48790: Make maxActive thread safe.

Backport of r932904 from TC 6.0.x

Modified:
tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml

tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaManager.java

Modified: tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml?rev=934578&r1=934577&r2=934578&view=diff
==
--- tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml (original)
+++ tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml Thu Apr 15 20:14:49 2010
@@ -32,6 +32,11 @@
 
   
   
+48790: Fix thread safety issue in the count of the maximum
+number of active session.
+Port from Tomcat 6.0. (rjung)
+  
+  
 48398: Make objects used as locks final to ensure correct
 operation. Patch provided by sebb.
 Port from Tomcat 6.0. (rjung)

Modified: 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaManager.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaManager.java?rev=934578&r1=934577&r2=934578&view=diff
==
--- 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaManager.java
 (original)
+++ 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaManager.java
 Thu Apr 15 20:14:49 2010
@@ -1295,7 +1295,7 @@ public class DeltaManager extends Cluste
 rejectedSessions = 0 ;
 sessionReplaceCounter = 0 ;
 counterNoStateTransfered = 0 ;
-maxActive = getActiveSessions() ;
+setMaxActive(getActiveSessions());
 sessionCounter = getActiveSessions() ;
 counterReceive_EVT_ALL_SESSION_DATA = 0;
 counterReceive_EVT_GET_ALL_SESSIONS = 0;



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



svn commit: r934577 - in /tomcat/sandbox/tomcat-oacc/trunk: docs/changelog.xml src/share/org/apache/catalina/cluster/session/DeltaSession.java

2010-04-15 Thread rjung
Author: rjung
Date: Thu Apr 15 20:08:58 2010
New Revision: 934577

URL: http://svn.apache.org/viewvc?rev=934577&view=rev
Log:
Fix BZ48398: Objects used as locks should be final.
Patches provided by sebb.

Backport of r896383 from TC 6.0.x.

Modified:
tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml

tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaSession.java

Modified: tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml?rev=934577&r1=934576&r2=934577&view=diff
==
--- tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml (original)
+++ tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml Thu Apr 15 20:08:58 2010
@@ -32,6 +32,11 @@
 
   
   
+48398: Make objects used as locks final to ensure correct
+operation. Patch provided by sebb.
+Port from Tomcat 6.0. (rjung)
+  
+  
 47502: Don't replicate session attributes known not to be
 serializable.
 Port from Tomcat 6.0. (rjung)

Modified: 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaSession.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaSession.java?rev=934577&r1=934576&r2=934577&view=diff
==
--- 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaSession.java
 (original)
+++ 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaSession.java
 Thu Apr 15 20:08:58 2010
@@ -107,7 +107,7 @@ public class DeltaSession extends Standa
 private transient long lastTimeReplicated = System.currentTimeMillis();
 
 
-protected Lock diffLock = new ReentrantReadWriteLock().writeLock();
+protected final Lock diffLock = new ReentrantReadWriteLock().writeLock();
 
 private long version;
 



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



svn commit: r934574 - in /tomcat/sandbox/tomcat-oacc/trunk: docs/changelog.xml src/share/org/apache/catalina/cluster/session/DeltaSession.java

2010-04-15 Thread rjung
Author: rjung
Date: Thu Apr 15 20:04:35 2010
New Revision: 934574

URL: http://svn.apache.org/viewvc?rev=934574&view=rev
Log:
Fix BZ47502: Don't try and replicate attributes we know to be non-serializable.
Patch by Tim Funk.

Backport of r890946 from TC 6.0.x.

Modified:
tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml

tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaSession.java

Modified: tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml?rev=934574&r1=934573&r2=934574&view=diff
==
--- tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml (original)
+++ tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml Thu Apr 15 20:04:35 2010
@@ -32,6 +32,11 @@
 
   
   
+47502: Don't replicate session attributes known not to be
+serializable.
+Port from Tomcat 6.0. (rjung)
+  
+  
 47515: Correctly replicate timestamp during startup.
 Port from Tomcat 6.0. (rjung)
   

Modified: 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaSession.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaSession.java?rev=934574&r1=934573&r2=934574&view=diff
==
--- 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaSession.java
 (original)
+++ 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaSession.java
 Thu Apr 15 20:04:35 2010
@@ -735,7 +735,7 @@ public class DeltaSession extends Standa
 for (int i = 0; i < keys.length; i++) {
 Object value = null;
 value = attributes.get(keys[i]);
-if (value == null)
+if (value == null || exclude(keys[i]))
 continue;
 else if (value instanceof Serializable) {
 saveNames.add(keys[i]);



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



svn commit: r934571 - in /tomcat/sandbox/tomcat-oacc/trunk: docs/changelog.xml src/share/org/apache/catalina/cluster/session/DeltaManager.java

2010-04-15 Thread rjung
Author: rjung
Date: Thu Apr 15 19:58:30 2010
New Revision: 934571

URL: http://svn.apache.org/viewvc?rev=934571&view=rev
Log:
BZ47515: Correctly replicate timestamp during startup.
Patch by Ryuichi Yoshihara

Backport of r811096 from TC 6.0.x.

Modified:
tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml

tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaManager.java

Modified: tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml?rev=934571&r1=934570&r2=934571&view=diff
==
--- tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml (original)
+++ tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml Thu Apr 15 19:58:30 2010
@@ -31,6 +31,10 @@
 
 
   
+  
+47515: Correctly replicate timestamp during startup.
+Port from Tomcat 6.0. (rjung)
+  
   
 45255: Add the ability to change session ID on
 authentication to protect against session fixation attacks. This is

Modified: 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaManager.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaManager.java?rev=934571&r1=934570&r2=934571&view=diff
==
--- 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaManager.java
 (original)
+++ 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaManager.java
 Thu Apr 15 19:58:30 2010
@@ -1273,7 +1273,10 @@ public class DeltaManager extends Cluste
 }
 
 //update last replicated time
-if (msg != null) 
session.setLastTimeReplicated(System.currentTimeMillis());
+if (msg != null){
+   session.setLastTimeReplicated(System.currentTimeMillis());
+   msg.setTimestamp(session.getLastTimeReplicated());
+}
 return msg;
 } catch (IOException x) {
 
log.error(sm.getString("deltaManager.createMessage.unableCreateDeltaRequest",sessionId),
 x);



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



svn commit: r934568 - in /tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session: LocalStrings.properties LocalStrings_es.properties

2010-04-15 Thread rjung
Author: rjung
Date: Thu Apr 15 19:45:54 2010
New Revision: 934568

URL: http://svn.apache.org/viewvc?rev=934568&view=rev
Log:
Fix message strings according to recent change.

Modified:

tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/LocalStrings.properties

tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/LocalStrings_es.properties

Modified: 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/LocalStrings.properties?rev=934568&r1=934567&r2=934568&view=diff
==
--- 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/LocalStrings.properties
 (original)
+++ 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/LocalStrings.properties
 Thu Apr 15 19:45:54 2010
@@ -75,7 +75,7 @@ jvmRoute.listener.started=SessionID Bind
 jvmRoute.listener.stopped=SessionID Binder Listener stopped
 jvmRoute.lostSession=Lost Session [{0}] at path [{1}]
 jvmRoute.missingJvmRouteAttribute=No engine jvmRoute attribute configured!
-jvmRoute.newSessionCookie=Setting cookie with session id [{0}] name: [{1}] 
path: [{2}] secure: [{3}]
+jvmRoute.newSessionCookie=Setting cookie with session id [{0}] name: [{1}] 
path: [{2}] secure: [{3}] httpOnly: [{4}]
 jvmRoute.noCluster=The JvmRouterBinderValve is configured, but clustering is 
not being used. Fail over will still work, providing a PersistentManager is 
used.
 jvmRoute.notFoundManager=Not found Cluster DeltaManager {0} at {1}
 jvmRoute.receiveMessage.sessionIDChanged=Cluster 
JvmRouteSessionIDBinderListener received orginal session ID [{0}] set to new id 
[{1}] for context path [{2}]

Modified: 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/LocalStrings_es.properties
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/LocalStrings_es.properties?rev=934568&r1=934567&r2=934568&view=diff
==
--- 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/LocalStrings_es.properties
 (original)
+++ 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/LocalStrings_es.properties
 Thu Apr 15 19:45:54 2010
@@ -75,7 +75,7 @@ jvmRoute.listener.started = Arrancado Oy
 jvmRoute.listener.stopped = Parado Oyente Ligador de SessionID
 jvmRoute.lostSession = Perdida Sesi\u00F3n [{0}] en ruta [{1}]
 jvmRoute.missingJvmRouteAttribute = \u00A1No se ha configurado atributo de 
motor jvmRoute\!
-jvmRoute.newSessionCookie = Poniendo cookie con id de sesi\u00F3n [{0}] 
nombre\: [{1}] ruta\: [{2}] seguro\: [{3}]
+jvmRoute.newSessionCookie = Poniendo cookie con id de sesi\u00F3n [{0}] 
nombre\: [{1}] ruta\: [{2}] seguro\: [{3}] http s\u00F3lo\: [{4}]
 jvmRoute.notFoundManager = No hallado Cl\u00FAster DeltaManager {0} en {1}
 jvmRoute.receiveMessage.sessionIDChanged = Cl\u00FAster 
JvmRouteSessionIDBinderListener recibi\u00F3 ID original de sesi\u00F3n [{0}] 
puesto a nuevo id [{1}] para la ruta de contexto [{2}]
 jvmRoute.run.already = receptor jvmRoute SessionID ya ejecutado



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



svn commit: r934566 - /tomcat/tc5.5.x/trunk/container/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings_es.properties

2010-04-15 Thread rjung
Author: rjung
Date: Thu Apr 15 19:44:11 2010
New Revision: 934566

URL: http://svn.apache.org/viewvc?rev=934566&view=rev
Log:
Colons are consistently escaped in this file.

Modified:

tomcat/tc5.5.x/trunk/container/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings_es.properties

Modified: 
tomcat/tc5.5.x/trunk/container/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings_es.properties
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings_es.properties?rev=934566&r1=934565&r2=934566&view=diff
==
--- 
tomcat/tc5.5.x/trunk/container/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings_es.properties
 (original)
+++ 
tomcat/tc5.5.x/trunk/container/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings_es.properties
 Thu Apr 15 19:44:11 2010
@@ -78,7 +78,7 @@ jvmRoute.listener.started = Arrancado Oy
 jvmRoute.listener.stopped = Parado Oyente Ligador de SessionID
 jvmRoute.lostSession = Perdida Sesi\u00F3n [{0}] en ruta [{1}]
 jvmRoute.missingJvmRouteAttribute = \u00A1No se ha configurado atributo de 
motor jvmRoute\!
-jvmRoute.newSessionCookie = Poniendo cookie con id de sesi\u00F3n [{0}] 
nombre\: [{1}] ruta\: [{2}] seguro\: [{3}] http s\u00F3lo: [{4}]
+jvmRoute.newSessionCookie = Poniendo cookie con id de sesi\u00F3n [{0}] 
nombre\: [{1}] ruta\: [{2}] seguro\: [{3}] http s\u00F3lo\: [{4}]
 jvmRoute.notFoundManager = No hallado Cl\u00FAster DeltaManager {0} en {1}
 jvmRoute.receiveMessage.sessionIDChanged = Cl\u00FAster 
JvmRouteSessionIDBinderListener recibi\u00F3 ID original de sesi\u00F3n [{0}] 
puesto a nuevo id [{1}] para la ruta de contexto [{2}]
 jvmRoute.run.already = receptor jvmRoute SessionID ya ejecutado



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



svn commit: r934565 - in /tomcat/tc5.5.x/trunk/container/modules/cluster/src/share/org/apache/catalina/cluster/session: LocalStrings.properties LocalStrings_es.properties

2010-04-15 Thread rjung
Author: rjung
Date: Thu Apr 15 19:41:03 2010
New Revision: 934565

URL: http://svn.apache.org/viewvc?rev=934565&view=rev
Log:
Fix localized message format which was forgotten in r918741.
when backporting r891304/r904855 from TC 6.0.x to TC 5.5.x.

CTR since message string change, though edge case
(parameter count changes).

Modified:

tomcat/tc5.5.x/trunk/container/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings.properties

tomcat/tc5.5.x/trunk/container/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings_es.properties

Modified: 
tomcat/tc5.5.x/trunk/container/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings.properties?rev=934565&r1=934564&r2=934565&view=diff
==
--- 
tomcat/tc5.5.x/trunk/container/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings.properties
 (original)
+++ 
tomcat/tc5.5.x/trunk/container/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings.properties
 Thu Apr 15 19:41:03 2010
@@ -78,7 +78,7 @@ jvmRoute.listener.started=SessionID Bind
 jvmRoute.listener.stopped=SessionID Binder Listener stopped
 jvmRoute.lostSession=Lost Session [{0}] at path [{1}]
 jvmRoute.missingJvmRouteAttribute=No engine jvmRoute attribute configured!
-jvmRoute.newSessionCookie=Setting cookie with session id [{0}] name: [{1}] 
path: [{2}] secure: [{3}]
+jvmRoute.newSessionCookie=Setting cookie with session id [{0}] name: [{1}] 
path: [{2}] secure: [{3}] httpOnly: [{4}]
 jvmRoute.noCluster=The JvmRouterBinderValve is configured, but clustering is 
not being used. Fail over will still work, providing a PersistentManager is 
used.
 jvmRoute.notFoundManager=Not found Cluster DeltaManager {0} at {1}
 jvmRoute.receiveMessage.sessionIDChanged=Cluster 
JvmRouteSessionIDBinderListener received orginal session ID [{0}] set to new id 
[{1}] for context path [{2}]

Modified: 
tomcat/tc5.5.x/trunk/container/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings_es.properties
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings_es.properties?rev=934565&r1=934564&r2=934565&view=diff
==
--- 
tomcat/tc5.5.x/trunk/container/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings_es.properties
 (original)
+++ 
tomcat/tc5.5.x/trunk/container/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings_es.properties
 Thu Apr 15 19:41:03 2010
@@ -78,7 +78,7 @@ jvmRoute.listener.started = Arrancado Oy
 jvmRoute.listener.stopped = Parado Oyente Ligador de SessionID
 jvmRoute.lostSession = Perdida Sesi\u00F3n [{0}] en ruta [{1}]
 jvmRoute.missingJvmRouteAttribute = \u00A1No se ha configurado atributo de 
motor jvmRoute\!
-jvmRoute.newSessionCookie = Poniendo cookie con id de sesi\u00F3n [{0}] 
nombre\: [{1}] ruta\: [{2}] seguro\: [{3}]
+jvmRoute.newSessionCookie = Poniendo cookie con id de sesi\u00F3n [{0}] 
nombre\: [{1}] ruta\: [{2}] seguro\: [{3}] http s\u00F3lo: [{4}]
 jvmRoute.notFoundManager = No hallado Cl\u00FAster DeltaManager {0} en {1}
 jvmRoute.receiveMessage.sessionIDChanged = Cl\u00FAster 
JvmRouteSessionIDBinderListener recibi\u00F3 ID original de sesi\u00F3n [{0}] 
puesto a nuevo id [{1}] para la ruta de contexto [{2}]
 jvmRoute.run.already = receptor jvmRoute SessionID ya ejecutado



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



svn commit: r934554 - in /tomcat/sandbox/tomcat-oacc/trunk: docs/changelog.xml src/share/org/apache/catalina/cluster/session/JvmRouteBinderValve.java

2010-04-15 Thread rjung
Author: rjung
Date: Thu Apr 15 19:19:15 2010
New Revision: 934554

URL: http://svn.apache.org/viewvc?rev=934554&view=rev
Log:
Address BZ45255: Prevent session fixation by providing option (disabled by 
default)
to change session ID on authentication.

Backport of r918761 from TC 5.5.x.

Modified:
tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml

tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/JvmRouteBinderValve.java

Modified: tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml?rev=934554&r1=934553&r2=934554&view=diff
==
--- tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml (original)
+++ tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml Thu Apr 15 19:19:15 2010
@@ -31,6 +31,12 @@
 
 
   
+  
+45255: Add the ability to change session ID on
+authentication to protect against session fixation attacks. This is
+disabled by default.
+Port from Tomcat 5.5. (rjung)
+  
   
   
 47554: httpOnly flag not applied to migrated session cookie.

Modified: 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/JvmRouteBinderValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/JvmRouteBinderValve.java?rev=934554&r1=934553&r2=934554&view=diff
==
--- 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/JvmRouteBinderValve.java
 (original)
+++ 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/JvmRouteBinderValve.java
 Thu Apr 15 19:19:15 2010
@@ -406,9 +406,8 @@ public class JvmRouteBinderValve extends
  *new session id for node migration
  */
 protected void changeRequestSessionID(Request request, Response response, 
String sessionId, String newSessionID) {
-request.setRequestedSessionId(newSessionID);
-if(request.isRequestedSessionIdFromCookie())
-setNewSessionCookie(request, response,newSessionID);
+request.changeSessionId(newSessionID);
+
 // set orginal sessionid at request, to allow application detect the
 // change
 if (sessionIdAttribute != null && !"".equals(sessionIdAttribute)) {
@@ -451,6 +450,8 @@ public class JvmRouteBinderValve extends
  * @param request current request
  * @param response Tomcat Response
  * @param sessionId The session id
+ * 
+ * @deprecated Use {...@link Request#changeSessionId(String)}
  */
 protected void setNewSessionCookie(Request request,
Response response, String sessionId) {



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



svn commit: r934552 - in /tomcat/sandbox/tomcat-oacc/trunk: docs/changelog.xml src/share/org/apache/catalina/cluster/session/JvmRouteBinderValve.java

2010-04-15 Thread rjung
Author: rjung
Date: Thu Apr 15 19:15:32 2010
New Revision: 934552

URL: http://svn.apache.org/viewvc?rev=934552&view=rev
Log:
Fix BZ47554: httpOnly flag not applied to migrated session cookie.

Port of r918741 from TC 5.5.x.

Modified:
tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml

tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/JvmRouteBinderValve.java

Modified: tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml?rev=934552&r1=934551&r2=934552&view=diff
==
--- tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml (original)
+++ tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml Thu Apr 15 19:15:32 2010
@@ -33,6 +33,10 @@
   
   
   
+47554: httpOnly flag not applied to migrated session cookie.
+Port from Tomcat 5.5. (rjung)
+  
+  
 46384: Correct synchronisation issue that could lead to a
 cluster member disappering permanently.
 Port from Tomcat 5.5. (rjung)

Modified: 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/JvmRouteBinderValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/JvmRouteBinderValve.java?rev=934552&r1=934551&r2=934552&view=diff
==
--- 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/JvmRouteBinderValve.java
 (original)
+++ 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/JvmRouteBinderValve.java
 Thu Apr 15 19:15:32 2010
@@ -475,12 +475,14 @@ public class JvmRouteBinderValve extends
 newCookie.setSecure(true);
 }
 if (log.isDebugEnabled()) {
-log.debug(sm.getString("jvmRoute.newSessionCookie",
-sessionId, Globals.SESSION_COOKIE_NAME, newCookie
-.getPath(), new Boolean(newCookie
-.getSecure(;
+Object[] args = new Object[] {sessionId,
+Globals.SESSION_COOKIE_NAME,
+newCookie.getPath(),
+new Boolean(newCookie.getSecure()),
+new Boolean(context.getUseHttpOnly())};
+log.debug(sm.getString("jvmRoute.newSessionCookie", args));
 }
-response.addCookie(newCookie);
+response.addCookieInternal(newCookie, 
context.getUseHttpOnly());
 }
 }
 }



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



svn commit: r934551 - in /tomcat/sandbox/tomcat-oacc/trunk: docs/changelog.xml src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java

2010-04-15 Thread rjung
Author: rjung
Date: Thu Apr 15 19:08:54 2010
New Revision: 934551

URL: http://svn.apache.org/viewvc?rev=934551&view=rev
Log:
Fix BZ46384: Correct synchronisation problem that leads to cluster members
permanently disappearing.

Port of r884960 from TC 5.5.x.

Modified:
tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml

tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java

Modified: tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml?rev=934551&r1=934550&r2=934551&view=diff
==
--- tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml (original)
+++ tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml Thu Apr 15 19:08:54 2010
@@ -33,6 +33,16 @@
   
   
   
+46384: Correct synchronisation issue that could lead to a
+cluster member disappering permanently.
+Port from Tomcat 5.5. (rjung)
+  
+  
+Spurious startup errors during session transfer.
+Sessions get transferred, but node still waits until timeout.
+Port from Tomcat 5.5. (rjung)
+  
+  
 43840: Include user principal if possible when serializing /
 de-serializing sessions.
 Port from Tomcat 6.0. (rjung)

Modified: 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java?rev=934551&r1=934550&r2=934551&view=diff
==
--- 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java
 (original)
+++ 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java
 Thu Apr 15 19:08:54 2010
@@ -266,23 +266,25 @@ public class McastServiceImpl
 McastMember m = McastMember.getMember(data);
 if(log.isDebugEnabled())
 log.debug("Mcast receive ping from member " + m);
-if ( membership.memberAlive(m) ) {
-if(log.isDebugEnabled())
-log.debug("Mcast add member " + m);
-service.memberAdded(m);
+synchronized (membershipMutex) {
+if ( membership.memberAlive(m) ) {
+if(log.isDebugEnabled())
+log.debug("Mcast add member " + m);
+service.memberAdded(m);
+}
 }
 } finally {
 checkExpire();
 }
 }
 
-protected Object expiredMutex = new Object();
+protected final Object membershipMutex = new Object();
 
 /**
  * check member expire or alive
  */
 protected void checkExpire() {
-synchronized (expiredMutex) {
+synchronized (membershipMutex) {
 McastMember[] expired = membership.expire(timeToExpiration);
 for ( int i=0; i

svn commit: r934546 - in /tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session: DeltaManager.java SimpleTcpReplicationManager.java

2010-04-15 Thread rjung
Author: rjung
Date: Thu Apr 15 19:00:23 2010
New Revision: 934546

URL: http://svn.apache.org/viewvc?rev=934546&view=rev
Log:
Spurious startup errors in the cluster
Although the secondary node is able to retrieve all sessions, the main thread 
doesn't
see the changed stateTransfered flag, and thus waits until the transfer timeout 
occurs.

Observed on Solaris. Switching to volatile fixes it.

Port of r814024 from trunk and r884949 from TC 5.5.x.

Modified:

tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaManager.java

tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/SimpleTcpReplicationManager.java

Modified: 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaManager.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaManager.java?rev=934546&r1=934545&r2=934546&view=diff
==
--- 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaManager.java
 (original)
+++ 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaManager.java
 Thu Apr 15 19:00:23 2010
@@ -115,7 +115,7 @@ public class DeltaManager extends Cluste
 private boolean expireSessionsOnShutdown = false;
 private boolean notifyListenersOnReplication = true;
 private boolean notifySessionListenersOnReplication = true;
-private boolean stateTransfered = false ;
+private volatile boolean stateTransfered = false ;
 private int stateTransferTimeout = 60;
 private boolean sendAllSessions = true;
 private boolean sendClusterDomainOnly = true ;

Modified: 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/SimpleTcpReplicationManager.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/SimpleTcpReplicationManager.java?rev=934546&r1=934545&r2=934546&view=diff
==
--- 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/SimpleTcpReplicationManager.java
 (original)
+++ 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/SimpleTcpReplicationManager.java
 Thu Apr 15 19:00:23 2010
@@ -101,7 +101,7 @@ implements ClusterManager
  * Flag to keep track if the state has been transferred or not
  * Assumes false.
  */
-protected boolean stateTransferred = false;
+protected volatile boolean stateTransferred = false;
 private boolean notifyListenersOnReplication;
 private boolean sendClusterDomainOnly = true ;
 



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



Re: building tomcat-oacc: missing some classes?

2010-04-15 Thread Rainer Jung

On 15.04.2010 17:37, Konstantin Kolinko wrote:

2010/4/12 Florian Kirchhoff:


Hi,

first please forgive me for the apparent x-post (my previous post was
hi-jacked and thus is ignored by most relevant contributors, see
http://old.nabble.com/Can-catalina-cluster-from-Tomcat-5.5-be-used-in-Tomcat-6--tp25244120p28173804.html).

I got the latest tomcat-oacc code from

svn checkout
http://svn.apache.org/repos/asf/tomcat/sandbox/tomcat-oacc/trunk/

I am using:

JDK 1.6.0_16
Ant 1.6.0
tomcat-6.0.24

Unfortunately I am running into some issues while trying to build (see end
of mail for errors) due to some missing classes. For example these 2
classes:

org.apache.catalina.cluster.session.ClusterManagerBase
org.apache.catalina.cluster.ClusterMessageBase


(...)


-
ERRORS:

[javac]
C:\tomcat\tomcat-oacc\latest\trunk\src\share\org\apache\catalina\cluster
\authenticator\SingleSignOnMessage.java:23: cannot find symbol
[javac] symbol  : class ClusterMessageBase
[javac] location: package org.apache.catalina.cluster
[javac] import org.apache.catalina.cluster.ClusterMessageBase;
[javac]   ^
[javac]


Looking at the commit history, the latest commit in the oacc cluster package is
http://svn.apache.org/viewvc?view=revision&revision=812933

I think that Rainer forgot to commit some added classes.

The commit message says among other things
"- Add manager base class ClusterManagerBase"
but none classes were added in that revision.


The files were lying around in my workspace and I simply forgot to 
commit then. Added as r934517. OACC trunk build should be fine now.


Sorry for the inconvenience and thanks to Konstantin for already having 
looked at it.


Regards,

Rainer

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



svn commit: r934517 - in /tomcat/sandbox/tomcat-oacc/trunk: build.xml src/share/org/apache/catalina/cluster/ClusterMessageBase.java src/share/org/apache/catalina/cluster/session/ClusterManagerBase.jav

2010-04-15 Thread rjung
Author: rjung
Date: Thu Apr 15 18:39:10 2010
New Revision: 934517

URL: http://svn.apache.org/viewvc?rev=934517&view=rev
Log:
Add classes missing from commit r812933.
Thanks to Florian Kirchhoff and Konstantin
for reminding me.

Added:

tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/ClusterMessageBase.java
   (with props)

tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/ClusterManagerBase.java
   (with props)
Modified:
tomcat/sandbox/tomcat-oacc/trunk/build.xml

Modified: tomcat/sandbox/tomcat-oacc/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/build.xml?rev=934517&r1=934516&r2=934517&view=diff
==
--- tomcat/sandbox/tomcat-oacc/trunk/build.xml (original)
+++ tomcat/sandbox/tomcat-oacc/trunk/build.xml Thu Apr 15 18:39:10 2010
@@ -226,6 +226,9 @@
 
 
 
+
+
+
 
 
   

Added: 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/ClusterMessageBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/ClusterMessageBase.java?rev=934517&view=auto
==
--- 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/ClusterMessageBase.java
 (added)
+++ 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/ClusterMessageBase.java
 Thu Apr 15 18:39:10 2010
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.catalina.cluster;
+
+import org.apache.catalina.cluster.Member;
+
+
+/**
+ * Title: 
+ *
+ * Description: 
+ *
+ *
+ * Company: 
+ *
+ * @author not attributable
+ * @version 1.0
+ */
+public class ClusterMessageBase implements ClusterMessage {
+
+protected transient Member address = null;
+private String uniqueId = null;
+private long timestamp = 0;
+private int resend = ClusterMessage.FLAG_DEFAULT ;
+private int compress = ClusterMessage.FLAG_DEFAULT ;
+
+public ClusterMessageBase() {
+}
+
+/**
+ * getAddress
+ *
+ * @return Member
+ */
+public Member getAddress() {
+return address;
+}
+
+public String getUniqueId() {
+return uniqueId;
+}
+
+public long getTimestamp() {
+return timestamp;
+}
+
+/**
+ * setAddress
+ *
+ * @param member Member
+ */
+public void setAddress(Member member) {
+this.address = member;
+}
+
+public void setUniqueId(String uniqueId) {
+this.uniqueId = uniqueId;
+}
+
+public void setTimestamp(long timestamp) {
+this.timestamp = timestamp;
+}
+
+/**
+ * @return Returns the compress.
+ * @since 5.5.10
+ */
+public int getCompress() {
+return compress;
+}
+/**
+ * @param compress The compress to set.
+ * @since 5.5.10
+ */
+public void setCompress(int compress) {
+this.compress = compress;
+}
+/**
+ * @return Returns the resend.
+ * @since 5.5.10
+ */
+public int getResend() {
+return resend;
+}
+/**
+ * @param resend The resend to set.
+ * @since 5.5.10
+ */
+public void setResend(int resend) {
+this.resend = resend;
+}
+}

Propchange: 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/ClusterMessageBase.java
--
svn:eol-style = native

Propchange: 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/ClusterMessageBase.java
--
svn:keywords = Author Date Id Revision

Added: 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/ClusterManagerBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/ClusterManagerBase.java?rev=934517&view=auto
===

svn commit: r934457 - /tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java

2010-04-15 Thread fhanik
Author: fhanik
Date: Thu Apr 15 15:38:17 2010
New Revision: 934457

URL: http://svn.apache.org/viewvc?rev=934457&view=rev
Log:
if error, next request

Modified:
tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java?rev=934457&r1=934456&r2=934457&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java Thu Apr 15 
15:38:17 2010
@@ -308,7 +308,7 @@ public class Http11Processor extends Abs
 // will reset it
 // thrA.setParam(null);
 // Next request
-if (!async) {
+if (!async || error) {
 inputBuffer.nextRequest();
 outputBuffer.nextRequest();
 }



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



Re: building tomcat-oacc: missing some classes?

2010-04-15 Thread Konstantin Kolinko
2010/4/12 Florian Kirchhoff :
>
> Hi,
>
> first please forgive me for the apparent x-post (my previous post was
> hi-jacked and thus is ignored by most relevant contributors, see
> http://old.nabble.com/Can-catalina-cluster-from-Tomcat-5.5-be-used-in-Tomcat-6--tp25244120p28173804.html).
>
> I got the latest tomcat-oacc code from
>
> svn checkout
> http://svn.apache.org/repos/asf/tomcat/sandbox/tomcat-oacc/trunk/
>
> I am using:
>
> JDK 1.6.0_16
> Ant 1.6.0
> tomcat-6.0.24
>
> Unfortunately I am running into some issues while trying to build (see end
> of mail for errors) due to some missing classes. For example these 2
> classes:
>
> org.apache.catalina.cluster.session.ClusterManagerBase
> org.apache.catalina.cluster.ClusterMessageBase
>
(...)

> -
> ERRORS:
>
>    [javac]
> C:\tomcat\tomcat-oacc\latest\trunk\src\share\org\apache\catalina\cluster
> \authenticator\SingleSignOnMessage.java:23: cannot find symbol
>    [javac] symbol  : class ClusterMessageBase
>    [javac] location: package org.apache.catalina.cluster
>    [javac] import org.apache.catalina.cluster.ClusterMessageBase;
>    [javac]                                   ^
>    [javac]

Looking at the commit history, the latest commit in the oacc cluster package is
http://svn.apache.org/viewvc?view=revision&revision=812933

I think that Rainer forgot to commit some added classes.

The commit message says among other things
"- Add manager base class ClusterManagerBase"
but none classes were added in that revision.


If it will not be fixed shortly, please raise a bug.

Best regards,
Konstantin Kolinko

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



Re: [VOTE] Release Tomcat 7.0.0 based on Tomcat 7.0.0 RC1

2010-04-15 Thread Filip Hanik - Dev Lists

On 04/15/2010 02:44 AM, jean-frederic clere wrote:

On 04/14/2010 07:22 PM, Mark Thomas wrote:
   

On 14/04/2010 11:34, Mark Thomas wrote:
 

The 7.0.0-RC1 tag is
[ ] Broken - do not release
[ ] Alpha  - go ahead and release 7.0.0 Stable based on 7.0.0-RC1
[X] Beta   - go ahead and release 7.0.0 Beta based on 7.0.0-RC1
[ ] Stable - go ahead and release 7.0.0 Stable based on 7.0.0-RC1

The following issues were noted:
   

- Need to add note on stability of APIs to release notes
- APR has a recommended minimum of 1.2.21 which hasn't been released yet
- Re-opened https://issues.apache.org/bugzilla/show_bug.cgi?id=49082
- Servlet 3.0 TCK passes with BIO connector and no security manager
- Servlet 3.0 TCK passes with BIO connector and a security manager
- Servlet 3.0 TCK passes with NIO connector and a security manager with
some exceptions [1]
- Servlet 3.0 TCK fails with APR connector and a security manager [2]
- JSP 2.2 TCK passes with a security manager
- EL 2.2 TCK passes with a security manager

The lack of complete Async support for the APR connector makes this a
Beta release for me.
 

I have started to work on
java/org/apache/coyote/http11/Http11AprProcessor.java ... The missing
code is already in the Bio connector some how it is a kind of copy +
paste + fix.
   

lovely isn't it :)
I can review your checkin and help out when you're done

Cheers

Jean-Frederic

-
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: r934438 - /tomcat/trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java

2010-04-15 Thread markt
Author: markt
Date: Thu Apr 15 15:01:55 2010
New Revision: 934438

URL: http://svn.apache.org/viewvc?rev=934438&view=rev
Log:
Section 3.2 of the Servlet 3 spec says getParameter should still work for 
parameters that do not represent file uploads (it doesn't at the moment - patch 
to follow)

Modified:
tomcat/trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java

Modified: tomcat/trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java?rev=934438&r1=934437&r2=934438&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java Thu 
Apr 15 15:01:55 2010
@@ -1300,8 +1300,9 @@ public final class HTMLManagerServlet ex
 "\n" +
 "\n" +
 " \n" +
-"\n" +
+"" +
 "\n" +
 "\n" +
 " \n" +



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



Re: setRequest method on HttpServletRequestWrapper

2010-04-15 Thread Konstantin Kolinko
2010/4/14 Unmesh Joshi :
> Hi,
>
> I was going through tomcat source code. (Specifically
> ApplicationDispatcher.java). The way HttpServletRequestWrapper is used
> there, puzzled me. What is the intent of all the methods of
> HttpServletRequestWrapper class in
> servlet api?

As JavaDoc for HttpServletRequestWrapper says:
"Provides a convenient implementation of the HttpServletRequest interface that
can be subclassed by developers"

You have to create your own subclass of HttpServletRequestWrapper.

Note also, that the Servlet specification says something about
wrapping and unwrapping the requests and responses.

E.g., SRV.6.2.2, SRV.9.9.1 in the Servlet 2.5 specification.

See also STRICT_SERVLET_COMPLIANCE flag here
http://tomcat.apache.org/tomcat-6.0-doc/config/systemprops.html
and the specification chapter that are mentioned there.

Also, basics:
http://en.wikipedia.org/wiki/Adapter_pattern

> Specifically HttpServletRequestWrapper's setRequest method looks like
> exposed only for container writers. It will never work if develoepers
> use this method in their filter to wrap the request (for something
> like url rewriting). What do you think is the intent of exposing this
> method to public?
>
> I was actually thinking if its possible to write Url rewriter (like
> mod_rewrite) using J2EE API. (request.forward does actually the same
> thing, but its container controlled).
>

Note, that there is already one such well-known library,
http://tuckey.org/urlrewrite/

Best regards,
Konstantin Kolinko

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



svn commit: r934382 - /tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt

2010-04-15 Thread markt
Author: markt
Date: Thu Apr 15 12:06:24 2010
New Revision: 934382

URL: http://svn.apache.org/viewvc?rev=934382&view=rev
Log:
Update release plan.

Modified:
tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt

Modified: tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt?rev=934382&r1=934381&r2=934382&view=diff
==
--- tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt (original)
+++ tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt Thu Apr 15 12:06:24 2010
@@ -26,14 +26,13 @@
- Done
 
 3. Implement all the new Servlet 3 features
-   - Section 1 - Compliant
-   - Section 2 - In progress
- 2.1, 2.2 - Compliant
- 2.3.1, 2.3.2 - Compliant
- 2.3.3.1, 2.3.3.2 - Compliant
- 2.3.3.3, 2.3.3.4 - In progress
- 2.3.4 - Compliant
-   - Sections 3 to 6 - not checked
+   - Sections 1 to 2 - Compliant
+   - Section 3 - in progress
+ 3.1 - Compliant
+ 3.2 - getParameter() aspect not yet implemented
+ 3.3 to 3.6 - Compliant
+ 3.7 to 3.11 - not checked
+   - Sections 4 to 6 - not checked
- Section 7 - Compliant
- Section 8 - in progress
  8.1 - not checked
@@ -49,21 +48,19 @@
- Java EE spec requirements - not checked
- JSR 196 - Recommended - Not yet implemented. Copy from Geronimo?
 
-4. Do an alpha release (from trunk)
-   - Create tc7.0.x\tags to hold release tags
+4. Do an initial release (from trunk)
+   - Create tc7.0.x\tags to hold release tags - Done
- Add to web site
- Update Wiki version status page
 
 5. Fix issues as they get reported
 
 6. Update for final release of the spec
+   - Done
 
-7. Aim for first stable TC7 release with final release of Servlet 3 spec
-   - Create tc7.0.x\trunk from trunk at first stable release
+7. Create tc7.0.x\trunk from trunk at first stable release
 
-8. Nice to haves in first Tomcat 7 stable release
+8. Nice to haves in first Tomcat 7 stable release inc. MBeans
+   - Lifecycle clean-up for init()/destroy()
- Remove old, unused code
  - Clean up internal API (eg remove unused params from methods)
- - Code needs to be ID'd and deprecated in 6.x first
-   - Support for standalone EL
- - http://issues.apache.org/bugzilla/show_bug.cgi?id=43819



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



Re: GSOC 2010

2010-04-15 Thread Mark Thomas

On 07/04/2010 12:06, buddhika chamith wrote:

Hi All,

I have prepared my proposal on JMX enhancement GSOC project. You can find it
here.
http://wiki.apache.org/general/BuddhikaChamith/Tomcat_GSOC2010_Proposal_BuddhikaChamith

Any suggestions and comments are welcome.


I have commented on your proposal in the GSoC application. Please 
respond (also in GSoC app) asap as the deadline for evaluation is fast 
approaching.


Mark



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



Re: [VOTE] Release Tomcat 7.0.0 based on Tomcat 7.0.0 RC1

2010-04-15 Thread sebb
On 15/04/2010, Mark Thomas  wrote:
> On 15/04/2010 01:31, sebb wrote:
>
> > On 14/04/2010, Mark Thomas  wrote:
> >
> > > On 14/04/2010 21:06, sebb wrote:
> > >
> >
> > ...
> >
> >
> > >  >  There is a minor problem with the bin/tomcat-juli.jar - the NOTICE
> says:
> > >  >  Copyright 19...@year@
> > >
> > > I'll take a look.
> > >
> > >
> >
> > Same problem in extras/tomcat-juli-adapters.jar
> >
>
>  This is exactly the kind of drip-feeding of problems that I want to avoid
> with Tomcat 7. To clarify what I wrote in the vote announcement:
>
>  Please run all of your tests against this candidate and report all
>  failures *in a single e-mail*. I'd like to avoid the test, stop at first
> failure, new RC, test, stop at first failure, new RC etc. cycle.
>

Sorry about that, but I did not notice the extras directory first time round.

>  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: r934338 - /tomcat/tc6.0.x/trunk/STATUS.txt

2010-04-15 Thread kfujino
Author: kfujino
Date: Thu Apr 15 09:22:12 2010
New Revision: 934338

URL: http://svn.apache.org/viewvc?rev=934338&view=rev
Log:
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=934338&r1=934337&r2=934338&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Thu Apr 15 09:22:12 2010
@@ -266,3 +266,8 @@ PATCHES PROPOSED TO BACKPORT:
   +1: kfujino
   -1: 
 
+* sessionCounter and expiredSessions declares as long instead of int.
+  http://svn.apache.org/viewvc?view=revision&revision=934337
+  +1: kfujino
+  -1:
+



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



svn commit: r934337 - in /tomcat/trunk/java/org/apache/catalina: Manager.java ha/session/mbeans-descriptors.xml session/ManagerBase.java session/StandardSession.java session/mbeans-descriptors.xml

2010-04-15 Thread kfujino
Author: kfujino
Date: Thu Apr 15 09:19:02 2010
New Revision: 934337

URL: http://svn.apache.org/viewvc?rev=934337&view=rev
Log:
sessionCounter and expiredSessions declares as long instead of int.

Modified:
tomcat/trunk/java/org/apache/catalina/Manager.java
tomcat/trunk/java/org/apache/catalina/ha/session/mbeans-descriptors.xml
tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java
tomcat/trunk/java/org/apache/catalina/session/StandardSession.java
tomcat/trunk/java/org/apache/catalina/session/mbeans-descriptors.xml

Modified: tomcat/trunk/java/org/apache/catalina/Manager.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Manager.java?rev=934337&r1=934336&r2=934337&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/Manager.java (original)
+++ tomcat/trunk/java/org/apache/catalina/Manager.java Thu Apr 15 09:19:02 2010
@@ -127,7 +127,7 @@ public interface Manager {
  *
  * @return Total number of sessions created by this manager.
  */
-public int getSessionCounter();
+public long getSessionCounter();
 
 
 /** 
@@ -135,7 +135,7 @@ public interface Manager {
  *
  * @param sessionCounter Total number of sessions created by this manager.
  */
-public void setSessionCounter(int sessionCounter);
+public void setSessionCounter(long sessionCounter);
 
 
 /**
@@ -171,7 +171,7 @@ public interface Manager {
  *
  * @return Number of sessions that have expired
  */
-public int getExpiredSessions();
+public long getExpiredSessions();
 
 
 /**
@@ -179,7 +179,7 @@ public interface Manager {
  *
  * @param expiredSessions Number of sessions that have expired
  */
-public void setExpiredSessions(int expiredSessions);
+public void setExpiredSessions(long expiredSessions);
 
 
 /**

Modified: 
tomcat/trunk/java/org/apache/catalina/ha/session/mbeans-descriptors.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/mbeans-descriptors.xml?rev=934337&r1=934336&r2=934337&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/ha/session/mbeans-descriptors.xml 
(original)
+++ tomcat/trunk/java/org/apache/catalina/ha/session/mbeans-descriptors.xml Thu 
Apr 15 09:19:02 2010
@@ -143,7 +143,7 @@ created by this Manager"
 
+  type="long"/>
 
+  type="long"/>
 
+  type="long"/>
 
+  type="long"/>
 http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java?rev=934337&r1=934336&r2=934337&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java Thu Apr 15 
09:19:02 2010
@@ -171,7 +171,7 @@ public abstract class ManagerBase extend
 /**
  * Number of sessions that have expired.
  */
-protected int expiredSessions = 0;
+protected long expiredSessions = 0;
 
 
 /**
@@ -181,7 +181,7 @@ public abstract class ManagerBase extend
 protected Map sessions = new ConcurrentHashMap();
 
 // Number of sessions created by this manager
-protected int sessionCounter=0;
+protected long sessionCounter=0;
 
 protected volatile int maxActive=0;
 
@@ -626,7 +626,7 @@ public abstract class ManagerBase extend
  *
  * @return Number of sessions that have expired
  */
-public int getExpiredSessions() {
+public long getExpiredSessions() {
 return expiredSessions;
 }
 
@@ -636,7 +636,7 @@ public abstract class ManagerBase extend
  *
  * @param expiredSessions Number of sessions that have expired
  */
-public void setExpiredSessions(int expiredSessions) {
+public void setExpiredSessions(long expiredSessions) {
 this.expiredSessions = expiredSessions;
 }
 
@@ -1035,7 +1035,7 @@ public abstract class ManagerBase extend
 //  Package Methods
 
 
-public void setSessionCounter(int sessionCounter) {
+public void setSessionCounter(long sessionCounter) {
 this.sessionCounter = sessionCounter;
 }
 
@@ -1045,7 +1045,7 @@ public abstract class ManagerBase extend
  *
  * @return sessions created
  */
-public int getSessionCounter() {
+public long getSessionCounter() {
 return sessionCounter;
 }
 

Modified: tomcat/trunk/java/org/apache/catalina/session/StandardSession.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/StandardSession.java?rev=934337&r1=934336&r2=934337&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/session/StandardSession.java 
(original)
+++ tomcat/trunk/jav

Re: [VOTE] Release Tomcat 7.0.0 based on Tomcat 7.0.0 RC1

2010-04-15 Thread jean-frederic clere
On 04/14/2010 07:22 PM, Mark Thomas wrote:
> On 14/04/2010 11:34, Mark Thomas wrote:
>> The 7.0.0-RC1 tag is
>> [ ] Broken - do not release
>> [ ] Alpha  - go ahead and release 7.0.0 Stable based on 7.0.0-RC1
>> [X] Beta   - go ahead and release 7.0.0 Beta based on 7.0.0-RC1
>> [ ] Stable - go ahead and release 7.0.0 Stable based on 7.0.0-RC1
>>
>> The following issues were noted:
> - Need to add note on stability of APIs to release notes
> - APR has a recommended minimum of 1.2.21 which hasn't been released yet
> - Re-opened https://issues.apache.org/bugzilla/show_bug.cgi?id=49082
> - Servlet 3.0 TCK passes with BIO connector and no security manager
> - Servlet 3.0 TCK passes with BIO connector and a security manager
> - Servlet 3.0 TCK passes with NIO connector and a security manager with
> some exceptions [1]
> - Servlet 3.0 TCK fails with APR connector and a security manager [2]
> - JSP 2.2 TCK passes with a security manager
> - EL 2.2 TCK passes with a security manager
> 
> The lack of complete Async support for the APR connector makes this a
> Beta release for me.

I have started to work on
java/org/apache/coyote/http11/Http11AprProcessor.java ... The missing
code is already in the Bio connector some how it is a kind of copy +
paste + fix.

Cheers

Jean-Frederic

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



DO NOT REPLY [Bug 49122] Update of ROOT application index.html

2010-04-15 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49122

--- Comment #3 from Pid  2010-04-15 04:10:54 EDT ---
Yes, sure. I occurs to me, having slept on it, that the host-manager could be
added to the first panel on the left hand side. I will re-submit dependant on
the response(s).

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- 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