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

2014-09-08 Thread markt
Author: markt
Date: Mon Sep  8 10:03:50 2014
New Revision: 1623346

URL: http://svn.apache.org/r1623346
Log:
Set correct state for newly created ClassLoader.
If start() ever checked current state there would be a failure.

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

Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java?rev=1623346&r1=1623345&r2=1623346&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java Mon Sep 
 8 10:03:50 2014
@@ -719,7 +719,7 @@ public class WebappClassLoader extends U
 
 result.resources = this.resources;
 result.delegate = this.delegate;
-result.state = this.state;
+result.state = LifecycleState.NEW;
 result.needConvert = this.needConvert;
 result.clearReferencesStatic = this.clearReferencesStatic;
 result.clearReferencesStopThreads = this.clearReferencesStopThreads;



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



svn commit: r1623360 [1/3] - in /tomcat/trunk: java/org/apache/catalina/core/ java/org/apache/catalina/loader/ java/org/apache/catalina/security/ java/org/apache/tomcat/ test/org/apache/catalina/loade

2014-09-08 Thread markt
Author: markt
Date: Mon Sep  8 11:13:06 2014
New Revision: 1623360

URL: http://svn.apache.org/r1623360
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56530
Add a web application class loader implementation that supports the parallel 
loading of web application classes.

Added:
tomcat/trunk/java/org/apache/catalina/loader/ParallelWebappClassLoader.java 
  (with props)
tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoaderBase.java
  - copied, changed from r1623346, 
tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
Modified:
tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
tomcat/trunk/java/org/apache/catalina/core/StandardHost.java
tomcat/trunk/java/org/apache/catalina/loader/JdbcLeakPrevention.java
tomcat/trunk/java/org/apache/catalina/loader/LocalStrings.properties
tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java
tomcat/trunk/java/org/apache/catalina/loader/mbeans-descriptors.xml
tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java
tomcat/trunk/java/org/apache/tomcat/InstrumentableClassLoader.java

tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java

tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderThreadLocalMemoryLeak.java
tomcat/trunk/webapps/docs/changelog.xml
tomcat/trunk/webapps/docs/config/context.xml
tomcat/trunk/webapps/docs/config/loader.xml

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1623360&r1=1623359&r2=1623360&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Mon Sep  8 
11:13:06 2014
@@ -762,8 +762,8 @@ public class StandardContext extends Con
 /**
  * If an HttpClient keep-alive timer thread has been started by this web
  * application and is still running, should Tomcat change the context class
- * loader from the current {@link WebappClassLoader} to
- * {@link WebappClassLoader#parent} to prevent a memory leak? Note that the
+ * loader from the current {@link ClassLoader} to
+ * {@link ClassLoader#getParent()} to prevent a memory leak? Note that the
  * keep-alive timer thread will stop on its own once the keep-alives all
  * expire however, on a busy system that might not happen for some time.
  */

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardHost.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardHost.java?rev=1623360&r1=1623359&r2=1623360&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardHost.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardHost.java Mon Sep  8 
11:13:06 2014
@@ -39,7 +39,7 @@ import org.apache.catalina.LifecycleEven
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.LifecycleListener;
 import org.apache.catalina.Valve;
-import org.apache.catalina.loader.WebappClassLoader;
+import org.apache.catalina.loader.WebappClassLoaderBase;
 import org.apache.tomcat.util.ExceptionUtils;
 
 /**
@@ -749,8 +749,8 @@ public class StandardHost extends Contai
 for (Map.Entry entry :
 childClassLoaders.entrySet()) {
 ClassLoader cl = entry.getKey();
-if (cl instanceof WebappClassLoader) {
-if (!((WebappClassLoader) cl).getState().isAvailable()) {
+if (cl instanceof WebappClassLoaderBase) {
+if (!((WebappClassLoaderBase) cl).getState().isAvailable()) {
 result.add(entry.getValue());
 }
 }

Modified: tomcat/trunk/java/org/apache/catalina/loader/JdbcLeakPrevention.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/JdbcLeakPrevention.java?rev=1623360&r1=1623359&r2=1623360&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/loader/JdbcLeakPrevention.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/loader/JdbcLeakPrevention.java Mon 
Sep  8 11:13:06 2014
@@ -27,14 +27,15 @@ import java.util.HashSet;
 import java.util.List;
 
 /**
- * This class is loaded by the {@link WebappClassLoader} to enable it to
+ * This class is loaded by {@link WebappClassLoaderBase} to enable it to
  * deregister JDBC drivers forgotten by the web application. There are some
- * classloading hacks involved - see {@link 
WebappClassLoader#clearReferences()}
- * for details - but the short version is do not just create a new instance of
- * this cl

svn commit: r1623360 [2/3] - in /tomcat/trunk: java/org/apache/catalina/core/ java/org/apache/catalina/loader/ java/org/apache/catalina/security/ java/org/apache/tomcat/ test/org/apache/catalina/loade

2014-09-08 Thread markt
Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java?rev=1623360&r1=1623359&r2=1623360&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java Mon Sep 
 8 11:13:06 2014
@@ -16,695 +16,28 @@
  */
 package org.apache.catalina.loader;
 
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FilePermission;
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.instrument.ClassFileTransformer;
-import java.lang.instrument.IllegalClassFormatException;
-import java.lang.ref.Reference;
-import java.lang.ref.WeakReference;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.nio.charset.StandardCharsets;
-import java.security.AccessControlException;
-import java.security.AccessController;
-import java.security.CodeSource;
-import java.security.Permission;
-import java.security.PermissionCollection;
-import java.security.Policy;
-import java.security.PrivilegedAction;
-import java.security.ProtectionDomain;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.ConcurrentModificationException;
-import java.util.Date;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.ResourceBundle;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.jar.Attributes;
-import java.util.jar.Attributes.Name;
-import java.util.jar.Manifest;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.catalina.Globals;
-import org.apache.catalina.Lifecycle;
 import org.apache.catalina.LifecycleException;
-import org.apache.catalina.LifecycleListener;
-import org.apache.catalina.LifecycleState;
-import org.apache.catalina.WebResource;
-import org.apache.catalina.WebResourceRoot;
-import org.apache.catalina.webresources.TomcatURLStreamHandlerFactory;
-import org.apache.tomcat.InstrumentableClassLoader;
-import org.apache.tomcat.util.ExceptionUtils;
-import org.apache.tomcat.util.IntrospectionUtils;
-import org.apache.tomcat.util.res.StringManager;
-
-/**
- * Specialized web application class loader.
- * 
- * This class loader is a full reimplementation of the
- * URLClassLoader from the JDK. It is designed to be fully
- * compatible with a normal URLClassLoader, although its internal
- * behavior may be completely different.
- * 
- * IMPLEMENTATION NOTE - By default, this class loader follows
- * the delegation model required by the specification. The system class
- * loader will be queried first, then the local repositories, and only then
- * delegation to the parent class loader will occur. This allows the web
- * application to override any shared class except the classes from J2SE.
- * Special handling is provided from the JAXP XML parser interfaces, the JNDI
- * interfaces, and the classes from the servlet API, which are never loaded
- * from the webapp repositories. The delegate property
- * allows an application to modify this behavior to move the parent class 
loader
- * ahead of the local repositories.
- * 
- * IMPLEMENTATION NOTE - Due to limitations in Jasper
- * compilation technology, any repository which contains classes from
- * the servlet API will be ignored by the class loader.
- * 
- * IMPLEMENTATION NOTE - The class loader generates source
- * URLs which include the full JAR URL when a class is loaded from a JAR file,
- * which allows setting security permission at the class level, even when a
- * class is contained inside a JAR.
- * 
- * IMPLEMENTATION NOTE - Local repositories are searched in
- * the order they are added via the initial constructor and/or any subsequent
- * calls to addRepository() or addJar().
- * 
- * IMPLEMENTATION NOTE - No check for sealing violations or
- * security is made unless a security manager is present.
- * 
- * IMPLEMENTATION NOTE - As of 8.0, this class
- * loader implements {@link InstrumentableClassLoader}, permitting web
- * application classes to instrument other classes in the same web
- * application. It does not permit instrumentation of system or container
- * classes or classes in other web apps.
- *
- * @author Remy Maucherat
- * @author Craig R. McClanahan
- */
-public class WebappClassLoader extends URLClassLoader
-implements Lifecycle, Instrum

svn commit: r1623360 [3/3] - in /tomcat/trunk: java/org/apache/catalina/core/ java/org/apache/catalina/loader/ java/org/apache/catalina/security/ java/org/apache/tomcat/ test/org/apache/catalina/loade

2014-09-08 Thread markt
Copied: tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoaderBase.java 
(from r1623346, 
tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java)
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoaderBase.java?p2=tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoaderBase.java&p1=tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java&r1=1623346&r2=1623360&rev=1623360&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoaderBase.java Mon 
Sep  8 11:13:06 2014
@@ -122,11 +122,11 @@ import org.apache.tomcat.util.res.String
  * @author Remy Maucherat
  * @author Craig R. McClanahan
  */
-public class WebappClassLoader extends URLClassLoader
+public abstract class WebappClassLoaderBase extends URLClassLoader
 implements Lifecycle, InstrumentableClassLoader {
 
-private static final org.apache.juli.logging.Log log=
-org.apache.juli.logging.LogFactory.getLog( WebappClassLoader.class );
+private static final org.apache.juli.logging.Log log =
+org.apache.juli.logging.LogFactory.getLog(WebappClassLoaderBase.class);
 
 /**
  * List of ThreadGroup names to ignore when scanning for web application
@@ -140,6 +140,7 @@ public class WebappClassLoader extends U
 private static final String SERVICES_PREFIX = "/META-INF/services/";
 
 static {
+ClassLoader.registerAsParallelCapable();
 JVM_THREAD_GROUP_NAMES.add(JVM_THREAD_GROUP_SYSTEM);
 JVM_THREAD_GROUP_NAMES.add("RMI Runtime");
 }
@@ -215,7 +216,7 @@ public class WebappClassLoader extends U
  * Construct a new ClassLoader with no defined repositories and no
  * parent ClassLoader.
  */
-public WebappClassLoader() {
+protected WebappClassLoaderBase() {
 
 super(new URL[0]);
 
@@ -250,7 +251,7 @@ public class WebappClassLoader extends U
  *
  * @param parent Our parent class loader
  */
-public WebappClassLoader(ClassLoader parent) {
+protected WebappClassLoaderBase(ClassLoader parent) {
 
 super(new URL[0], parent);
 
@@ -397,8 +398,8 @@ public class WebappClassLoader extends U
 /**
  * If an HttpClient keep-alive timer thread has been started by this web
  * application and is still running, should Tomcat change the context class
- * loader from the current {@link WebappClassLoader} to
- * {@link WebappClassLoader#parent} to prevent a memory leak? Note that the
+ * loader from the current {@link ClassLoader} to
+ * {@link ClassLoader#getParent()} to prevent a memory leak? Note that the
  * keep-alive timer thread will stop on its own once the keep-alives all
  * expire however, on a busy system that might not happen for some time.
  */
@@ -697,46 +698,19 @@ public class WebappClassLoader extends U
 
 }
 
-/**
- * Returns a copy of this class loader without any class file
- * transformers. This is a tool often used by Java Persistence API
- * providers to inspect entity classes in the absence of any
- * instrumentation, something that can't be guaranteed within the
- * context of a {@link ClassFileTransformer}'s
- * {@link ClassFileTransformer#transform(ClassLoader, String, Class,
- * ProtectionDomain, byte[]) transform} method.
- * 
- * The returned class loader's resource cache will have been cleared
- * so that classes already instrumented will not be retained or
- * returned.
- *
- * @return the transformer-free copy of this class loader.
- */
-@Override
-public WebappClassLoader copyWithoutTransformers() {
-
-WebappClassLoader result = new WebappClassLoader(getParent());
-
-result.resources = this.resources;
-result.delegate = this.delegate;
-result.state = LifecycleState.NEW;
-result.needConvert = this.needConvert;
-result.clearReferencesStatic = this.clearReferencesStatic;
-result.clearReferencesStopThreads = this.clearReferencesStopThreads;
-result.clearReferencesStopTimerThreads = 
this.clearReferencesStopTimerThreads;
-result.clearReferencesLogFactoryRelease = 
this.clearReferencesLogFactoryRelease;
-result.clearReferencesHttpClientKeepAliveThread = 
this.clearReferencesHttpClientKeepAliveThread;
-result.jarModificationTimes.putAll(this.jarModificationTimes);
-result.permissionList.addAll(this.permissionList);
-result.loaderPC.putAll(this.loaderPC);
-
-try {
-result.start();
-} catch (LifecycleException e) {
-throw new IllegalStateException(e);
-}
-
-return result;
+protected void copyStateWithoutTransformers(WebappClassLoaderBase base) {
+base.resources = this.resources;
+base.delegate

[Bug 56530] WebappClassLoader.loadClass synchronization issue due to coarse lock at WebappClassLoader instance level instead of been by class name

2014-09-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56530

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #7 from Mark Thomas  ---
I've done some refactoring of WebappClassLoader and there is now also a
ParallelWebappClassLoader that uses a lock based on the class name. This will
be included in 8.0.13 onward.

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

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



buildbot exception in ASF Buildbot on tomcat-trunk

2014-09-08 Thread buildbot
The Buildbot has detected a build exception on builder tomcat-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/432

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

Buildslave for this Build: bb-vm_ubuntu

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

BUILD FAILED: exception upload_2

sincerely,
 -The Buildbot




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



buildbot failure in ASF Buildbot on tomcat-trunk

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

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

Buildslave for this Build: bb-vm_ubuntu

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

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot




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



svn commit: r1623367 - in /tomcat/trunk: java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java java/org/apache/catalina/ant/jmx/JMXAccessorConditionBase.java java/org/apache/catalina/ant/jmx/JMXA

2014-09-08 Thread markt
Author: markt
Date: Mon Sep  8 12:21:13 2014
New Revision: 1623367

URL: http://svn.apache.org/r1623367
Log:
Refactor to reduce code duplication identified by Simian.

Added:
tomcat/trunk/java/org/apache/catalina/ant/jmx/JMXAccessorConditionBase.java
  - copied, changed from r1623358, 
tomcat/trunk/java/org/apache/catalina/ant/jmx/JMXAccessorEqualsCondition.java
Modified:
tomcat/trunk/java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java

tomcat/trunk/java/org/apache/catalina/ant/jmx/JMXAccessorEqualsCondition.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: 
tomcat/trunk/java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java?rev=1623367&r1=1623366&r2=1623367&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java Mon 
Sep  8 12:21:13 2014
@@ -14,18 +14,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.catalina.ant.jmx;
 
-import java.io.IOException;
-import java.net.MalformedURLException;
-
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectName;
-
 import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.ProjectComponent;
-import org.apache.tools.ant.taskdefs.condition.Condition;
 
 /**
  *
@@ -87,24 +78,16 @@ import org.apache.tools.ant.taskdefs.con
  * @author Peter Rossbach
  * @since 5.5.10
  */
-public class JMXAccessorCondition extends ProjectComponent implements 
Condition {
+public class JMXAccessorCondition extends JMXAccessorConditionBase {
 
 // - Instance Variables
 
-private String url = null;
-private String host = "localhost";
-private String port = "8050";
-private String password = null;
-private String username = null;
-private String name = null;
-private String attribute;
-private String value;
 private String operation = "==" ;
 private String type = "long" ;
-private String ref = "jmx.server";
 private String unlessCondition;
 private String ifCondition;
 
+
 // - Properties
 
 /**
@@ -132,114 +115,8 @@ public class JMXAccessorCondition extend
 public void setType(String type) {
 this.type = type;
 }
-/**
- * @return Returns the attribute.
- */
-public String getAttribute() {
-return attribute;
-}
-/**
- * @param attribute The attribute to set.
- */
-public void setAttribute(String attribute) {
-this.attribute = attribute;
-}
-/**
- * @return Returns the host.
- */
-public String getHost() {
-return host;
-}
-/**
- * @param host The host to set.
- */
-public void setHost(String host) {
-this.host = host;
-}
-/**
- * @return Returns the name.
- */
-public String getName() {
-return name;
-}
-/**
- * @param objectName The name to set.
- */
-public void setName(String objectName) {
-this.name = objectName;
-}
-/**
- * @return Returns the password.
- */
-public String getPassword() {
-return password;
-}
-/**
- * @param password The password to set.
- */
-public void setPassword(String password) {
-this.password = password;
-}
-/**
- * @return Returns the port.
- */
-public String getPort() {
-return port;
-}
-/**
- * @param port The port to set.
- */
-public void setPort(String port) {
-this.port = port;
-}
-/**
- * @return Returns the url.
- */
-public String getUrl() {
-return url;
-}
-/**
- * @param url The url to set.
- */
-public void setUrl(String url) {
-this.url = url;
-}
-/**
- * @return Returns the username.
- */
-public String getUsername() {
-return username;
-}
-/**
- * @param username The username to set.
- */
-public void setUsername(String username) {
-this.username = username;
-}
-/**
- * @return Returns the value.
- */
-public String getValue() {
-return value;
-}
-// The setter for the "value" attribute
-public void setValue(String value) {
-this.value = value;
-}
 
 /**
- * @return Returns the ref.
- */
-public String getRef() {
-return ref;
-}
-/**
- * @param refId The ref to set.
- */
-public void setRef(String refId) {
-this.ref = refId;
-}
-/**
  * @return Returns the ifCondition.
  */
 public String getIf() {
@@ -2

buildbot retry in ASF Buildbot on tomcat-trunk

2014-09-08 Thread buildbot
 on builder tomcat-trunk while building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/433

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

Buildslave for this Build: bb-vm_ubuntu

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

BUILD FAILED: retry exception slave lost

sincerely,
 -The Buildbot




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



svn commit: r1623382 - in /tomcat/site/trunk: docs/images/simian.jpg docs/tools.html xdocs/images/simian.jpg xdocs/tools.xml

2014-09-08 Thread markt
Author: markt
Date: Mon Sep  8 12:59:08 2014
New Revision: 1623382

URL: http://svn.apache.org/r1623382
Log:
Add Simian to tools page.

Added:
tomcat/site/trunk/docs/images/simian.jpg   (with props)
tomcat/site/trunk/xdocs/images/simian.jpg   (with props)
Modified:
tomcat/site/trunk/docs/tools.html
tomcat/site/trunk/xdocs/tools.xml

Added: tomcat/site/trunk/docs/images/simian.jpg
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/images/simian.jpg?rev=1623382&view=auto
==
Binary file - no diff available.

Propchange: tomcat/site/trunk/docs/images/simian.jpg
--
svn:mime-type = image/jpeg

Modified: tomcat/site/trunk/docs/tools.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/tools.html?rev=1623382&r1=1623381&r2=1623382&view=diff
==
--- tomcat/site/trunk/docs/tools.html (original)
+++ tomcat/site/trunk/docs/tools.html Mon Sep  8 12:59:08 2014
@@ -361,6 +361,19 @@ and a committer should be able to fix it
 
 
 
+
+  
+http://www.harukizaemon.com/simian/index.html"; rel="nofollow">
+  
+  
+Simon Harris kindly provides free licenses for Simian (Similarity
+  Analyzer) to open source projects. Simian is primarily being used in
+  Tomcat trunk to reduce code duplication.
+  
+
+
+
+
 
 
 

Added: tomcat/site/trunk/xdocs/images/simian.jpg
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/images/simian.jpg?rev=1623382&view=auto
==
Binary file - no diff available.

Propchange: tomcat/site/trunk/xdocs/images/simian.jpg
--
svn:mime-type = image/jpeg

Modified: tomcat/site/trunk/xdocs/tools.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/tools.xml?rev=1623382&r1=1623381&r2=1623382&view=diff
==
--- tomcat/site/trunk/xdocs/tools.xml (original)
+++ tomcat/site/trunk/xdocs/tools.xml Mon Sep  8 12:59:08 2014
@@ -106,6 +106,14 @@ and a committer should be able to fix it
   be simplified.

 
+
+  http://www.harukizaemon.com/simian/index.html"; rel="nofollow">
+  
+  Simon Harris kindly provides free licenses for Simian (Similarity
+  Analyzer) to open source projects. Simian is primarily being used in
+  Tomcat trunk to reduce code duplication.
+  
+
 
 
 



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



svn commit: r1623384 - /tomcat/trunk/webapps/docs/class-loader-howto.xml

2014-09-08 Thread markt
Author: markt
Date: Mon Sep  8 13:06:59 2014
New Revision: 1623384

URL: http://svn.apache.org/r1623384
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55943
Update class loader how-to to reflect new position of system class loader in 
loading order.

Modified:
tomcat/trunk/webapps/docs/class-loader-howto.xml

Modified: tomcat/trunk/webapps/docs/class-loader-howto.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/class-loader-howto.xml?rev=1623384&r1=1623383&r2=1623384&view=diff
==
--- tomcat/trunk/webapps/docs/class-loader-howto.xml (original)
+++ tomcat/trunk/webapps/docs/class-loader-howto.xml Mon Sep  8 13:06:59 2014
@@ -189,10 +189,20 @@ All other class loaders in Tomcat follow
 loading looks in the following repositories, in this order:
 
 Bootstrap classes of your JVM
-System class loader classes (described above)
 /WEB-INF/classes of your web application
 /WEB-INF/lib/*.jar of your web application
+System class loader classes (described above)
+Common class loader classes (described above)
+
+
+If the web application class loader is configuered with
+delegate="true" then the order becomes:
+
+Bootstrap classes of your JVM
+System class loader classes (described above)
 Common class loader classes (described above)
+/WEB-INF/classes of your web application
+/WEB-INF/lib/*.jar of your web application
 
 
 



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



svn commit: r1623385 - in /tomcat/tc7.0.x/trunk: ./ webapps/docs/changelog.xml webapps/docs/class-loader-howto.xml

2014-09-08 Thread markt
Author: markt
Date: Mon Sep  8 13:12:07 2014
New Revision: 1623385

URL: http://svn.apache.org/r1623385
Log:
Update class loader how-to to reflect new position of system class loader in 
loading order.
Add a note the the original fix about the change in order.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc7.0.x/trunk/webapps/docs/class-loader-howto.xml

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

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=1623385&r1=1623384&r2=1623385&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Sep  8 13:12:07 2014
@@ -1066,7 +1066,9 @@
 that prevents web applications from trying to override J2SE
 implementation classes. As part of this fix, refactor the way a null
 parent class loader is handled which enables a number of null checks 
and
-object creation calls to be removed. (markt)
+object creation calls to be removed. Note that this change means that,
+by default, the web application class loader is now a higher priority
+for loading classes than the system class loader.  (markt)
   
   
 55958: Differentiate between foo.war the WAR

Modified: tomcat/tc7.0.x/trunk/webapps/docs/class-loader-howto.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/class-loader-howto.xml?rev=1623385&r1=1623384&r2=1623385&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/class-loader-howto.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/class-loader-howto.xml Mon Sep  8 
13:12:07 2014
@@ -184,10 +184,20 @@ All other class loaders in Tomcat follow
 loading looks in the following repositories, in this order:
 
 Bootstrap classes of your JVM
-System class loader classes (described above)
 /WEB-INF/classes of your web application
 /WEB-INF/lib/*.jar of your web application
+System class loader classes (described above)
+Common class loader classes (described above)
+
+
+If the web application class loader is configuered with
+delegate="true" then the order becomes:
+
+Bootstrap classes of your JVM
+System class loader classes (described above)
 Common class loader classes (described above)
+/WEB-INF/classes of your web application
+/WEB-INF/lib/*.jar of your web application
 
 
 



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



svn commit: r1623387 - in /tomcat/site/trunk: docs/migration-7.html xdocs/migration-7.xml

2014-09-08 Thread markt
Author: markt
Date: Mon Sep  8 13:22:45 2014
New Revision: 1623387

URL: http://svn.apache.org/r1623387
Log:
Add a not about the changes introduced to fix bug 55943.

Modified:
tomcat/site/trunk/docs/migration-7.html
tomcat/site/trunk/xdocs/migration-7.xml

Modified: tomcat/site/trunk/docs/migration-7.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/migration-7.html?rev=1623387&r1=1623386&r2=1623387&view=diff
==
--- tomcat/site/trunk/docs/migration-7.html (original)
+++ tomcat/site/trunk/docs/migration-7.html Mon Sep  8 13:22:45 2014
@@ -265,6 +265,9 @@
 Upgrading 7.0.x
 
 
+Tomcat 7.0.x noteable changes
+
+
 Tomcat 7.0.x 
configuration file differences
 
 
@@ -953,13 +956,25 @@ of Apache Tomcat.
 Upgrading 7.0.x
 
   
-When upgrading instances of Apache Tomcat from one version of Tomcat 7 to
-  another, particularly when using separate locations for $CATALINA_HOME and
-  $CATALINA_BASE, it is necessary to ensure that any changes in the
-  configuration files such as new attributes and changes to defaults are 
applied
-  as part of the upgrade. To assist with the identification of these changes,
-  the form below may be used to view the differences between the configuration
-  files in different versions of Tomcat 7.
+
+Tomcat 7.0.x noteable changes
+
+
+The Tomcat developers aim for each patch release to be fully backwards
+   compatible with the previous release.  Occassionally, it is necessary to
+   break backwards compatibility in order to fix a bug. In most cases, 
these
+   changes will go unnoticed. This section lists changes that are not fully
+   backwards compatible and might cause breakage when upgrading.
+
+
+  
+In 7.0.51 onwards, the web application class loader is now a higher
+  priority for loading classes than the system class loader.
+
+
+  
+
+
   
   
 
@@ -967,6 +982,15 @@ of Apache Tomcat.
 
 
 
+When upgrading instances of Apache Tomcat from one version of Tomcat 7 to
+another, particularly when using separate locations for $CATALINA_HOME and
+$CATALINA_BASE, it is necessary to ensure that any changes in the
+configuration files such as new attributes and changes to defaults are
+applied as part of the upgrade. To assist with the identification of these
+changes, the form below may be used to view the differences between the
+configuration files in different versions of Tomcat 7.
+  
+
 Select a configuration file, old version and new version from the boxes
 below and then click "View differences" to see the differences.
 The differences will be shown in a new tab/window.

Modified: tomcat/site/trunk/xdocs/migration-7.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/migration-7.xml?rev=1623387&r1=1623386&r2=1623387&view=diff
==
--- tomcat/site/trunk/xdocs/migration-7.xml (original)
+++ tomcat/site/trunk/xdocs/migration-7.xml Mon Sep  8 13:22:45 2014
@@ -463,16 +463,28 @@ of Apache Tomcat.
 
 
 
-  When upgrading instances of Apache Tomcat from one version of Tomcat 7 to
-  another, particularly when using separate locations for $CATALINA_HOME and
-  $CATALINA_BASE, it is necessary to ensure that any changes in the
-  configuration files such as new attributes and changes to defaults are 
applied
-  as part of the upgrade. To assist with the identification of these changes,
-  the form below may be used to view the differences between the configuration
-  files in different versions of Tomcat 7.
+  
+The Tomcat developers aim for each patch release to be fully backwards
+   compatible with the previous release.  Occassionally, it is necessary to
+   break backwards compatibility in order to fix a bug. In most cases, 
these
+   changes will go unnoticed. This section lists changes that are not fully
+   backwards compatible and might cause breakage when upgrading.
+
+  In 7.0.51 onwards, the web application class loader is now a higher
+  priority for loading classes than the system class loader.
+
+  
   
   
 
+When upgrading instances of Apache Tomcat from one version of Tomcat 7 
to
+another, particularly when using separate locations for $CATALINA_HOME and
+$CATALINA_BASE, it is necessary to ensure that any changes in the
+configuration files such as new attributes and changes to defaults are
+applied as part of the upgrade. To assist with the identification of these
+changes, the form below may be used to view the differences between the
+configuration files in different versions of Tomcat 7.
+  
 Select a configuration file, old version and new version from the boxes
 below and then click "View differences" to see the differences.
 The differences will be shown in a new tab/window.



---

[Bug 55943] Provide a way prevent looking at the System classloader before the webapp classloaders

2014-09-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55943

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #14 from Mark Thomas  ---
Docs updated, note added to the 7.0.x changelog and th 7.0.x upgrade guide
modified to add a section on notable changes with this as the first.

-- 
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: r1623392 - in /tomcat/trunk: java/org/apache/jasper/JspC.java webapps/docs/changelog.xml

2014-09-08 Thread markt
Author: markt
Date: Mon Sep  8 13:37:01 2014
New Revision: 1623392

URL: http://svn.apache.org/r1623392
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=43001
Enable the JspC Ant taks to set the JspC option mappedFile

Modified:
tomcat/trunk/java/org/apache/jasper/JspC.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/jasper/JspC.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/JspC.java?rev=1623392&r1=1623391&r2=1623392&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/JspC.java (original)
+++ tomcat/trunk/java/org/apache/jasper/JspC.java Mon Sep  8 13:37:01 2014
@@ -505,6 +505,10 @@ public class JspC extends Task implement
 return mappedFile;
 }
 
+public void setMappedFile(boolean b) {
+mappedFile = b;
+}
+
 /**
  * Sets the option to include debug information in compiled class.
  */

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1623392&r1=1623391&r2=1623392&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Sep  8 13:37:01 2014
@@ -126,6 +126,10 @@
   
 
   
+43001: Enable the JspC Ant taks to set the JspC option
+mappedFile. (markt)
+  
+  
 Ensure that the implementation of
 javax.servlet.jsp.PageContext.include(String)
 and



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



[Bug 43001] JspC lacks setMappedFile and setDie for use in Ant task

2014-09-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43001

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #1 from Mark Thomas  ---
I've implemented setMappedFile() in 8.0.x and it will be included in 8.0.13
onwards.

die level is specific the calling JspC from the command line and is not used
when using the Ant task so I see no need to provided a setDieLevel method.

There has been little demand for this enhancement request so I do not intend to
back-port it to 7.0.x or 6.0.x.

-- 
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 47714] Response mixed between users

2014-09-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47714

Ben Erridge  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|WORKSFORME  |---

--- Comment #22 from Ben Erridge  ---
This needs to be reopened it happens daily on our production system we are
using the latest mod_jk 1.2.40

I also turned off all retrying and connection reuse.

switching to mod_proxy resolves the issue.

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

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



[Bug 47714] Response mixed between users

2014-09-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47714

--- Comment #23 from Sudhir Reddy  ---
I was unable to reproduce, but describing the scenario seen just in case it
helps in reproducing for others ...

I had seen multiple instances of this happening(Response of one of the previous
request sent to another request) on our production servers.

We were sending wrong Content-Length from Tomcat application(More than the
actual length) and our tomcat logs showed the correct response size being
written to output channel and Apache logs showed less size. Upon looking at
Apache logs, saw that this response length and the served content matched with
an earlier request.

Fixed it by sending correct Content-Length and disabled connection reuse in
mod_jk.

-- 
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 47714] Response mixed between users

2014-09-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47714

--- Comment #24 from Ben Erridge  ---
I found a post about this and the guy was nice enough to post a JMeter script
that can reproduce the issue. I have not tested it yet but looks promising.

http://jeecookbook.blogspot.com/2013/07/modjk-session-mixed-between-users.html

-- 
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 47714] Response mixed between users

2014-09-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47714

Ben Erridge  changed:

   What|Removed |Added

 CC||b...@ciminc.com

-- 
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 56929] New: Wrong OS version on Windows 2012 R2 while running as a service

2014-09-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56929

Bug ID: 56929
   Summary: Wrong OS version on Windows 2012 R2 while running as a
service
   Product: Tomcat 7
   Version: 7.0.55
  Hardware: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: Packaging
  Assignee: dev@tomcat.apache.org
  Reporter: bernd.erne...@oracle.com

The server information while running as a Windows service on 2012 R2 is wrong.

The system is identified as:
 OS Name: Windows Server 2012
 OS Version: 6.2

It is correct when starting tomcat with startup.bat:
 OS Name: Windows Server 2012 R2
 OS Version: 6.3

How to reproduce:

1. Install the Windows service from apache-tomcat-7.0.55\bin
   service.bat install Test
2. Activate the configuration for the /manager/ access in conf\tomcat-users.xml
3. Start the service
4. Navigate to the /manager/status page
5. The "Server Information" contains the wrong OS Version
6. Stop the Windows service
7. Start the tomcat with the startup.bat script
8. Check the /manager/status page again which now contains the correct version

The issue could be related due too the service binary which needs to be
recompiled for:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724832%28v=vs.85%29.aspx
and the link inside it for:
http://msdn.microsoft.com/en-us/library/windows/desktop/dn481241%28v=vs.85%29.aspx

-- 
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 56929] Wrong OS version on Windows 2012 R2 while running as a service

2014-09-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56929

Bernd Ernesti  changed:

   What|Removed |Added

 CC||bernd.erne...@oracle.com
 OS||All

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

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



buildbot failure in ASF Buildbot on tomcat-trunk

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

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

Buildslave for this Build: bb-vm_ubuntu

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

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot




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



[Bug 56929] Wrong OS version on Windows 2012 R2 while running as a service

2014-09-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56929

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #1 from Mark Thomas  ---
You need to raise this with the Apache Commons Daemon project that produces
those binaries.

-- 
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 56931] New: VirtualDirContext requires an absolute DocBase

2014-09-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56931

Bug ID: 56931
   Summary: VirtualDirContext requires an absolute DocBase
   Product: Tomcat 7
   Version: 7.0.55
  Hardware: PC
OS: Linux
Status: NEW
  Severity: major
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: pbus...@mediagrif.com

When a docbase is not absolute, by the usage of a symbolic link for instance,
resources are not resolved.

How to reproduce:

1- Configure a webapp  with a symbolic link in the path. Typical example: A
home directory on another volume than the /home
/home/tomcat -> /volume2/home/tomcat

2- Configure the docbase to use the logical name of the docbase.
Example:  /home/tomcat/webapps/ would resolve to /home/tomcat/webapps/ROOT


Expected result:
Resources are displayed.

Actual result:
Resources are not found

An investigation pointed the issue iun the VirtualDirContext class.
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/naming/resources/VirtualDirContext.java?revision=HEAD&view=markup#l217

When evaluating a resource, it first check if the resource is inside the
docbase.
While the resource is resolved through an absolute path, the docbase isn't.

As a result, using the example above, the resource is evaluated through
/volume2/home/tomcat/webapps/ROOT while the docbase is evaluated through
/home/tomcat/webapps/ROOT and fail.

Both path should be evaluated as absolute path.

-- 
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: r1623456 - /tomcat/trunk/java/org/apache/el/lang/ELArithmetic.java

2014-09-08 Thread markt
Author: markt
Date: Mon Sep  8 18:34:39 2014
New Revision: 1623456

URL: http://svn.apache.org/r1623456
Log:
Extract common code into a new method to reduce duplication identified by 
Simian.

Modified:
tomcat/trunk/java/org/apache/el/lang/ELArithmetic.java

Modified: tomcat/trunk/java/org/apache/el/lang/ELArithmetic.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/lang/ELArithmetic.java?rev=1623456&r1=1623455&r2=1623456&view=diff
==
--- tomcat/trunk/java/org/apache/el/lang/ELArithmetic.java (original)
+++ tomcat/trunk/java/org/apache/el/lang/ELArithmetic.java Mon Sep  8 18:34:39 
2014
@@ -249,23 +249,11 @@ public abstract class ELArithmetic {
 private static final Long ZERO = Long.valueOf(0);
 
 public static final Number add(final Object obj0, final Object obj1) {
-if (obj0 == null && obj1 == null) {
+final ELArithmetic delegate = findDelegate(obj0, obj1);
+if (delegate == null) {
 return Long.valueOf(0);
 }
 
-final ELArithmetic delegate;
-if (BIGDECIMAL.matches(obj0, obj1))
-delegate = BIGDECIMAL;
-else if (DOUBLE.matches(obj0, obj1)) {
-if (BIGINTEGER.matches(obj0, obj1))
-delegate = BIGDECIMAL;
-else
-delegate = DOUBLE;
-} else if (BIGINTEGER.matches(obj0, obj1))
-delegate = BIGINTEGER;
-else
-delegate = LONG;
-
 Number num0 = delegate.coerce(obj0);
 Number num1 = delegate.coerce(obj1);
 
@@ -294,23 +282,11 @@ public abstract class ELArithmetic {
 }
 
 public static final Number subtract(final Object obj0, final Object obj1) {
-if (obj0 == null && obj1 == null) {
+final ELArithmetic delegate = findDelegate(obj0, obj1);
+if (delegate == null) {
 return Long.valueOf(0);
 }
 
-final ELArithmetic delegate;
-if (BIGDECIMAL.matches(obj0, obj1))
-delegate = BIGDECIMAL;
-else if (DOUBLE.matches(obj0, obj1)) {
-if (BIGINTEGER.matches(obj0, obj1))
-delegate = BIGDECIMAL;
-else
-delegate = DOUBLE;
-} else if (BIGINTEGER.matches(obj0, obj1))
-delegate = BIGINTEGER;
-else
-delegate = LONG;
-
 Number num0 = delegate.coerce(obj0);
 Number num1 = delegate.coerce(obj1);
 
@@ -337,29 +313,37 @@ public abstract class ELArithmetic {
 }
 
 public static final Number multiply(final Object obj0, final Object obj1) {
-if (obj0 == null && obj1 == null) {
+final ELArithmetic delegate = findDelegate(obj0, obj1);
+if (delegate == null) {
 return Long.valueOf(0);
 }
 
-final ELArithmetic delegate;
-if (BIGDECIMAL.matches(obj0, obj1))
-delegate = BIGDECIMAL;
-else if (DOUBLE.matches(obj0, obj1)) {
-if (BIGINTEGER.matches(obj0, obj1))
-delegate = BIGDECIMAL;
-else
-delegate = DOUBLE;
-} else if (BIGINTEGER.matches(obj0, obj1))
-delegate = BIGINTEGER;
-else
-delegate = LONG;
-
 Number num0 = delegate.coerce(obj0);
 Number num1 = delegate.coerce(obj1);
 
 return delegate.multiply(num0, num1);
 }
 
+private static ELArithmetic findDelegate(final Object obj0, final Object 
obj1) {
+if (obj0 == null && obj1 == null) {
+return null;
+}
+
+if (BIGDECIMAL.matches(obj0, obj1)) {
+return BIGDECIMAL;
+} else if (DOUBLE.matches(obj0, obj1)) {
+if (BIGINTEGER.matches(obj0, obj1)) {
+return BIGDECIMAL;
+} else {
+return DOUBLE;
+}
+} else if (BIGINTEGER.matches(obj0, obj1)) {
+return BIGINTEGER;
+} else {
+return LONG;
+}
+}
+
 public static final boolean isNumber(final Object obj) {
 return (obj != null && isNumberType(obj.getClass()));
 }



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



svn commit: r1623458 - in /tomcat/trunk/java/org/apache/coyote/http11: AbstractHttp11Protocol.java Http11AprProtocol.java Http11Nio2Protocol.java Http11NioProtocol.java Http11Protocol.java

2014-09-08 Thread markt
Author: markt
Date: Mon Sep  8 18:47:13 2014
New Revision: 1623458

URL: http://svn.apache.org/r1623458
Log:
Pull up common code to reduce duplication identified by Simian.

Modified:
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
tomcat/trunk/java/org/apache/coyote/http11/Http11Nio2Protocol.java
tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java?rev=1623458&r1=1623457&r2=1623458&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java Mon 
Sep  8 18:47:13 2014
@@ -218,4 +218,23 @@ public abstract class AbstractHttp11Prot
 }
 }
 
+
+// - Common 
code
+
+// Common configuration required for all new HTTP11 processors
+protected void configureProcessor(AbstractHttp11Processor processor) {
+processor.setAdapter(getAdapter());
+processor.setMaxKeepAliveRequests(getMaxKeepAliveRequests());
+processor.setKeepAliveTimeout(getKeepAliveTimeout());
+processor.setConnectionUploadTimeout(getConnectionUploadTimeout());
+processor.setDisableUploadTimeout(getDisableUploadTimeout());
+processor.setCompressionMinSize(getCompressionMinSize());
+processor.setCompression(getCompression());
+processor.setNoCompressionUserAgents(getNoCompressionUserAgents());
+processor.setCompressableMimeTypes(getCompressableMimeTypes());
+processor.setRestrictedUserAgents(getRestrictedUserAgents());
+processor.setSocketBuffer(getSocketBuffer());
+processor.setMaxSavePostSize(getMaxSavePostSize());
+processor.setServer(getServer());
+}
 }

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java?rev=1623458&r1=1623457&r2=1623458&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java Mon Sep  
8 18:47:13 2014
@@ -321,20 +321,8 @@ public class Http11AprProtocol extends A
 proto.getMaxHttpHeaderSize(), (AprEndpoint)proto.endpoint,
 proto.getMaxTrailerSize(), proto.getMaxExtensionSize(),
 proto.getMaxSwallowSize());
-processor.setAdapter(proto.getAdapter());
-processor.setMaxKeepAliveRequests(proto.getMaxKeepAliveRequests());
-processor.setKeepAliveTimeout(proto.getKeepAliveTimeout());
-processor.setConnectionUploadTimeout(
-proto.getConnectionUploadTimeout());
-processor.setDisableUploadTimeout(proto.getDisableUploadTimeout());
-processor.setCompressionMinSize(proto.getCompressionMinSize());
-processor.setCompression(proto.getCompression());
-
processor.setNoCompressionUserAgents(proto.getNoCompressionUserAgents());
-
processor.setCompressableMimeTypes(proto.getCompressableMimeTypes());
-processor.setRestrictedUserAgents(proto.getRestrictedUserAgents());
-processor.setSocketBuffer(proto.getSocketBuffer());
-processor.setMaxSavePostSize(proto.getMaxSavePostSize());
-processor.setServer(proto.getServer());
+proto.configureProcessor(processor);
+// APR specific configuration
 processor.setClientCertProvider(proto.getClientCertProvider());
 register(processor);
 return processor;

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Nio2Protocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11Nio2Protocol.java?rev=1623458&r1=1623457&r2=1623458&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11Nio2Protocol.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11Nio2Protocol.java Mon Sep  
8 18:47:13 2014
@@ -250,20 +250,7 @@ public class Http11Nio2Protocol extends 
 proto.getMaxHttpHeaderSize(), (Nio2Endpoint) 
proto.endpoint,
 proto.getMaxTrailerSize(), proto.getMaxExtensionSize(),
 proto.getMaxSwallowSize());
-processor.setAdapter(proto.getAdapter());
-processor.setMaxKeepAliveRequ

svn commit: r1623471 - in /tomcat/trunk: java/org/apache/catalina/startup/Catalina.java webapps/docs/changelog.xml

2014-09-08 Thread markt
Author: markt
Date: Mon Sep  8 19:15:27 2014
New Revision: 1623471

URL: http://svn.apache.org/r1623471
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56401
Log server information when Tomcat starts.

Modified:
tomcat/trunk/java/org/apache/catalina/startup/Catalina.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/startup/Catalina.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Catalina.java?rev=1623471&r1=1623470&r2=1623471&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/Catalina.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/Catalina.java Mon Sep  8 
19:15:27 2014
@@ -35,6 +35,7 @@ import org.apache.catalina.LifecycleExce
 import org.apache.catalina.LifecycleState;
 import org.apache.catalina.Server;
 import org.apache.catalina.security.SecurityConfig;
+import org.apache.catalina.util.ServerInfo;
 import org.apache.juli.ClassLoaderLogManager;
 import org.apache.tomcat.util.ExceptionUtils;
 import org.apache.tomcat.util.digester.Digester;
@@ -123,6 +124,7 @@ public class Catalina {
 
 public Catalina() {
 setSecurityProtection();
+logInfo();
 }
 
 
@@ -784,6 +786,18 @@ public class Catalina {
 }
 
 
+private void logInfo() {
+log.info("Server version: " + ServerInfo.getServerInfo());
+log.info("Server built:   " + ServerInfo.getServerBuilt());
+log.info("Server number:  " + ServerInfo.getServerNumber());
+log.info("OS Name:" + System.getProperty("os.name"));
+log.info("OS Version: " + System.getProperty("os.version"));
+log.info("Architecture:   " + System.getProperty("os.arch"));
+log.info("JVM Version:" + 
System.getProperty("java.runtime.version"));
+log.info("JVM Vendor: " + System.getProperty("java.vm.vendor"));
+}
+
+
 // --- CatalinaShutdownHook Inner Class
 
 // XXX Should be moved to embedded !

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1623471&r1=1623470&r2=1623471&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Sep  8 19:15:27 2014
@@ -64,6 +64,9 @@
 correctly handle these cookies. (markt)
   
   
+56401: Log version information when Tomcat starts. (markt)
+  
+  
 56530: Add a web application class loader implementation 
that
 supports the parallel loading of web application classes. (markt)
   



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



[Bug 56401] Log version information on startup

2014-09-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56401

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #1 from Mark Thomas  ---
Fixed in 8.0.x and will be included in 8.0.13 onwards.

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

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



buildbot success in ASF Buildbot on tomcat-trunk

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

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

Buildslave for this Build: bb-vm_ubuntu

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

Build succeeded!

sincerely,
 -The Buildbot




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



Maven deploy plugin ignoring nonProxyHosts

2014-09-08 Thread John.E.Gregg
All,

The latest Tomcat Maven plugin seems to ignore the Maven value for 
nonProxyHosts.  I can only deploy to localhost if Maven's proxy has active = 
false.  I traced the problem to TomcatManager.applyProxy().  It simply ignores 
the nonProxyHosts value.  Fixing it is pretty simple.  Since the Tomcat plugin 
already depends on Wagon, I updated applyProxy() to call Wagon's 
ProxyUtils.validateNonProxyHosts().  I believe that is the method that Maven 
itself uses.

A recent Jira in this area is 
https://issues.apache.org/jira/browse/MTOMCAT-177, though it's closes.

John




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