Re: [VOTE-RESTARTED] Release Apache Tomcat Native 1.2.4
On 01/06/2016 01:56 PM, Mark Thomas wrote: > On 05/01/2016 15:46, Mark Thomas wrote: >> Version 1.2.4 includes the following change: >> >> - Renegotiation improvements >> >> The proposed release artefacts can be found at [1], >> and the build was done using tag [2]. >> >> The Apache Tomcat Native 1.2.4 is >> [X] Stable, go ahead and release I use the tag to build my own bundles and tested windows and macosx. Cheers Jan-Frederic - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE-RESTARTED] Release Apache Tomcat Native 1.2.4
On 01/06/2016 08:45 PM, Mark Thomas wrote: > On 06/01/2016 19:34, Rainer Jung wrote: >> Hi Mark, >> >> there's no file bin/openssl.exe in the Windows binariy zip files. >> >> It existed in 1.2.3 but was also missing for 1.2.2. It also exists in >> 1.2.0 and 1.2.1 as well as 1.1.33 and 1.1.34. So I guess it should be >> included for 1.2.4 as well? > > I think that is an artefact of how I built the release. I should update > the scripts to take a copy of the openssl.exe. > > I'm not particularly concerned. I could copy it across from 1.2.3 if > people think it is essential. It is probably better to have it as building on windows is a challenge for a lot of people. Cheers Jean-Frederic - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE-RESTARTED] Release Apache Tomcat Native 1.2.4
On 08/01/2016 09:13, jean-frederic clere wrote: > On 01/06/2016 08:45 PM, Mark Thomas wrote: >> On 06/01/2016 19:34, Rainer Jung wrote: >>> Hi Mark, >>> >>> there's no file bin/openssl.exe in the Windows binariy zip files. >>> >>> It existed in 1.2.3 but was also missing for 1.2.2. It also exists in >>> 1.2.0 and 1.2.1 as well as 1.1.33 and 1.1.34. So I guess it should be >>> included for 1.2.4 as well? >> >> I think that is an artefact of how I built the release. I should update >> the scripts to take a copy of the openssl.exe. >> >> I'm not particularly concerned. I could copy it across from 1.2.3 if >> people think it is essential. > > It is probably better to have it as building on windows is a challenge > for a lot of people. OK. I'll copy it across and re-package the binaries before I do the release. We have already voted to release that binary so no need to restart the vote again (assuming folks trust that is all I am going to do). Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE-RESTARTED] Release Apache Tomcat Native 1.2.4
On 06/01/2016 12:56, Mark Thomas wrote: > On 05/01/2016 15:46, Mark Thomas wrote: >> Version 1.2.4 includes the following change: >> >> - Renegotiation improvements >> >> The proposed release artefacts can be found at [1], >> and the build was done using tag [2]. >> >> The Apache Tomcat Native 1.2.4 is >> [X] Stable, go ahead and release >> [ ] Broken because of ... Unit tests pass on 64-bit Windows with APR/native and trunk. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1723681 - in /tomcat/trunk/java/org/apache/catalina: core/ deploy/
Author: remm Date: Fri Jan 8 10:50:42 2016 New Revision: 1723681 URL: http://svn.apache.org/viewvc?rev=1723681&view=rev Log: Javadoc fixes. Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java tomcat/trunk/java/org/apache/catalina/core/ApplicationSessionCookieConfig.java tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java tomcat/trunk/java/org/apache/catalina/core/StandardContext.java tomcat/trunk/java/org/apache/catalina/core/StandardHost.java tomcat/trunk/java/org/apache/catalina/core/StandardServer.java tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java tomcat/trunk/java/org/apache/catalina/core/StandardWrapperFacade.java tomcat/trunk/java/org/apache/catalina/deploy/NamingResourcesImpl.java Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java?rev=1723681&r1=1723680&r2=1723681&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java Fri Jan 8 10:50:42 2016 @@ -1259,7 +1259,7 @@ public class ApplicationContext /** - * Return the facade associated with this ApplicationContext. + * @return the facade associated with this ApplicationContext. */ protected ServletContext getFacade() { Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationSessionCookieConfig.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationSessionCookieConfig.java?rev=1723681&r1=1723680&r2=1723681&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/ApplicationSessionCookieConfig.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/ApplicationSessionCookieConfig.java Fri Jan 8 10:50:42 2016 @@ -158,6 +158,7 @@ public class ApplicationSessionCookieCon * @param sessionId The ID of the session for which the cookie will be *created * @param secure Should session cookie be configured as secure + * @return the cookie for the session */ public static Cookie createSessionCookie(Context context, String sessionId, boolean secure) { Modified: tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java?rev=1723681&r1=1723680&r2=1723681&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java Fri Jan 8 10:50:42 2016 @@ -487,6 +487,8 @@ public abstract class ContainerBase exte /** * Return if children of this container will be started automatically when * they are added to this container. + * + * @return true if the children will be started */ public boolean getStartChildren() { @@ -1185,7 +1187,7 @@ public abstract class ContainerBase exte /** - * Return the abbreviated name of this container for logging messages + * @return the abbreviated name of this container for logging messages */ protected String logName() { Modified: tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java?rev=1723681&r1=1723680&r2=1723681&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java Fri Jan 8 10:50:42 2016 @@ -468,6 +468,8 @@ public class DefaultInstanceManager impl /** * Makes cache size available to unit tests. + * + * @return the cache size */ protected int getAnnotationCacheSize() { synchronized (annotationCache) { Modified: tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java?rev=1723681&r1=1723680&r2=1723681&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java Fri Jan 8 10:50:42 2016 @@ -158,7 +158,7 @@ public class NamingContextListener // -
svn commit: r1723683 - /tomcat/trunk/java/org/apache/catalina/Manager.java
Author: markt Date: Fri Jan 8 10:54:17 2016 New Revision: 1723683 URL: http://svn.apache.org/viewvc?rev=1723683&view=rev Log: Correct Javadoc Modified: tomcat/trunk/java/org/apache/catalina/Manager.java Modified: tomcat/trunk/java/org/apache/catalina/Manager.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Manager.java?rev=1723683&r1=1723682&r2=1723683&view=diff == --- tomcat/trunk/java/org/apache/catalina/Manager.java (original) +++ tomcat/trunk/java/org/apache/catalina/Manager.java Fri Jan 8 10:54:17 2016 @@ -21,7 +21,7 @@ import java.io.IOException; /** * A Manager manages the pool of Sessions that are associated with a - * particular Container. Different Manager implementations may support + * particular Context. Different Manager implementations may support * value-added features such as the persistent storage of session data, * as well as migrating sessions for distributable web applications. * - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1723684 - /tomcat/trunk/test/org/apache/catalina/session/Benchmarks.java
Author: markt Date: Fri Jan 8 10:54:57 2016 New Revision: 1723684 URL: http://svn.apache.org/viewvc?rev=1723684&view=rev Log: Add some scaffolding so the test doesn't need to catch an Exception to work correctly. Modified: tomcat/trunk/test/org/apache/catalina/session/Benchmarks.java Modified: tomcat/trunk/test/org/apache/catalina/session/Benchmarks.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/session/Benchmarks.java?rev=1723684&r1=1723683&r2=1723684&view=diff == --- tomcat/trunk/test/org/apache/catalina/session/Benchmarks.java (original) +++ tomcat/trunk/test/org/apache/catalina/session/Benchmarks.java Fri Jan 8 10:54:57 2016 @@ -26,9 +26,12 @@ import static org.junit.Assert.fail; import org.junit.Test; +import org.apache.catalina.Context; +import org.apache.catalina.Host; import org.apache.catalina.LifecycleException; import org.apache.catalina.Session; import org.apache.catalina.core.StandardContext; +import org.apache.catalina.core.StandardHost; /** * Named Benchmarks so it is not automatically executed as part of the unit @@ -152,8 +155,8 @@ public class Benchmarks { * 16 threads - ~45,600ms */ @Test -public void testManagerBaseCreateSession() { -doTestManagerBaseCreateSession(1, 100); +public void testManagerBaseCreateSession() throws LifecycleException { +doTestManagerBaseCreateSession(1, 10); doTestManagerBaseCreateSession(2, 100); doTestManagerBaseCreateSession(4, 100); doTestManagerBaseCreateSession(16, 100); @@ -164,16 +167,18 @@ public class Benchmarks { private void doTestManagerBaseCreateSession(int threadCount, -int iterCount) { +int iterCount) throws LifecycleException { // Create a default session manager StandardManager mgr = new StandardManager(); -try { -mgr.startInternal(); -} catch (LifecycleException e) { -// Ignore - this is expected -} -mgr.setContext(new StandardContext()); +mgr.setPathname(null); +Host host = new StandardHost(); +host.setName("unittest"); +Context context = new StandardContext(); +context.setPath(""); +context.setParent(host); +mgr.setContext(context); +mgr.start(); mgr.generateSessionId(); while (mgr.sessionCreationTiming.size() < ManagerBase.TIMING_STATS_CACHE_SIZE) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1723707 - /tomcat/trunk/java/org/apache/catalina/session/StandardManager.java
Author: markt Date: Fri Jan 8 11:57:05 2016 New Revision: 1723707 URL: http://svn.apache.org/viewvc?rev=1723707&view=rev Log: Remove unnecessary commented out code Modified: tomcat/trunk/java/org/apache/catalina/session/StandardManager.java Modified: tomcat/trunk/java/org/apache/catalina/session/StandardManager.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/StandardManager.java?rev=1723707&r1=1723706&r2=1723707&view=diff == --- tomcat/trunk/java/org/apache/catalina/session/StandardManager.java (original) +++ tomcat/trunk/java/org/apache/catalina/session/StandardManager.java Fri Jan 8 11:57:05 2016 @@ -534,8 +534,6 @@ public class StandardManager extends Man file = new File(tempdir, pathname); } } -//if (!file.isAbsolute()) -//return (null); return file; } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1723708 - /tomcat/trunk/java/org/apache/catalina/deploy/NamingResourcesImpl.java
Author: markt Date: Fri Jan 8 12:04:17 2016 New Revision: 1723708 URL: http://svn.apache.org/viewvc?rev=1723708&view=rev Log: Whitespace police Modified: tomcat/trunk/java/org/apache/catalina/deploy/NamingResourcesImpl.java Modified: tomcat/trunk/java/org/apache/catalina/deploy/NamingResourcesImpl.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/deploy/NamingResourcesImpl.java?rev=1723708&r1=1723707&r2=1723708&view=diff == --- tomcat/trunk/java/org/apache/catalina/deploy/NamingResourcesImpl.java (original) +++ tomcat/trunk/java/org/apache/catalina/deploy/NamingResourcesImpl.java Fri Jan 8 12:04:17 2016 @@ -182,7 +182,7 @@ public class NamingResourcesImpl extends /** * Set the container with which the naming resources are associated. - * @param container the associated with the resources + * @param container the associated with the resources */ public void setContainer(Object container) { this.container = container; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1723709 - in /tomcat/trunk/java/org/apache/catalina/core: NamingContextListener.java StandardContext.java StandardServer.java
Author: markt Date: Fri Jan 8 12:09:48 2016 New Revision: 1723709 URL: http://svn.apache.org/viewvc?rev=1723709&view=rev Log: Fix an IDE warning and mop up the last few Javadoc issues in this package Modified: tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java tomcat/trunk/java/org/apache/catalina/core/StandardContext.java tomcat/trunk/java/org/apache/catalina/core/StandardServer.java Modified: tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java?rev=1723709&r1=1723708&r2=1723709&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java Fri Jan 8 12:09:48 2016 @@ -912,10 +912,9 @@ public class NamingContextListener /** * Set the specified local EJBs in the naming context. * - * @param localEjb the EJB descriptor + * @param localEjb the EJB descriptor (unused) */ -public void addLocalEjb( -@SuppressWarnings("unused") ContextLocalEjb localEjb) { +public void addLocalEjb(ContextLocalEjb localEjb) { // NO-OP } 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=1723709&r1=1723708&r2=1723709&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Fri Jan 8 12:09:48 2016 @@ -4491,7 +4491,7 @@ public class StandardContext extends Con private int insertPoint = 0; /** - * Return the set of filter mappings. + * @return The set of filter mappings */ public FilterMap[] asArray() { synchronized (lock) { Modified: tomcat/trunk/java/org/apache/catalina/core/StandardServer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardServer.java?rev=1723709&r1=1723708&r2=1723709&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/StandardServer.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/StandardServer.java Fri Jan 8 12:09:48 2016 @@ -31,6 +31,8 @@ import java.net.URLClassLoader; import java.security.AccessControlException; import java.util.Random; +import javax.management.InstanceNotFoundException; +import javax.management.MBeanException; import javax.management.ObjectName; import org.apache.catalina.Context; @@ -680,15 +682,15 @@ public final class StandardServer extend * Write the configuration information for this entire Server * out to the server.xml configuration file. * - * @exception javax.management.InstanceNotFoundException - * if the managed resource object cannot be found - * @exception javax.management.MBeanException - * if the initializer of the object throws an exception, or - * persistence is not supported - * @exception javax.management.RuntimeOperationsException - * if an exception is reported by the persistence mechanism + * @exception InstanceNotFoundException + *if the managed resource object cannot be found + * @exception MBeanException + *if the initializer of the object throws an exception, or + *persistence is not supported + * @exception javax.management.RuntimeOperationsException + *if an exception is reported by the persistence mechanism */ -public synchronized void storeConfig() throws Exception { +public synchronized void storeConfig() throws InstanceNotFoundException, MBeanException { try { // Note: Hard-coded domain used since this object is per Server/JVM ObjectName sname = new ObjectName("Catalina:type=StoreConfig"); @@ -709,14 +711,15 @@ public final class StandardServer extend * out to the specified configuration file. * * @param context the context which should save its configuration - * @exception javax.management.InstanceNotFoundException if the managed resource object - * cannot be found - * @exception javax.management.MBeanException if the initializer of the object throws - * an exception, or persistence is not supported - * @exception javax.management.RuntimeOperationsException if an exception is reported - * by the persistence mechanism + * @exception InstanceNotFoundException + *if the managed resource object cannot be found + * @exception MBeanException + *
buildbot failure in ASF Buildbot on tomcat-trunk
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/885 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: silvanus_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' triggered this build Build Source Stamp: [branch tomcat/trunk] 1723707 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
buildbot success in ASF Buildbot on tomcat-trunk
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/886 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: silvanus_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' triggered this build Build Source Stamp: [branch tomcat/trunk] 1723708 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
[PROPOSAL] Manager behaviour clarification for 9.0.x
I've been looking at the relationship between a Context and its Manager and I have identified some inconsistencies in the underlying assumptions on which the code is based. A. Context is always set In some places the code carefully checks to see if the Context is null. In other places (often in the same method and before the null check) the code assumes that the Context is non-null. B. Context never changes ManagerBase.setContext() is written on the basis that the Context may change at any point. However, pretty much everywhere else assumes that the Context doesn't change (at least while the Manager is in use). Related to B, there are various places where threading issues exist if the Context were to change while the Manager was in use and a few places (e.g. the distributable flag) that aren't updated that should be. Given these issues I see two options. 1. Require that the Context is set before the Manager is first used and disallow any changes once the Manager has been used. 2. Correctly handle the possibility that the Context may change either a) at any time or b) if the Context is stopped (i.e. the Manager is not being used). Option 1 is fairly simple to implement as large parts of the code essentially assume this already and all the current Tomcat code already conforms to this requirement. This option would require documenting the requirement, adding a few lines of code to enforce it and then removing various null checks that would no longer be necessary. Option 2 would require a lot more work, particularly 2a. 2a would create a lot of strange edge cases (e.g. Context changes mid-way through sessions being persisted to the store - where do those sessions get written?) which would require careful definition and implementation. 2b would be manageable but we'd need to carefully define "the Manager not being used" and which methods could only be called in that state. My preference is for 1. It is less work, Tomcat currently never changes the Context and I can't see a viable use case for wanting to do so. Assuming there are no objections, I'll add this to my TODO list. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
tagging tomcat 6.0.45
Hi, I am planning to test and tag tomcat 6.0.45 during the week-end. Any objections? Cheers Jean-Frederic - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 58827] New: Review/remove references to JSR77 StateManageable
https://bz.apache.org/bugzilla/show_bug.cgi?id=58827 Bug ID: 58827 Summary: Review/remove references to JSR77 StateManageable Product: Tomcat 9 Version: unspecified Hardware: PC Status: NEW Severity: minor Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: knst.koli...@gmail.com Inspired by a recent javadoc fix commit r1723681. /** - * Support for "stateManageable" JSR77 + * @return support for "stateManageable" JSR77 */ public boolean isStateManageable() { return true; /** - * JSR 77. Always return false. + * @return JSR 77. Always return false. */ public boolean isStateManageable() { return false; } The above methods are implemented by StandardContext and StandardWrapper respectively. JSR77: https://jcp.org/en/jsr/detail?id=77 I have not read JSR77 in detail, just a quick review. reviewed ch.77.5 State Management A StateManageable object is defined as implementing the following properties: state: int startTime: long methods: start() startRecursive() stop() and sending events when a state changes. The state is defined as 5 states coded by integer values, 0 STARTING 1 RUNNING 2 STOPPING 3 STOPPED 4 FAILED Actual implementation in Tomcat: StandardWrapper: - Tomcat 6 public boolean isEventProvider() { return false; } public boolean isStateManageable() { return false; } public boolean isStatisticsProvider() { return false; } The "eventProvider", "stateManageable", "statisticsProvider" properties exposed to JMX. The methods start(), stop() are implemented, but are our internal methods -- they are not exposed to JMX. There is no implementation of getState(), getStartTime(), startRecursive(). StandardWrapper - Tomcat 7 === The "eventProvider", "stateManageable", "statisticsProvider" properties exposed to JMX. Methods isEventProvider(), isStatisticsProvider() are declared as deprecated. StandardWrapper - Tomcat 8, 9 === "stateManageable" is exposed to JMX. Methods isEventProvider(), isStatisticsProvider() and their JMX properties removed. StandardContext - Tomcat 6 StandardContext implements all the above properties / methods, although "startRecursive" is not exposed to JMX. [[[ public int getState() { if( started ) { return 1; // RUNNING } if( initialized ) { return 0; // starting ? } if( ! available ) { return 4; //FAILED } // 2 - STOPPING return 3; // STOPPED } ]]] StandardContext - Tomcat 7 Lifecycle was redefined, the getState() method is defined in Lifecycle interface and now returns a LifecycleState The "state" property is no longer exposed to JMX. startRecursive(), isEventProvider(), isStatisticsProvider() methods deprecated. StandardContext - Tomcat 7/9 isStateManageable()/start()/stop()/getStartTime() are OK. Deprecated methods are removed. -- 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: r1723736 - in /tomcat/trunk/java/org/apache/catalina/session: FileStore.java JDBCStore.java
Author: markt Date: Fri Jan 8 15:15:13 2016 New Revision: 1723736 URL: http://svn.apache.org/viewvc?rev=1723736&view=rev Log: Store.load() implementations assume (in places) that getManager().getContext() always returns a non-null and we haven't had reports of NPEs so make the assumption consistently throughout the method. Add a local reference to the Context's logger to shorten some of the logging lines Modified: tomcat/trunk/java/org/apache/catalina/session/FileStore.java tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java Modified: tomcat/trunk/java/org/apache/catalina/session/FileStore.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/FileStore.java?rev=1723736&r1=1723735&r2=1723736&view=diff == --- tomcat/trunk/java/org/apache/catalina/session/FileStore.java (original) +++ tomcat/trunk/java/org/apache/catalina/session/FileStore.java Fri Jan 8 15:15:13 2016 @@ -33,6 +33,7 @@ import org.apache.catalina.Context; import org.apache.catalina.Loader; import org.apache.catalina.Session; import org.apache.catalina.util.CustomObjectInputStream; +import org.apache.juli.logging.Log; /** * Concrete implementation of the Store interface that utilizes @@ -217,9 +218,12 @@ public final class FileStore extends Sto if (!file.exists()) { return null; } -if (manager.getContext().getLogger().isDebugEnabled()) { - manager.getContext().getLogger().debug(sm.getString(getStoreName()+".loading", - id, file.getAbsolutePath())); + +Context context = getManager().getContext(); +Log contextLog = context.getLogger(); + +if (contextLog.isDebugEnabled()) { +contextLog.debug(sm.getString(getStoreName()+".loading", id, file.getAbsolutePath())); } ObjectInputStream ois = null; @@ -228,10 +232,7 @@ public final class FileStore extends Sto ClassLoader oldThreadContextCL = Thread.currentThread().getContextClassLoader(); try (FileInputStream fis = new FileInputStream(file.getAbsolutePath()); BufferedInputStream bis = new BufferedInputStream(fis)) { -Context context = manager.getContext(); -if (context != null) { -loader = context.getLoader(); -} +loader = context.getLoader(); if (loader != null) { classLoader = loader.getClassLoader(); } @@ -247,8 +248,8 @@ public final class FileStore extends Sto session.setManager(manager); return session; } catch (FileNotFoundException e) { -if (manager.getContext().getLogger().isDebugEnabled()) { -manager.getContext().getLogger().debug("No persisted data file found"); +if (contextLog.isDebugEnabled()) { +contextLog.debug("No persisted data file found"); } return null; } finally { Modified: tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java?rev=1723736&r1=1723735&r2=1723736&view=diff == --- tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java (original) +++ tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java Fri Jan 8 15:15:13 2016 @@ -43,6 +43,7 @@ import org.apache.catalina.LifecycleExce import org.apache.catalina.Loader; import org.apache.catalina.Session; import org.apache.catalina.util.CustomObjectInputStream; +import org.apache.juli.logging.Log; import org.apache.tomcat.util.ExceptionUtils; /** @@ -595,7 +596,8 @@ public class JDBCStore extends StoreBase ClassLoader classLoader = null; ObjectInputStream ois = null; BufferedInputStream bis = null; -org.apache.catalina.Context context = manager.getContext(); +org.apache.catalina.Context context = getManager().getContext(); +Log contextLog = context.getLogger(); synchronized (this) { int numberOfTries = 2; @@ -620,10 +622,7 @@ public class JDBCStore extends StoreBase try (ResultSet rst = preparedLoadSql.executeQuery()) { if (rst.next()) { bis = new BufferedInputStream(rst.getBinaryStream(2)); - -if (context != null) { -loader = context.getLoader(); -} +loader = context.getLoader(); if (loader != null) { classLoader = loader.getClassLoader(); } @@ -634,22 +633,22 @@ public class JDBCStore extends StoreBase }
[Bug 58827] Review/remove references to JSR77 StateManageable
https://bz.apache.org/bugzilla/show_bug.cgi?id=58827 Konstantin Kolinko changed: What|Removed |Added OS||All --- Comment #1 from Konstantin Kolinko --- Thoughts = 1. It may still be possible to support that StateManageable "interface" -- I think with a custom MBean modeler object that will provide that "state" property, -- but I do not see much point. Nobody complained since removal of "state" property in Tomcat 7. 2. isStateManageable() can be safely removed from StandardWrapper. The wrapper did not expose its start/stop methods via JMX, nor the "state" property. 3. isStateManageable() in StandardContext I think it is OK to keep it, but update a comment to say that we do not really implement JSR 77. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [PROPOSAL] Manager behaviour clarification for 9.0.x
2016-01-08 13:33 GMT+01:00 Mark Thomas : > My preference is for 1. It is less work, Tomcat currently never changes > the Context and I can't see a viable use case for wanting to do so. > No problem, that's the best solution. Rémy
svn commit: r1723752 - in /tomcat/trunk/java/org/apache: catalina/filters/ catalina/ha/ catalina/ha/backend/ catalina/ha/deploy/ catalina/ha/session/ catalina/ha/tcp/ catalina/session/ catalina/tribes
Author: remm Date: Fri Jan 8 16:12:22 2016 New Revision: 1723752 URL: http://svn.apache.org/viewvc?rev=1723752&view=rev Log: Javadoc fixes. Modified: tomcat/trunk/java/org/apache/catalina/filters/CorsFilter.java tomcat/trunk/java/org/apache/catalina/filters/CsrfPreventionFilterBase.java tomcat/trunk/java/org/apache/catalina/filters/ExpiresFilter.java tomcat/trunk/java/org/apache/catalina/filters/RemoteIpFilter.java tomcat/trunk/java/org/apache/catalina/filters/RequestFilter.java tomcat/trunk/java/org/apache/catalina/filters/SetCharacterEncodingFilter.java tomcat/trunk/java/org/apache/catalina/ha/CatalinaCluster.java tomcat/trunk/java/org/apache/catalina/ha/ClusterDeployer.java tomcat/trunk/java/org/apache/catalina/ha/ClusterManager.java tomcat/trunk/java/org/apache/catalina/ha/backend/Sender.java tomcat/trunk/java/org/apache/catalina/ha/backend/TcpSender.java tomcat/trunk/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java tomcat/trunk/java/org/apache/catalina/ha/deploy/FileMessageFactory.java tomcat/trunk/java/org/apache/catalina/ha/deploy/WarWatcher.java tomcat/trunk/java/org/apache/catalina/ha/session/ClusterManagerBase.java tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java tomcat/trunk/java/org/apache/catalina/ha/session/DeltaRequest.java tomcat/trunk/java/org/apache/catalina/ha/session/DeltaSession.java tomcat/trunk/java/org/apache/catalina/ha/tcp/ReplicationValve.java tomcat/trunk/java/org/apache/catalina/ha/tcp/SendMessageData.java tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java tomcat/trunk/java/org/apache/catalina/session/StandardSession.java tomcat/trunk/java/org/apache/catalina/tribes/tipis/ReplicatedMapEntry.java tomcat/trunk/java/org/apache/tomcat/util/digester/RuleSet.java Modified: tomcat/trunk/java/org/apache/catalina/filters/CorsFilter.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/filters/CorsFilter.java?rev=1723752&r1=1723751&r2=1723752&view=diff == --- tomcat/trunk/java/org/apache/catalina/filters/CorsFilter.java (original) +++ tomcat/trunk/java/org/apache/catalina/filters/CorsFilter.java Fri Jan 8 16:12:22 2016 @@ -202,14 +202,11 @@ public final class CorsFilter extends Ge /** * Handles a CORS request of type {@link CORSRequestType}.SIMPLE. * - * @param request - *The {@link HttpServletRequest} object. - * @param response - *The {@link HttpServletResponse} object. - * @param filterChain - *The {@link FilterChain} object. - * @throws IOException - * @throws ServletException + * @param request The {@link HttpServletRequest} object. + * @param response The {@link HttpServletResponse} object. + * @param filterChain The {@link FilterChain} object. + * @throws IOException an IO error occurred + * @throws ServletException Servlet error propagation * @see http://www.w3.org/TR/cors/#resource-requests";>Simple * Cross-Origin Request, Actual Request, and Redirects */ @@ -288,14 +285,11 @@ public final class CorsFilter extends Ge /** * Handles CORS pre-flight request. * - * @param request - *The {@link HttpServletRequest} object. - * @param response - *The {@link HttpServletResponse} object. - * @param filterChain - *The {@link FilterChain} object. - * @throws IOException - * @throws ServletException + * @param request The {@link HttpServletRequest} object. + * @param response The {@link HttpServletResponse} object. + * @param filterChain The {@link FilterChain} object. + * @throws IOException an IO error occurred + * @throws ServletException Servlet error propagation */ protected void handlePreflightCORS(final HttpServletRequest request, final HttpServletResponse response, final FilterChain filterChain) @@ -403,14 +397,11 @@ public final class CorsFilter extends Ge * it is not a cross-origin request. This implementation, just forwards the * request down the filter chain. * - * @param request - *The {@link HttpServletRequest} object. - * @param response - *The {@link HttpServletResponse} object. - * @param filterChain - *The {@link FilterChain} object. - * @throws IOException - * @throws ServletException + * @param request The {@link HttpServletRequest} object. + * @param response The {@link HttpServletResponse} object. + * @param filterChain The {@link FilterChain} object. + * @throws IOException an IO error occurred + * @throws ServletException Servlet error propagation */ private void handleNonCORS(final HttpServletR
Re: [PROPOSAL] Manager behaviour clarification for 9.0.x
Mark, On 1/8/16 7:33 AM, Mark Thomas wrote: > I've been looking at the relationship between a Context and its Manager > and I have identified some inconsistencies in the underlying assumptions > on which the code is based. > > A. Context is always set > In some places the code carefully checks to see if the Context is null. > In other places (often in the same method and before the null check) the > code assumes that the Context is non-null. > > B. Context never changes > ManagerBase.setContext() is written on the basis that the Context may > change at any point. However, pretty much everywhere else assumes that > the Context doesn't change (at least while the Manager is in use). > > Related to B, there are various places where threading issues exist if > the Context were to change while the Manager was in use and a few places > (e.g. the distributable flag) that aren't updated that should be. > > Given these issues I see two options. > > 1. Require that the Context is set before the Manager is first used and > disallow any changes once the Manager has been used. > > 2. Correctly handle the possibility that the Context may change either > a) at any time or b) if the Context is stopped (i.e. the Manager is not > being used). > > > Option 1 is fairly simple to implement as large parts of the code > essentially assume this already and all the current Tomcat code already > conforms to this requirement. This option would require documenting the > requirement, adding a few lines of code to enforce it and then removing > various null checks that would no longer be necessary. > > Option 2 would require a lot more work, particularly 2a. 2a would create > a lot of strange edge cases (e.g. Context changes mid-way through > sessions being persisted to the store - where do those sessions get > written?) which would require careful definition and implementation. 2b > would be manageable but we'd need to carefully define "the Manager not > being used" and which methods could only be called in that state. > > My preference is for 1. It is less work, Tomcat currently never changes > the Context and I can't see a viable use case for wanting to do so. > > Assuming there are no objections, I'll add this to my TODO list. +1 for the easy option. If someone wants to play games with context-switching, they ought to be able to use the parallel-deployment features to achieve the same goal without all the danger involved in lobotomizing a running context. -chris - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [PROPOSAL] Manager behaviour clarification for 9.0.x
2016-01-08 15:33 GMT+03:00 Mark Thomas : > I've been looking at the relationship between a Context and its Manager > and I have identified some inconsistencies in the underlying assumptions > on which the code is based. > > A. Context is always set > In some places the code carefully checks to see if the Context is null. > In other places (often in the same method and before the null check) the > code assumes that the Context is non-null. Specific examples = ? I see only a few checks ManagerBase.toString() - OK. FileStore.directory() - This may be targeted at testing environments. Who knows how one may try using that component? > B. Context never changes > ManagerBase.setContext() is written on the basis that the Context may > change at any point. However, pretty much everywhere else assumes that > the Context doesn't change (at least while the Manager is in use). > > Related to B, there are various places where threading issues exist if > the Context were to change while the Manager was in use and a few places > (e.g. the distributable flag) that aren't updated that should be. Good catch about "distributable", but I think it is just a bug. Compare it with the following other property: ManagerBase.setContext() gets the current value of sessionTimeout and registers itself as PropertyChangeListener. ManagerBase.propertyChange() handles update of "sessionTimeout". The "sessionTimeout" property of StandardContext can be changed via JMX. Technically, the "distributable" property is exposed to JMX as well and is changeable, though I do not see much use in changing it. I think it is better to notify "distributable" field change via PropertyListener. Currently StandardContext.setDistributable() has a workaround: [[[ @Override public void setDistributable(boolean distributable) { boolean oldDistributable = this.distributable; this.distributable = distributable; support.firePropertyChange("distributable", oldDistributable, this.distributable); // Bugzilla 32866 if(getManager() != null) { if(log.isDebugEnabled()) { log.debug("Propagating distributable=" + distributable + " to manager"); } getManager().setDistributable(distributable); } } ]]] > Given these issues I see two options. > > 1. Require that the Context is set before the Manager is first used and > disallow any changes once the Manager has been used. > Make it dependent on Lifecycle.getState(), or you are just saying about (oldValue != null) check? > 2. Correctly handle the possibility that the Context may change either > a) at any time or b) if the Context is stopped (i.e. the Manager is not > being used). First review == I think it should be possible to replace Manager in a Context before that Context starts. The default implementation can be wrong and one should be able to replace it. That is usually performed by a LifecycleListener. If so, Context shall call setContext(null) on the old manager instance so that the old Manager unregisters itself as PropertyChangeListener on the context. Actually currently there is no such setContext(null) call, which is a bug. So I think it is 2.b) - allow change when it is stopped. The Manager is a Lifecycle, so you can say "if Manager is stopped". Replacing a component after startup may be useful, but I think for a manager this feature is not needed. A Manager is a heavy component (StandardManager loads serialized sessions at startup), so I think it does not need this feature. As such, Context.setManager() can be simplified. (If some 3rd party one really needs to replace manager on a running context, the caller of Context.setManager() can call the lifecycle methods on manager by itself and deal with consequences) (It is odd that current Context.setManager() calls oldManager.stop() newManager.start(), as there is a time interval when there is no usable manager. It would be better to call newManager.start() oldManager.stop(), or call setPaused(true) to stop serving requests.) Second review === >From point of view of LifecycleListener that customizes a Manager StandardContext.startInternal() does // Notify our interested LifecycleListeners fireLifecycleEvent(Lifecycle.CONFIGURE_START_EVENT, null); before calling getManager() and configuring the default manager, so it theory it should be possible to configure a Manager at that time. The next lifecycle event at end of startInternal() is the following: setState(LifecycleState.STARTING); is too late to replace a manager, as the "state" field is changed before notifying lifecycle listeners, and the Context becomes available to serve requests. As such, changing a manager on "START_EVENT" requires support of "2.a) - allow change at any time". I am OK with not allowing manager
Re: [PROPOSAL] Manager behaviour clarification for 9.0.x
On 08/01/2016 16:56, Konstantin Kolinko wrote: > 2016-01-08 15:33 GMT+03:00 Mark Thomas : >> I've been looking at the relationship between a Context and its Manager >> and I have identified some inconsistencies in the underlying assumptions >> on which the code is based. >> >> A. Context is always set >> In some places the code carefully checks to see if the Context is null. >> In other places (often in the same method and before the null check) the >> code assumes that the Context is non-null. > > Specific examples = ? I see only a few checks null check vs no null check: [File|JDBC]Store before r1723736 Assumes non-null: ManagerBase getObjectNameKeyProperties() getDomainInternal() SingleSignOn SingleSignOnSessionKey Checks for null setContext() toString() SingleSingOnEvent Just to start with. >> B. Context never changes >> ManagerBase.setContext() is written on the basis that the Context may >> change at any point. However, pretty much everywhere else assumes that >> the Context doesn't change (at least while the Manager is in use). >> >> Related to B, there are various places where threading issues exist if >> the Context were to change while the Manager was in use and a few places >> (e.g. the distributable flag) that aren't updated that should be. > > Good catch about "distributable", but I think it is just a bug. > Compare it with the following other property: > > ManagerBase.setContext() gets the current value of sessionTimeout and > registers itself as PropertyChangeListener. > > ManagerBase.propertyChange() handles update of "sessionTimeout". > > The "sessionTimeout" property of StandardContext can be changed via JMX. > > Technically, the "distributable" property is exposed to JMX as well > and is changeable, though I do not see much use in changing it. > > I think it is better to notify "distributable" field change via > PropertyListener. Currently StandardContext.setDistributable() has a > workaround: > > [[[ > @Override > public void setDistributable(boolean distributable) { > boolean oldDistributable = this.distributable; > this.distributable = distributable; > support.firePropertyChange("distributable", >oldDistributable, >this.distributable); > > // Bugzilla 32866 > if(getManager() != null) { > if(log.isDebugEnabled()) { > log.debug("Propagating distributable=" + distributable > + " to manager"); > } > getManager().setDistributable(distributable); > } > } > ]]] I think the problem is wider than distributable. Lots of places assume the Context is always non-null. >> Given these issues I see two options. >> >> 1. Require that the Context is set before the Manager is first used and >> disallow any changes once the Manager has been used. >> > > Make it dependent on Lifecycle.getState(), > or you are just saying about (oldValue != null) check? > >> 2. Correctly handle the possibility that the Context may change either >> a) at any time or b) if the Context is stopped (i.e. the Manager is not >> being used). > > First review > == > I think it should be possible to replace Manager in a Context before > that Context starts. No problem with that. > The default implementation can be wrong and one should be able to > replace it. That is usually performed by a LifecycleListener. > > If so, Context shall call setContext(null) on the old manager instance > so that the old Manager unregisters itself as PropertyChangeListener > on the context. > > Actually currently there is no such setContext(null) call, which is a bug. We can fix that. > So I think it is 2.b) - allow change when it is stopped. > The Manager is a Lifecycle, so you can say "if Manager is stopped". I'm not entirely against replacing the Manager in a running Context although the consequences are likely to be messy. But I wasn't coming at this from that direction. I was coming at this from changing the Context for a Manager. I don't think we should / need to support this. Once a Manager has been used with a Context it should be thrown away once it is no longer required. > Replacing a component after startup may be useful, but I think for a > manager this feature is not needed. A Manager is a heavy component > (StandardManager loads serialized sessions at startup), so I think it > does not need this feature. > > As such, Context.setManager() can be simplified. > > (If some 3rd party one really needs to replace manager on a running > context, the caller of Context.setManager() can call the lifecycle > methods on manager by itself and deal with consequences) I'm not sure we need to support this but at this point I'm not looking to explicitly block this. > (It is odd that current Context.setManager() calls oldManager.stop() > newManager.start(), as there is a time interval when there
Re: [PROPOSAL] Manager behaviour clarification for 9.0.x
2016-01-08 20:26 GMT+03:00 Mark Thomas : > On 08/01/2016 16:56, Konstantin Kolinko wrote: >> 2016-01-08 15:33 GMT+03:00 Mark Thomas : >>> I've been looking at the relationship between a Context and its Manager >>> and I have identified some inconsistencies in the underlying assumptions >>> on which the code is based. >>> >>> A. Context is always set >>> In some places the code carefully checks to see if the Context is null. >>> In other places (often in the same method and before the null check) the >>> code assumes that the Context is non-null. >> >> Specific examples = ? I see only a few checks > > null check vs no null check: > [File|JDBC]Store before r1723736 I guess I was looking at the current implementation after your fix. OK, those are unusable outside of a web application. Or it makes sense to use them offline? - to read session data from a standalone application, - in a test > Assumes non-null: > ManagerBase > getObjectNameKeyProperties() > getDomainInternal() > SingleSignOn > SingleSignOnSessionKey OK. > Checks for null > setContext() > toString() The null checks are needed in both these places. The toString() can be called at any time. > SingleSingOnEvent I think you mean SingleSignOnListener.sessionEvent(). A sanity check. Not really needed. But that method is full of sanity checks, so one more does not hurt. >> [...] >> The default implementation can be wrong and one should be able to >> replace it. That is usually performed by a LifecycleListener. >> >> If so, Context shall call setContext(null) on the old manager instance >> so that the old Manager unregisters itself as PropertyChangeListener >> on the context. >> >> Actually currently there is no such setContext(null) call, which is a bug. > > We can fix that. > > > In summary, what I am intending is: > > Context.manager -> change whenever you like although change while > running at your own risk > > Manager.context -> no changes once the Manager is not in the NEW state. > > I hope this clarifies what I was proposing. OK. A call to context.removePropertyChangeListener() is needed . Instead of setContext(null) call it will be more clear to add the listener in initInternal() and to remove it in destroyInternal(). Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: tagging tomcat 6.0.45
2016-01-08 17:21 GMT+03:00 jean-frederic clere : > Hi, > > I am planning to test and tag tomcat 6.0.45 during the week-end. 1) A bug in a new feature: https://bz.apache.org/bugzilla/show_bug.cgi?id=58817 I plan to look there together with old Mapper patch (currently in STATUS), but I think it needs backporting some tests. I have not looked at Mapper for 1,5 years (that proposed patch is dated 2014-06) If anyone beets me with a fix, then OK. Maybe there is a simple solution / some trivial oversight. 2) Updating to any recent version of Tomcat Native needs update to tomcat.nsi to skip Itanium binaries. Tomcat 7 has this issue as well. I am not sure that we want to ship it with native 1.1.33. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1723752 - in /tomcat/trunk/java/org/apache: catalina/filters/ catalina/ha/ catalina/ha/backend/ catalina/ha/deploy/ catalina/ha/session/ catalina/ha/tcp/ catalina/session/ catalina/tr
/** - * Return the member that represents this node. - * - * @return Member + * @return the member that represents this node. */ public Member getLocalMember(); /** - * Return response status code that is used to reject denied request. + * @return response status code that is used to reject denied request. */ The first sentence of description of a method goes into summary - into the table that lists class methods. E.g.: http://tomcat.apache.org/tomcat-8.0-doc/api/org/apache/catalina/filters/RequestFilter.html#method_summary If everything is moved into @return tag, the method summary becomes empty and that table would list just the method names. I think that a simple @return Member @return Member or null @return Boolean @return value will fix the javadoc tool warning and is better than moving all method description into @return tag. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1723752 - in /tomcat/trunk/java/org/apache: catalina/filters/ catalina/ha/ catalina/ha/backend/ catalina/ha/deploy/ catalina/ha/session/ catalina/ha/tcp/ catalina/session/ catalina/tr
2016-01-08 20:00 GMT+01:00 Konstantin Kolinko : > /** > - * Return the member that represents this node. > - * > - * @return Member > + * @return the member that represents this node. > */ > public Member getLocalMember(); > > /** > - * Return response status code that is used to reject denied request. > + * @return response status code that is used to reject denied request. > */ > > > The first sentence of description of a method goes into summary - into > the table that lists class methods. > > E.g.: > > http://tomcat.apache.org/tomcat-8.0-doc/api/org/apache/catalina/filters/RequestFilter.html#method_summary > > If everything is moved into @return tag, the method summary becomes > empty and that table would list just the method names. > > I think that a simple > @return Member > @return Member or null > @return Boolean > @return value > will fix the javadoc tool warning and is better than moving all method > description into @return tag. > > This was done like that elsewhere and I like it. Rémy
Re: [VOTE-RESTARTED] Release Apache Tomcat Native 1.2.4
2016-01-08 12:58 GMT+03:00 Mark Thomas : > On 08/01/2016 09:13, jean-frederic clere wrote: >> On 01/06/2016 08:45 PM, Mark Thomas wrote: >>> On 06/01/2016 19:34, Rainer Jung wrote: Hi Mark, there's no file bin/openssl.exe in the Windows binariy zip files. It existed in 1.2.3 but was also missing for 1.2.2. It also exists in 1.2.0 and 1.2.1 as well as 1.1.33 and 1.1.34. So I guess it should be included for 1.2.4 as well? >>> >>> I think that is an artefact of how I built the release. I should update >>> the scripts to take a copy of the openssl.exe. >>> >>> I'm not particularly concerned. I could copy it across from 1.2.3 if >>> people think it is essential. >> >> It is probably better to have it as building on windows is a challenge >> for a lot of people. > > OK. I'll copy it across and re-package the binaries before I do the > release. We have already voted to release that binary so no need to > restart the vote again (assuming folks trust that is all I am going to do). +1. By the way, I suspect that pdb files are different for 32-bit and 64-bit versions [1][2], but the archive has only one of them, "tcnative-1-src.pdb". I plan to run several more tests, but thus far everything is OK (tested TC9 and TC8). [1] https://msdn.microsoft.com/en-us/library/yd4f8bd1%28v=vs.100%29.aspx [2] http://blogs.msdn.com/b/jimgries/archive/2007/07/06/why-does-visual-studio-require-debugger-symbol-files-to-exactly-match-the-binary-files-that-they-were-built-with.aspx 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: r1723806 - in /tomcat/trunk: BUILDING.txt webapps/docs/changelog.xml
Author: kkolinko Date: Fri Jan 8 21:56:44 2016 New Revision: 1723806 URL: http://svn.apache.org/viewvc?rev=1723806&view=rev Log: 1. Document the test.threads option in BUILDING.txt 2. Update description of FindBugs option: unlike ckeckstyle it is not executed during build or test. The "findbugs" target need to be executed explicitly. Modified: tomcat/trunk/BUILDING.txt tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/BUILDING.txt URL: http://svn.apache.org/viewvc/tomcat/trunk/BUILDING.txt?rev=1723806&r1=1723805&r2=1723806&view=diff == --- tomcat/trunk/BUILDING.txt (original) +++ tomcat/trunk/BUILDING.txt Fri Jan 8 21:56:44 2016 @@ -387,57 +387,62 @@ For example: junit.formatter.usefile=false - 5. Optional support is provided for the Cobertura code coverage tool. It - can be enabled using the following property: + 5. It is possible to speed up testing by letting JUnit to run several + tests in parallel. + + This is configured by setting "test.threads" property. The recommended + value is one thread per core. + + 6. Optional support is provided for the Cobertura code coverage tool. + +NOTE: Cobertura is licensed under GPL v2 with parts of it being under + Apache License v1.1. See http://cobertura.sf.net for details. Using it + during Tomcat build is optional and is off by default. + + Cobertura can be enabled using the following properties: test.cobertura=true +test.threads=1 + + Using Cobertura currently requires setting test.threads configuration + property to the value of 1. Setting that property to a different value + will disable code coverage. The report files by default are written to output/coverage -* NOTE: Cobertura is licensed under GPL v2 with parts of it being under - Apache License v1.1. See http://cobertura.sf.net for details. Using it - during Tomcat build is optional and is off by default. - - 6. The performance tests are written to run reasonably powerful machines (such + 7. The performance tests are written to run reasonably powerful machines (such as a developer may use day to day) assuming no other resource hungry -processes are running. These assumptions are not always true (e.g. on CI -systems running in a virtual machine) so the performance tests may be -disabled by using the following property: +processes are running. + +These assumptions are not always true (e.g. on CI systems running in a +virtual machine) so the performance tests may be disabled by using the +following property: test.excludePerformance=true - 7. Some tests include checks that the access log valve entries are as expected. + 8. Some tests include checks that the access log valve entries are as expected. These checks include timings. On slower / loaded systems these checks will often fail. The checks may be relaxed by using the following property: test.relaxTiming=true - 8. It is known that some platforms (e.g. OSX El Capitan) require IPv4 to + 9. It is known that some platforms (e.g. OSX El Capitan) require IPv4 to be the default for the multicast tests to work. This is configured by the following property: java.net.preferIPv4Stack=true - 9. Optional support is provided for FindBugs. It can be enabled using the -following property: - -execute.findbugs=true - -The report file by default is written to - -output/findbugs - -* NOTE: Findbugs is licensed under LGPL. Using Findbugs during Tomcat build is - optional and is off by default. (8) Source code checks (8.1) Checkstyle -* NOTE: Checkstyle is licensed under LGPL. Using Checkstyle during Tomcat - build is optional and is off by default. +NOTE: Checkstyle is licensed under LGPL. Using Checkstyle during Tomcat + build is optional and is off by default. + + See http://checkstyle.sourceforge.net/ for more information. Tomcat comes with a Checkstyle configuration that tests its source code for certain conventions, like presence of the license header. @@ -454,14 +459,36 @@ is located in the following directory: output/res/checkstyle -It is possible to run the check separately by invoking the "validate" +It is possible to run the check separately by calling the "validate" target. The command is: cd ${tomcat.source} ant -Dexecute.validate=true validate -(8.2) End-of-line conventions check +(8.2) FindBugs + +NOTE: FindBugs is licensed under LGPL. Using Findbugs during Tomcat build is + optional and is off by default. + + See http://findbugs.sourceforge.net/ for more information. + +To enable FindBugs, add the following property to build.properties file: + +execute.findbugs=true + +To compile Tomcat classes and generate a FindBugs report, call the +"findbugs" target. For example: + +cd ${tomcat.source} +ant -Dexecute.findbugs=
Re: tagging tomcat 6.0.45
On 08/01/2016 14:21, jean-frederic clere wrote: > Hi, > > I am planning to test and tag tomcat 6.0.45 during the week-end. > > Any objections? I'm working on some session stuff that really should be in the next 6 release. I don't think it will be ready until early next week. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GUMP@vmgump]: Project tomcat-tc7.0.x-test-bio (in module tomcat-7.0.x) failed
To whom it may engage... This is an automated request, but not an unsolicited one. For more information please visit http://gump.apache.org/nagged.html, and/or contact the folk at gene...@gump.apache.org. Project tomcat-tc7.0.x-test-bio has an issue affecting its community integration. This issue affects 1 projects. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - tomcat-tc7.0.x-test-bio : Tomcat 7.x, a web server implementing Java Servlet 3.0, ... Full details are available at: http://vmgump.apache.org/gump/public/tomcat-7.0.x/tomcat-tc7.0.x-test-bio/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property tomcat-dbcp-src.jar. -DEBUG- Dependency on commons-daemon exists, no need to add for property commons-daemon.native.src.tgz. -DEBUG- Dependency on commons-daemon exists, no need to add for property tomcat-native.tar.gz. -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property tomcat-dbcp.home. -INFO- Failed with reason build failed -INFO- Project Reports in: /srv/gump/public/workspace/tomcat-7.0.x/output/logs-BIO -INFO- Project Reports in: /srv/gump/public/workspace/tomcat-7.0.x/output/test-tmp-BIO/logs The following work was performed: http://vmgump.apache.org/gump/public/tomcat-7.0.x/tomcat-tc7.0.x-test-bio/gump_work/build_tomcat-7.0.x_tomcat-tc7.0.x-test-bio.html Work Name: build_tomcat-7.0.x_tomcat-tc7.0.x-test-bio (Type: Build) Work ended in a state of : Failed Elapsed: 32 mins 24 secs Command Line: /usr/lib/jvm/java-8-oracle/bin/java -Djava.awt.headless=true -Dbuild.sysclasspath=only org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml -Dcommons-pool.home=/srv/gump/public/workspace/commons-pool-1.x -Dtest.temp=output/test-tmp-BIO -Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.13-SNAPSHOT.jar -Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-2.3-SNAPSHOT.jar -Dexamples.sources.skip=true -Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20160108.jar -Dtomcat-dbcp-src.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-src.jar -Dtomcat-dbcp.home=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps -Dtest.excludePerformance=true -Dhamcrest.jar=/srv/gump/packages/hamcrest/hamcrest-core-1.3.jar -Dcommons-dbcp.home=/srv/gump/public/workspace/commons-dbcp-1.x -Dexecute.test.apr=false -Dexecute.test.bio=true -Dcommons-daemon.native.src.tgz=/srv/gump/public/wo rkspace/apache-commons/daemon/dist/bin/commons-daemon-20160108-native-src.tar.gz -Dtest.reports=output/logs-BIO -Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20160108-native-src.tar.gz -Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.5-201506032000/ecj-4.5.jar -Dexecute.test.nio=false -Dtest.accesslog=true -Dtomcat-dbcp.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-20160108.jar -Deasymock.jar=/srv/gump/public/workspace/easymock/core/target/easymock-3.5-SNAPSHOT.jar -Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test [Working Directory: /srv/gump/public/workspace/tomcat-7.0.x] CLASSPATH: /usr/lib/jvm/java-8-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-7.0.x/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/servlet-api.ja r:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomca
svn commit: r1723824 - /tomcat/tc6.0.x/trunk/NOTICE
Author: kkolinko Date: Sat Jan 9 04:45:49 2016 New Revision: 1723824 URL: http://svn.apache.org/viewvc?rev=1723824&view=rev Log: Fix Typo in NOTICE. (In Tomcat 7 this was fixed in r752584) Modified: tomcat/tc6.0.x/trunk/NOTICE Modified: tomcat/tc6.0.x/trunk/NOTICE URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/NOTICE?rev=1723824&r1=1723823&r2=1723824&view=diff == --- tomcat/tc6.0.x/trunk/NOTICE (original) +++ tomcat/tc6.0.x/trunk/NOTICE Sat Jan 9 04:45:49 2016 @@ -5,7 +5,7 @@ This product includes software developed The Apache Software Foundation (http://www.apache.org/). The Windows Installer is built with the Nullsoft -Scriptable Install Sysem (NSIS), which is +Scriptable Install System (NSIS), which is open source software. The original software and related information is available at http://nsis.sourceforge.net. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1723825 - /tomcat/tc6.0.x/trunk/build.xml
Author: kkolinko Date: Sat Jan 9 04:50:26 2016 New Revision: 1723825 URL: http://svn.apache.org/viewvc?rev=1723825&view=rev Log: Update some comments in build.xml. No functional change. Modified: tomcat/tc6.0.x/trunk/build.xml Modified: tomcat/tc6.0.x/trunk/build.xml URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/build.xml?rev=1723825&r1=1723824&r2=1723825&view=diff == --- tomcat/tc6.0.x/trunk/build.xml (original) +++ tomcat/tc6.0.x/trunk/build.xml Sat Jan 9 04:50:26 2016 @@ -51,7 +51,7 @@ - + @@ -666,7 +666,8 @@ - + + @@ -780,6 +781,7 @@ description="Download (and build as necessary) dependent components" depends="build-manifests"> + @@ -794,7 +796,7 @@ - + @@ -837,6 +839,7 @@ + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1723827 - in /tomcat/tc6.0.x/trunk: .gitignore build.xml dist.xml java/org/apache/catalina/startup/ java/org/apache/catalina/startup/catalina.properties webapps/docs/changelog.xml
Author: kkolinko Date: Sat Jan 9 05:37:54 2016 New Revision: 1723827 URL: http://svn.apache.org/viewvc?rev=1723827&view=rev Log: Remove redundant copy of catalina.properties from o.a.c.startup. Generate this copy during the ant "compile" task. In Tomcat 7 this feature was implemented in r1138825 + r1351135. Note that nowadays the copied file is not included in src archives. Removed: tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/catalina.properties Modified: tomcat/tc6.0.x/trunk/.gitignore tomcat/tc6.0.x/trunk/build.xml tomcat/tc6.0.x/trunk/dist.xml tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/ (props changed) tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc6.0.x/trunk/.gitignore URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/.gitignore?rev=1723827&r1=1723826&r2=1723827&view=diff == --- tomcat/tc6.0.x/trunk/.gitignore (original) +++ tomcat/tc6.0.x/trunk/.gitignore Sat Jan 9 05:37:54 2016 @@ -34,3 +34,4 @@ maven-ant-tasks-*.jar thumbs.db Thumbs.db bin/setenv.* +java/org/apache/catalina/startup/catalina.properties Modified: tomcat/tc6.0.x/trunk/build.xml URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/build.xml?rev=1723827&r1=1723826&r2=1723827&view=diff == --- tomcat/tc6.0.x/trunk/build.xml (original) +++ tomcat/tc6.0.x/trunk/build.xml Sat Jan 9 05:37:54 2016 @@ -131,7 +131,15 @@ - + + + + + + + + - + @@ -664,6 +672,8 @@ + + Modified: tomcat/tc6.0.x/trunk/dist.xml URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/dist.xml?rev=1723827&r1=1723826&r2=1723827&view=diff == --- tomcat/tc6.0.x/trunk/dist.xml (original) +++ tomcat/tc6.0.x/trunk/dist.xml Sat Jan 9 05:37:54 2016 @@ -368,6 +368,7 @@ + Propchange: tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/ -- --- svn:ignore (added) +++ svn:ignore Sat Jan 9 05:37:54 2016 @@ -0,0 +1 @@ +catalina.properties Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=1723827&r1=1723826&r2=1723827&view=diff == --- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Sat Jan 9 05:37:54 2016 @@ -103,6 +103,10 @@ Add the StatusManagerServlet to the list of Servlets that can only be loaded by privileged applications. (markt) + +Remove redundant copy of catalina.properties from o.a.c.startup. +Generate this copy during the ant "compile" task. (kkolinko) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn propchange: r1723827 - svn:log
Author: kkolinko Revision: 1723827 Modified property: svn:log Modified: svn:log at Sat Jan 9 06:16:38 2016 -- --- svn:log (original) +++ svn:log Sat Jan 9 06:16:38 2016 @@ -3,3 +3,7 @@ Generate this copy during the ant "compi In Tomcat 7 this feature was implemented in r1138825 + r1351135. Note that nowadays the copied file is not included in src archives. + +"compile" target needs to depend on "build-prepare" +Otherwise calling this target with an empty output directory fails at javac task with +build.xml: destination directory "<...>\classes" does not exist or is not a directory - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1723828 - in /tomcat/tc6.0.x/branches/tomcat6-testing_20160106: ./ .gitignore BRANCH-README.txt NOTICE build.xml dist.xml java/org/apache/catalina/startup/ java/org/apache/catalina/startu
Author: kkolinko Date: Sat Jan 9 06:30:33 2016 New Revision: 1723828 URL: http://svn.apache.org/viewvc?rev=1723828&view=rev Log: Rebase branch onto current tc6.0.x/trunk This means a catch-up merge of all revisions up to r1723827. Removed: tomcat/tc6.0.x/branches/tomcat6-testing_20160106/java/org/apache/catalina/startup/catalina.properties Modified: tomcat/tc6.0.x/branches/tomcat6-testing_20160106/ (props changed) tomcat/tc6.0.x/branches/tomcat6-testing_20160106/.gitignore tomcat/tc6.0.x/branches/tomcat6-testing_20160106/BRANCH-README.txt tomcat/tc6.0.x/branches/tomcat6-testing_20160106/NOTICE tomcat/tc6.0.x/branches/tomcat6-testing_20160106/build.xml tomcat/tc6.0.x/branches/tomcat6-testing_20160106/dist.xml tomcat/tc6.0.x/branches/tomcat6-testing_20160106/java/org/apache/catalina/startup/ (props changed) tomcat/tc6.0.x/branches/tomcat6-testing_20160106/webapps/docs/changelog.xml Propchange: tomcat/tc6.0.x/branches/tomcat6-testing_20160106/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Sat Jan 9 06:30:33 2016 @@ -1,4 +1,4 @@ -/tomcat/tc6.0.x/trunk:1723244-1723551 +/tomcat/tc6.0.x/trunk:1723244-1723827 /tomcat/tc7.0.x/trunk:1190476,1224802,1243045,1298635,1304471,1311997,1312007,1331772,1333164,1333176,1348992,1354866,1371298,1371302,1371620,1402110,1409014,1413553,1413557,1413563,1430083,1438415,1446641-1446660,1447013,1453106,1453119,1484919,1486877,1500065,1503852,1505844,1513151,1521040,1526470,1536524,1539176-1539177,1544469,1544473,1552805,1558894,1558917,1561368,1561382,1561386,1561552,1561561,1561636,1561641,1561643,1561737,1562748,1564317,1568922,1570163,1577328,1577464-1577465,1578814,1586659,1586897,1586960,1588199,1588997,1589740,1589851,1589997,1590019,1590028,1590337,1590492,1590651,1590838,1590845,1590848,1590912,1593262,1593288,1593371,1593835,1594230,1595174,1595366,1600956,1601333,1601856,1601909,1609079,1609606,1617364,1617374,1617433,1617457-1617458,1624249,1626579,1627420,1627469,1632586,1637686,1637711,1640675,1642045,1643515,1643540,1643572,1643585-1643586,1643642,1643647,1644019,1648817,1656301,1658815,1659523,1659564,1664001,1664176,1665087,1666968,1666989 ,1668541,1668635,1669802,1676557,1681183,1681841,1681865,1681867,1685829,1693109,1694293,1694433,1694875,1696381,1701945,1710353,1712656,1713873,1714000,1714005,1714540,1715213,1716221,1716417,1717210,1717212,1720236,1720398,1720443,1720464,1721814,1721883,1722801,1723151 /tomcat/tc8.0.x/trunk:1637685,1637709,1640674,1641726,1641729-1641730,1643513,1643539,1643571,1643581-1643582,1644018,1648816,1656300,1658801-1658803,1658811,1659522,1663997,1664175,1665086,1666967,1666988,1668634,1669801,1676556,1681182,1681840,1681864,1685827,1689921,1693108,1694291,1694427,1694873,1696379,1701944,1710347,1712618,1712655,1713872,1713998,1714004,1714538,1715207,1716216-1716217,1716414,1717208-1717209,1720235,1720396,1720442,1720463,1721813,1721882,1722800,1723130 /tomcat/trunk:601180,606992,612607,630314,640888,652744,653247,656018,666232,673796,673820,677910,683969,683982,684001,684081,684234,684269-684270,685177,687503,687645,689402,690781,691392,691805,692748,693378,694992,695053,695311,696780,696782,698012,698227,698236,698613,699427,699634,701355,709294,709811,709816,710063,710066,710125,710205,711126,711600,712461,712467,713953,714002,718360,719119,719124,719602,719626,719628,720046,720069,721040,721286,721708,721886,723404,723738,726052,727303,728032,728768,728947,729057,729567,729569,729571,729681,729809,729815,729934,730250,730590,731651,732859,732863,734734,740675,740684,742677,742697,742714,744160,744238,746321,746384,746425,747834,747863,748344,750258,750291,750921,751286-751287,751289,751295,752323,753039,757335,757774,758249,758365,758596,758616,758664,759074,761601,762868,762929,762936-762937,763166,763183,763193,763228,763262,763298,763302,763325,763599,763611,763654,763681,763706,764985,764997,765662,768335,769979,770716,770 809,770876,772872,776921,776924,776935,776945,777464,777466,777576,777625,778379,778523-778524,781528,781779,782145,782791,783316,783696,783724,783756,783762,783766,783863,783934,784453,784602,784614,785381,785688,785768,785859,786468,786487,786490,786496,786667,787627,787770,787985,789389,790405,791041,791184,791194,791224,791243,791326,791328,791789,792740,793372,793757,793882,793981,794082,794673,794822,795043,795152,795210,795457,795466,797168,797425,797596,797607,802727,802940,804462,804544,804734,805153,809131,809603,810916,810977,812125,812137,812432,813001,813013,813866,814180,814708,814876,815972,816252,817442,817822,819339,819361,820110,820132,820874,820954,821397,828196,828201,828210,828225,828759,830378-830379,830999,831106,831774,831785,831828,831850,831860,832214,832218,833121,833545,834047,835036,835336,836405,881396,881412,883130,883134,883146,883165,883177,883362,883565,884341,885038,885231,885241,885260,885901,885991,886019,888072,889363,889606,889716,890
svn commit: r1723829 - in /tomcat/tc6.0.x/branches/tomcat6-testing_20160106: BUILDING.txt build.properties.default build.xml test/build.xml test/org/apache/catalina/startup/TomcatBaseTest.java
Author: kkolinko Date: Sat Jan 9 06:44:50 2016 New Revision: 1723829 URL: http://svn.apache.org/viewvc?rev=1723829&view=rev Log: Implement running the test with Apache Ant. The command is: ant download ant test Remove unused test/build.xml Note: running with APR connector is supported, but usually results in a JVM crash. Removed: tomcat/tc6.0.x/branches/tomcat6-testing_20160106/test/build.xml Modified: tomcat/tc6.0.x/branches/tomcat6-testing_20160106/BUILDING.txt tomcat/tc6.0.x/branches/tomcat6-testing_20160106/build.properties.default tomcat/tc6.0.x/branches/tomcat6-testing_20160106/build.xml tomcat/tc6.0.x/branches/tomcat6-testing_20160106/test/org/apache/catalina/startup/TomcatBaseTest.java Modified: tomcat/tc6.0.x/branches/tomcat6-testing_20160106/BUILDING.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/branches/tomcat6-testing_20160106/BUILDING.txt?rev=1723829&r1=1723828&r2=1723829&view=diff == --- tomcat/tc6.0.x/branches/tomcat6-testing_20160106/BUILDING.txt (original) +++ tomcat/tc6.0.x/branches/tomcat6-testing_20160106/BUILDING.txt Sat Jan 9 06:44:50 2016 @@ -172,3 +172,109 @@ For a quick rebuild of only modified cod cd ${tomcat.source} ant -f dist.xml release + +(8) Tests + +(8.1) Running Tomcat tests + +Tomcat 6 includes a small number of junit tests. (A lot more are available +with Tomcat 7 onwards). + +The tests are not run when a release is built. There is separate command to +run them. + +To run the testsuite use the following command: + +cd ${tomcat.source} +ant download +ant test + +It is advisable to redirect output of the above command to a file for later +inspection. + +The JUnit reports generated by the tests will be written to the following +directory: + +output/build/logs + +By default the testsuite is run three times to test 3 different +implementations of Tomcat connectors: BIO, NIO and APR. (If you are not +familiar with Tomcat connectors, see config/http.html in documentation for +details). + +The 3 runs are enabled and disabled individually by the following +properties, which all are "true" by default: + +execute.test.bio=true +execute.test.nio=true +execute.test.apr=true + +The APR connector can be tested only if Tomcat-Native library binaries are +found by the testsuite. The "test.apr.loc" property specifies the directory +where the library binaries are located. + +By default the "test.apr.loc" property specifies the following location: + +output/build/bin/native/ + +If you are on Windows and want to test the APR connector you can put the +tcnative-1.dll file into ${tomcat.source}/bin/native/ and it will be copied +into the above directory when the build runs. + + +(8.2) Running a single test + +It is possible to run a single JUnit test class by adding the "test.entry" +property to the build.properties file. The property specifies the name of +the test class. + +For example: + +test.entry=org.apache.catalina.util.TestServerInfo + +It is possible to further limit such run to a number of selected test +methods by adding "test.entry.methods" property. The property specifies a +comma-separated list of test case methods. + +For example: + +test.entry=org.apache.el.lang.TestELArithmetic +test.entry.methods=testMultiply01,testMultiply02 + + +(8.3) Other configuration options + + 1. It is possible to configure the directory where JUnit reports are + written to. It is configured by "test.reports" property. The default + value is + +output/build/logs + + 2. It is possible to enable generation of access log file when the tests + are run. This is off by default and can be enabled by the following + property: + +test.accesslog=true + + The "access_log." file will be written to the same directory as + JUnit reports, + +output/build/logs + + 3. The testsuite respects logging configuration as configured by + ${tomcat.source}/conf/logging.properties + + The log files will be written to the temporary directory used by the + tests, + +output/test-tmp/logs + + 4. It is possible to configure formatter used by JUnit reports. + Configuration properties are "junit.formatter.type", + "junit.formatter.extension" and "junit.formatter.usefile". + + For example the following property disables generation of separate report + files: + +junit.formatter.usefile=false + Modified: tomcat/tc6.0.x/branches/tomcat6-testing_20160106/build.properties.default URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/branches/tomcat6-testing_20160106/build.properties.default?rev=1723829&r1=1723828&r2=1723829&view=diff == --- tomcat/tc6.0.x/branches/tomcat6-testing_20160106/build.properties.default (original) +++ tomcat/tc6.0.x/branches/tomcat6-testing_20160106/build.properties.default Sat Jan 9 06:44:50 2016 @@ -29,6 +29,20 @@ version.
svn commit: r1723830 - /tomcat/tc6.0.x/branches/tomcat6-testing_20160106/BRANCH-README.txt
Author: kkolinko Date: Sat Jan 9 06:45:40 2016 New Revision: 1723830 URL: http://svn.apache.org/viewvc?rev=1723830&view=rev Log: Update BRANCH-README.txt with the current status. Modified: tomcat/tc6.0.x/branches/tomcat6-testing_20160106/BRANCH-README.txt Modified: tomcat/tc6.0.x/branches/tomcat6-testing_20160106/BRANCH-README.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/branches/tomcat6-testing_20160106/BRANCH-README.txt?rev=1723830&r1=1723829&r2=1723830&view=diff == --- tomcat/tc6.0.x/branches/tomcat6-testing_20160106/BRANCH-README.txt (original) +++ tomcat/tc6.0.x/branches/tomcat6-testing_20160106/BRANCH-README.txt Sat Jan 9 06:45:40 2016 @@ -29,8 +29,15 @@ Current status / Completed: Make sure to run Ant build before running the test from within an IDE. - 3. Support for starting Tomcat with a random port number (port number 0) - has been implemented. (r1723545 + r1723551, BZ 52028). + 3. Implemented support for starting Tomcat with a random port number (port + number 0). + + Committed to tc6.0.x/trunk. (r1723545 + r1723551, BZ 52028). + + 4. Implemented support for running the tests with Apache Ant. + + Note: running the tests with APR connector is not usable. + The JVM crashes. See FIXME items below. Known issues / FIXME: @@ -71,28 +78,57 @@ Known issues / FIXME: I expect to fix this along with API review (item 1. above) [Not Started] + 4. Running tests with Ant using APR connector +It looks that Embedded.start() does not send INIT_EVENT to +AprLifecycleListener. -Further work / TODO: +A quick fix added: an explicit call to + listener.lifecycleEvent(new LifecycleEvent(server, Lifecycle.INIT_EVENT)); - 4. Add support for running the tests with Ant. +I think this goes away with test class API review (item 1. above) + + 5. Running tests with Ant using APR connector crashes + +I have seen this stacktrace + +[junit] jan 09, 2016 10:29:58 AM org.apache.coyote.http11.Http11AprProtocol destroy +[junit] INFO: Stopping Coyote HTTP/1.1 on http-127.0.0.1-auto-1-58371 +[junit] Exception in thread "http-127.0.0.1-auto-1-1" java.lang.NullPointerException +[junit]at org.apache.tomcat.util.net.AprEndpoint.getPoller(AprEndpoint.java:367) +[junit]at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1764) +[junit]at java.lang.Thread.run(Thread.java:745) + +or a JVM crash + +# EXCEPTION_ACCESS_VIOLATION (0xc005) at pc=0x10006eb6, pid=4664, tid=2380 + +Stack: [0x05ad,0x05b2], sp=0x05b1f3f4, free space=316k +Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) +C [tcnative-1.dll+0x6eb6] +j org.apache.tomcat.jni.Poll.poll(JJ[JZ)I+0 +j org.apache.tomcat.util.net.AprEndpoint$Poller.run()V+320 +v ~StubRoutines::call_stub +V [jvm.dll+0x1429aa] + + +Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) +j org.apache.tomcat.jni.Poll.poll(JJ[JZ)I+0 +j org.apache.tomcat.util.net.AprEndpoint$Poller.run()V+320 +v ~StubRoutines::call_stub - * Add to the main build.xml file. [Not Started] +The cause is unknown. +I suspect that the poller thread does not stop properly. - tomcat6-testing branch has some incomplete attempt at implementing this. - See https://svn.apache.org/viewvc/tomcat/tc6.0.x/branches/tomcat6-testing/BRANCH-diff.diff?view=markup +Further work / TODO: - * Drop useless test/build.xml file. [Not Started] - - * Update BUILDING.txt. [Not Started] - - 5. Backport support for running with a null docBase (without docBase). [Not Started] + 6. Backport support for running with a null docBase (without docBase). [Not Started] In Tomcat 7 this is implemented by r1681953 (2015-05-27, BZ 57154) - 6. Backport other tests from Tomcat 7. [In progress] + 7. Backport other tests from Tomcat 7. [In progress] - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org