JBossWeb SVN: r309 - trunk/java/org/apache/catalina/servlets.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-10-15 02:35:37 -0400 (Mon, 15 Oct 2007)
New Revision: 309
Modified:
trunk/java/org/apache/catalina/servlets/WebdavServlet.java
Log:
- No expansion of entity refs.
Modified: trunk/java/org/apache/catalina/servlets/WebdavServlet.java
===================================================================
--- trunk/java/org/apache/catalina/servlets/WebdavServlet.java 2007-10-11 23:41:30 UTC (rev 308)
+++ trunk/java/org/apache/catalina/servlets/WebdavServlet.java 2007-10-15 06:35:37 UTC (rev 309)
@@ -243,6 +243,7 @@
try {
documentBuilderFactory = DocumentBuilderFactory.newInstance();
documentBuilderFactory.setNamespaceAware(true);
+ documentBuilderFactory.setExpandEntityReferences(false);
documentBuilder = documentBuilderFactory.newDocumentBuilder();
} catch(ParserConfigurationException e) {
throw new ServletException
17 years, 3 months
JBossWeb SVN: r308 - in trunk/java/org/apache: catalina/startup and 1 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-10-11 19:41:30 -0400 (Thu, 11 Oct 2007)
New Revision: 308
Modified:
trunk/java/org/apache/catalina/connector/Connector.java
trunk/java/org/apache/catalina/startup/Embedded.java
trunk/java/org/apache/tomcat/util/IntrospectionUtils.java
Log:
- Port improvement of attribute checking for the connector, as it has fancier output.
Modified: trunk/java/org/apache/catalina/connector/Connector.java
===================================================================
--- trunk/java/org/apache/catalina/connector/Connector.java 2007-10-11 17:56:35 UTC (rev 307)
+++ trunk/java/org/apache/catalina/connector/Connector.java 2007-10-11 23:41:30 UTC (rev 308)
@@ -41,7 +41,6 @@
import org.apache.tomcat.util.http.mapper.Mapper;
import org.apache.tomcat.util.modeler.Registry;
import org.jboss.logging.Logger;
-import org.jboss.logging.Logger;
/**
@@ -307,30 +306,16 @@
/**
* Set a configured property.
*/
- public void setProperty(String name, String value) {
+ public boolean setProperty(String name, String value) {
String repl = name;
if (replacements.get(name) != null) {
repl = (String) replacements.get(name);
}
- if (!IntrospectionUtils.setProperty(protocolHandler, repl, value)) {
- log.warn("Property " + name + " not found on the protocol handler.");
- }
+ return IntrospectionUtils.setProperty(protocolHandler, repl, value);
}
/**
- * Set a configured property.
- */
- public void setPropertyInternal(String name, String value) {
- String repl = name;
- if (replacements.get(name) != null) {
- repl = (String) replacements.get(name);
- }
- IntrospectionUtils.setProperty(protocolHandler, repl, value);
- }
-
-
- /**
* Return a configured property.
*/
public Object getAttribute(String name) {
@@ -396,7 +381,7 @@
public void setAllowTrace(boolean allowTrace) {
this.allowTrace = allowTrace;
- setPropertyInternal("allowTrace", String.valueOf(allowTrace));
+ setProperty("allowTrace", String.valueOf(allowTrace));
}
@@ -474,7 +459,7 @@
public void setEnableLookups(boolean enableLookups) {
this.enableLookups = enableLookups;
- setPropertyInternal("enableLookups", String.valueOf(enableLookups));
+ setProperty("enableLookups", String.valueOf(enableLookups));
}
@@ -544,7 +529,7 @@
public void setMaxSavePostSize(int maxSavePostSize) {
this.maxSavePostSize = maxSavePostSize;
- setPropertyInternal("maxSavePostSize", String.valueOf(maxSavePostSize));
+ setProperty("maxSavePostSize", String.valueOf(maxSavePostSize));
}
@@ -566,7 +551,7 @@
public void setPort(int port) {
this.port = port;
- setPropertyInternal("port", String.valueOf(port));
+ setProperty("port", String.valueOf(port));
}
@@ -730,7 +715,7 @@
if(proxyName != null && proxyName.length() > 0) {
this.proxyName = proxyName;
- setPropertyInternal("proxyName", proxyName);
+ setProperty("proxyName", proxyName);
} else {
this.proxyName = null;
removeProperty("proxyName");
@@ -757,7 +742,7 @@
public void setProxyPort(int proxyPort) {
this.proxyPort = proxyPort;
- setPropertyInternal("proxyPort", String.valueOf(proxyPort));
+ setProperty("proxyPort", String.valueOf(proxyPort));
}
@@ -782,7 +767,7 @@
public void setRedirectPort(int redirectPort) {
this.redirectPort = redirectPort;
- setPropertyInternal("redirectPort", String.valueOf(redirectPort));
+ setProperty("redirectPort", String.valueOf(redirectPort));
}
@@ -831,7 +816,7 @@
public void setSecure(boolean secure) {
this.secure = secure;
- setPropertyInternal("secure", Boolean.toString(secure));
+ setProperty("secure", Boolean.toString(secure));
}
/**
@@ -852,7 +837,7 @@
public void setURIEncoding(String URIEncoding) {
this.URIEncoding = URIEncoding;
- setPropertyInternal("uRIEncoding", URIEncoding);
+ setProperty("uRIEncoding", URIEncoding);
}
@@ -875,7 +860,7 @@
public void setUseBodyEncodingForURI(boolean useBodyEncodingForURI) {
this.useBodyEncodingForURI = useBodyEncodingForURI;
- setPropertyInternal
+ setProperty
("useBodyEncodingForURI", String.valueOf(useBodyEncodingForURI));
}
@@ -903,7 +888,7 @@
*/
public void setXpoweredBy(boolean xpoweredBy) {
this.xpoweredBy = xpoweredBy;
- setPropertyInternal("xpoweredBy", String.valueOf(xpoweredBy));
+ setProperty("xpoweredBy", String.valueOf(xpoweredBy));
}
/**
@@ -914,7 +899,7 @@
*/
public void setUseIPVHosts(boolean useIPVHosts) {
this.useIPVHosts = useIPVHosts;
- setPropertyInternal("useIPVHosts", String.valueOf(useIPVHosts));
+ setProperty("useIPVHosts", String.valueOf(useIPVHosts));
}
/**
Modified: trunk/java/org/apache/catalina/startup/Embedded.java
===================================================================
--- trunk/java/org/apache/catalina/startup/Embedded.java 2007-10-11 17:56:35 UTC (rev 307)
+++ trunk/java/org/apache/catalina/startup/Embedded.java 2007-10-11 23:41:30 UTC (rev 308)
@@ -47,7 +47,6 @@
import org.apache.tomcat.util.IntrospectionUtils;
import org.apache.tomcat.util.log.SystemLogHandler;
import org.jboss.logging.Logger;
-import org.jboss.logging.Logger;
/**
@@ -427,7 +426,7 @@
connector = new Connector();
connector.setScheme("https");
connector.setSecure(true);
- connector.setPropertyInternal("SSLEnabled","true");
+ connector.setProperty("SSLEnabled","true");
// FIXME !!!! SET SSL PROPERTIES
} else {
connector = new Connector(protocol);
Modified: trunk/java/org/apache/tomcat/util/IntrospectionUtils.java
===================================================================
--- trunk/java/org/apache/tomcat/util/IntrospectionUtils.java 2007-10-11 17:56:35 UTC (rev 307)
+++ trunk/java/org/apache/tomcat/util/IntrospectionUtils.java 2007-10-11 23:41:30 UTC (rev 308)
@@ -266,7 +266,8 @@
try {
Method methods[] = findMethods(o.getClass());
- Method setPropertyMethod = null;
+ Method setPropertyMethodVoid = null;
+ Method setPropertyMethodBool = null;
// First, the ideal case - a setFoo( String ) method
for (int i = 0; i < methods.length; i++) {
@@ -333,18 +334,26 @@
}
// save "setProperty" for later
- if ("setProperty".equals(methods[i].getName())) {
- setPropertyMethod = methods[i];
+ if ("setProperty".equals(methods[i].getName())) {
+ if (methods[i].getReturnType() == Boolean.TYPE){
+ setPropertyMethodBool = methods[i];
+ } else {
+ setPropertyMethodVoid = methods[i];
+ }
}
}
// Ok, no setXXX found, try a setProperty("name", "value")
- if (setPropertyMethod != null) {
+ if (setPropertyMethodBool != null || setPropertyMethodVoid != null) {
Object params[] = new Object[2];
params[0] = name;
params[1] = value;
- setPropertyMethod.invoke(o, params);
- return true;
+ if (setPropertyMethodBool != null) {
+ return (Boolean) setPropertyMethodBool.invoke(o, params);
+ } else {
+ setPropertyMethodVoid.invoke(o, params);
+ return true;
+ }
}
} catch (IllegalArgumentException ex2) {
17 years, 3 months
JBossWeb SVN: r307 - trunk/java/org/apache/catalina/core.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-10-11 13:56:35 -0400 (Thu, 11 Oct 2007)
New Revision: 307
Modified:
trunk/java/org/apache/catalina/core/StandardServer.java
Log:
- Minor stopAwait fix.
Modified: trunk/java/org/apache/catalina/core/StandardServer.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardServer.java 2007-10-11 15:29:20 UTC (rev 306)
+++ trunk/java/org/apache/catalina/core/StandardServer.java 2007-10-11 17:56:35 UTC (rev 307)
@@ -42,12 +42,11 @@
import org.apache.catalina.Service;
import org.apache.catalina.deploy.NamingResources;
import org.apache.catalina.util.LifecycleSupport;
+import org.apache.catalina.util.ServerInfo;
import org.apache.catalina.util.StringManager;
-import org.apache.catalina.util.ServerInfo;
import org.apache.tomcat.util.buf.StringCache;
import org.apache.tomcat.util.modeler.Registry;
import org.jboss.logging.Logger;
-import org.jboss.logging.Logger;
@@ -360,7 +359,7 @@
if( port==-1 ) {
while( true ) {
try {
- Thread.sleep( 100000 );
+ Thread.sleep(10000);
} catch( InterruptedException ex ) {
}
if( stopAwait ) return;
@@ -747,6 +746,9 @@
// Notify our interested LifecycleListeners
lifecycle.fireLifecycleEvent(AFTER_STOP_EVENT, null);
+ if (port == -1)
+ stopAwait();
+
}
public void init() throws Exception {
17 years, 3 months
JBossWeb SVN: r306 - in trunk: webapps/docs and 1 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-10-11 11:29:20 -0400 (Thu, 11 Oct 2007)
New Revision: 306
Modified:
trunk/java/org/apache/catalina/connector/Connector.java
trunk/java/org/apache/catalina/connector/Request.java
trunk/webapps/docs/changelog.xml
trunk/webapps/docs/config/ajp.xml
trunk/webapps/docs/config/http.xml
Log:
- Standardize on the emptySessionPath=true attribute.
- Add a flag to check the session id existence in another webapp of the host. This has a cost,
but only occurs in some cases.
Modified: trunk/java/org/apache/catalina/connector/Connector.java
===================================================================
--- trunk/java/org/apache/catalina/connector/Connector.java 2007-10-11 03:34:40 UTC (rev 305)
+++ trunk/java/org/apache/catalina/connector/Connector.java 2007-10-11 15:29:20 UTC (rev 306)
@@ -111,12 +111,6 @@
/**
- * Use "/" as path for session cookies ?
- */
- protected boolean emptySessionPath = false;
-
-
- /**
* The "enable DNS lookups" flag for this Connector.
*/
protected boolean enableLookups = false;
@@ -463,29 +457,6 @@
/**
- * Return the "empty session path" flag.
- */
- public boolean getEmptySessionPath() {
-
- return (this.emptySessionPath);
-
- }
-
-
- /**
- * Set the "empty session path" flag.
- *
- * @param emptySessionPath The new "empty session path" flag value
- */
- public void setEmptySessionPath(boolean emptySessionPath) {
-
- this.emptySessionPath = emptySessionPath;
- setPropertyInternal("emptySessionPath", String.valueOf(emptySessionPath));
-
- }
-
-
- /**
* Return the "enable DNS lookups" flag.
*/
public boolean getEnableLookups() {
Modified: trunk/java/org/apache/catalina/connector/Request.java
===================================================================
--- trunk/java/org/apache/catalina/connector/Request.java 2007-10-11 03:34:40 UTC (rev 305)
+++ trunk/java/org/apache/catalina/connector/Request.java 2007-10-11 15:29:20 UTC (rev 306)
@@ -56,6 +56,7 @@
import org.apache.coyote.ActionCode;
+import org.apache.catalina.Container;
import org.apache.catalina.Context;
import org.apache.catalina.Globals;
import org.apache.catalina.Host;
@@ -84,6 +85,10 @@
implements HttpServletRequest {
+ protected static final boolean SESSION_ID_CHECK =
+ Boolean.valueOf(System.getProperty("org.apache.catalina.connector.Request.SESSION_ID_CHECK", "false")).booleanValue();
+
+
// ----------------------------------------------------------- Constructors
@@ -2320,21 +2325,40 @@
(sm.getString("coyoteRequest.sessionCreateCommitted"));
}
- // Attempt to reuse session id if one was submitted in a cookie
- // Do not reuse the session id if it is from a URL, to prevent possible
- // phishing attacks
- if (connector.getEmptySessionPath()
- && isRequestedSessionIdFromCookie()) {
- session = manager.createSession(getRequestedSessionId());
- } else {
- session = manager.createSession(null);
+ // Verify that the submitted session id exists in one of the host's web applications
+ String sessionId = requestedSessionId;
+ if (sessionId != null) {
+ if (SESSION_ID_CHECK) {
+ boolean found = false;
+ try {
+ if (!found) {
+ Container children[] = getHost().findChildren();
+ for (int i = 0; (i < children.length) && !found; i++) {
+ if ((children[i].getManager() != null)
+ && (children[i].getManager().findSession(sessionId) != null)) {
+ found = true;
+ }
+ }
+ }
+ } catch (IOException e) {
+ // Ignore: one manager is broken, and it will show up elsewhere again
+ }
+ if (!found) {
+ sessionId = null;
+ }
+ } else if (!isRequestedSessionIdFromCookie()) {
+ sessionId = null;
+ }
}
+ session = manager.createSession(sessionId);
// Creating a new session cookie based on that session
- if ((session != null) && (getContext() != null)
- && getContext().getCookies()) {
+ // If there was no cookie with the current session id, add a cookie to the response
+ if ( (session != null) && (getContext() != null)
+ && getContext().getCookies()
+ && !(isRequestedSessionIdFromCookie() && (session.getIdInternal().equals(getRequestedSessionId()))) ) {
Cookie cookie = new Cookie(Globals.SESSION_COOKIE_NAME,
- session.getIdInternal());
+ session.getIdInternal());
configureSessionCookie(cookie);
response.addCookieInternal(cookie);
}
@@ -2355,15 +2379,7 @@
*/
protected void configureSessionCookie(Cookie cookie) {
cookie.setMaxAge(-1);
- String contextPath = null;
- if (!connector.getEmptySessionPath() && (getContext() != null)) {
- contextPath = getContext().getEncodedPath();
- }
- if ((contextPath != null) && (contextPath.length() > 0)) {
- cookie.setPath(contextPath);
- } else {
- cookie.setPath("/");
- }
+ cookie.setPath("/");
if (isSecure()) {
cookie.setSecure(true);
}
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2007-10-11 03:34:40 UTC (rev 305)
+++ trunk/webapps/docs/changelog.xml 2007-10-11 15:29:20 UTC (rev 306)
@@ -50,6 +50,12 @@
<fix>
Use the system property for the session cookie name. (jfclere)
</fix>
+ <fix>
+ Move waiting time for requests to complete to the connector pause. (remm)
+ </fix>
+ <fix>
+ Update session cookie handling (path always set to /) and id generation (check host's webapps for a matching id). (remm)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">
@@ -58,7 +64,8 @@
Remove HTTP NIO connector. (remm)
</update>
<update>
- Remove legacy org.apache.jk AJP connector and utility components. (remm)
+ Remove legacy org.apache.jk AJP connector and utility components, replaced
+ by the org.apache.coyote.ajp connector. (remm)
</update>
</changelog>
</subsection>
@@ -116,8 +123,12 @@
</update>
<fix>
o.a.juli.ClassLoaderLogManager handle more then one system property replacement at file logging.properties. (pero)
- </fix>
+ </fix>
<fix>
+ <bug>43338</bug>: Support '*' servlet-name mapping at filter-mapping.
+ Patch provided by Keiichi Fujino. (pero)
+ </fix>
+ <fix>
<bug>43487</bug>: Fix request processing stats. (fhanik)
</fix>
</changelog>
@@ -131,6 +142,9 @@
<fix>
Fixes to B2C conversion. (billbarker)
</fix>
+ <update>
+ Cookie parser refactoring, submitted by John Kew. (remm)
+ </update>
<fix>
<bug>43479</bug>: Memory leak cleaning up sendfile connections, submitted by Chris Elving. (remm)
</fix>
Modified: trunk/webapps/docs/config/ajp.xml
===================================================================
--- trunk/webapps/docs/config/ajp.xml 2007-10-11 03:34:40 UTC (rev 305)
+++ trunk/webapps/docs/config/ajp.xml 2007-10-11 15:29:20 UTC (rev 306)
@@ -59,14 +59,6 @@
HTTP method. If not specified, this attribute is set to false.</p>
</attribute>
- <attribute name="emptySessionPath" required="false">
- <p>If set to <code>true</code>, all paths for session cookies will be set
- to <code>/</code>. This can be useful for portlet specification implementations,
- but will greatly affect performance if many applications are accessed on a given
- server by the client.
- If not specified, this attribute is set to <code>false</code>.</p>
- </attribute>
-
<attribute name="enableLookups" required="false">
<p>Set to <code>true</code> if you want calls to
<code>request.getRemoteHost()</code> to perform DNS lookups in
Modified: trunk/webapps/docs/config/http.xml
===================================================================
--- trunk/webapps/docs/config/http.xml 2007-10-11 03:34:40 UTC (rev 305)
+++ trunk/webapps/docs/config/http.xml 2007-10-11 15:29:20 UTC (rev 306)
@@ -60,14 +60,6 @@
HTTP method. If not specified, this attribute is set to false.</p>
</attribute>
- <attribute name="emptySessionPath" required="false">
- <p>If set to <code>true</code>, all paths for session cookies will be set
- to <code>/</code>. This can be useful for portlet specification implementations,
- but will greatly affect performance if many applications are accessed on a given
- server by the client.
- If not specified, this attribute is set to <code>false</code>.</p>
- </attribute>
-
<attribute name="enableLookups" required="false">
<p>Set to <code>true</code> if you want calls to
<code>request.getRemoteHost()</code> to perform DNS lookups in
17 years, 3 months
JBossWeb SVN: r305 - trunk/java/org/apache/catalina/core.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-10-10 23:34:40 -0400 (Wed, 10 Oct 2007)
New Revision: 305
Modified:
trunk/java/org/apache/catalina/core/StandardContext.java
Log:
- Support '*' servlet-name mapping for filter-mapping.
Modified: trunk/java/org/apache/catalina/core/StandardContext.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardContext.java 2007-10-11 00:39:13 UTC (rev 304)
+++ trunk/java/org/apache/catalina/core/StandardContext.java 2007-10-11 03:34:40 UTC (rev 305)
@@ -2194,7 +2194,9 @@
if (findFilterDef(filterName) == null)
throw new IllegalArgumentException
(sm.getString("standardContext.filterMap.name", filterName));
- if ((servletNames.length == 0) && (urlPatterns.length == 0))
+ if (!filterMap.getMatchAllServletNames()
+ && !filterMap.getMatchAllUrlPatterns()
+ && (servletNames.length == 0) && (urlPatterns.length == 0))
throw new IllegalArgumentException
(sm.getString("standardContext.filterMap.either"));
// FIXME: Older spec revisions may still check this
17 years, 3 months
JBossWeb SVN: r304 - trunk/java/org/apache/tomcat/util/net.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-10-10 20:39:13 -0400 (Wed, 10 Oct 2007)
New Revision: 304
Modified:
trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
Log:
- The socket will be removed again in the remove method (of course, it would not be a big problem).
Modified: trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
===================================================================
--- trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 2007-10-11 00:16:16 UTC (rev 303)
+++ trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 2007-10-11 00:39:13 UTC (rev 304)
@@ -2080,7 +2080,7 @@
}
// Call maintain for the sendfile poller
if (soTimeout > 0 && maintainTime > 1000000L && running) {
- rv = Poll.maintain(sendfilePollset, desc, true);
+ rv = Poll.maintain(sendfilePollset, desc, false);
maintainTime = 0;
if (rv > 0) {
for (int n = 0; n < rv; n++) {
17 years, 3 months
JBossWeb SVN: r303 - in trunk/java/org/apache: coyote and 2 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-10-10 20:16:16 -0400 (Wed, 10 Oct 2007)
New Revision: 303
Modified:
trunk/java/org/apache/catalina/core/StandardService.java
trunk/java/org/apache/catalina/core/StandardWrapper.java
trunk/java/org/apache/coyote/RequestGroupInfo.java
trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
trunk/java/org/apache/coyote/ajp/AjpProtocol.java
trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
trunk/java/org/apache/coyote/http11/Http11Protocol.java
Log:
- Experiment with a different shutdown procedure, with the connectors being responsible for waiting
(when pausing).
Modified: trunk/java/org/apache/catalina/core/StandardService.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardService.java 2007-10-09 16:06:54 UTC (rev 302)
+++ trunk/java/org/apache/catalina/core/StandardService.java 2007-10-11 00:16:16 UTC (rev 303)
@@ -573,13 +573,6 @@
}
}
- // Heuristic: Sleep for a while to ensure pause of the connector
- try {
- Thread.sleep(1000);
- } catch (InterruptedException e) {
- // Ignore
- }
-
lifecycle.fireLifecycleEvent(STOP_EVENT, null);
if(log.isInfoEnabled())
log.info
@@ -594,7 +587,7 @@
}
}
}
- // FIXME pero -- Why container stop first? KeepAlive connetions can send request!
+
// Stop our defined Connectors first
synchronized (connectors) {
for (int i = 0; i < connectors.length; i++) {
Modified: trunk/java/org/apache/catalina/core/StandardWrapper.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardWrapper.java 2007-10-09 16:06:54 UTC (rev 302)
+++ trunk/java/org/apache/catalina/core/StandardWrapper.java 2007-10-11 00:16:16 UTC (rev 303)
@@ -111,8 +111,7 @@
protected NotificationBroadcasterSupport broadcaster = null;
/**
- * The count of allocations that are currently active (even if they
- * are for the same instance, as will be true on a non-STM servlet).
+ * The count of allocations that are currently active for STM servlets.
*/
protected int countAllocated = 0;
@@ -308,9 +307,7 @@
/**
- * Return the number of active allocations of this servlet, even if they
- * are all for the same instance (as will be true for servlets that do
- * not implement <code>SingleThreadModel</code>.
+ * Return the number of active allocations of this servlet.
*/
public int getCountAllocated() {
@@ -791,7 +788,6 @@
if (!singleThreadModel) {
if (log.isTraceEnabled())
log.trace(" Returning non-STM instance");
- countAllocated++;
return (instance);
}
@@ -842,7 +838,6 @@
// If not SingleThreadModel, no action is required
if (!singleThreadModel) {
- countAllocated--;
return;
}
@@ -1237,25 +1232,6 @@
return;
unloading = true;
- // Loaf a while if the current instance is allocated
- // (possibly more than once if non-STM)
- if (countAllocated > 0) {
- int nRetries = 0;
- long delay = unloadDelay / 20;
- while ((nRetries < 21) && (countAllocated > 0)) {
- if ((nRetries % 10) == 0) {
- log.info(sm.getString("standardWrapper.waiting",
- new Integer(countAllocated)));
- }
- try {
- Thread.sleep(delay);
- } catch (InterruptedException e) {
- ;
- }
- nRetries++;
- }
- }
-
PrintStream out = System.out;
if (swallowOutput) {
SystemLogHandler.startCapture();
Modified: trunk/java/org/apache/coyote/RequestGroupInfo.java
===================================================================
--- trunk/java/org/apache/coyote/RequestGroupInfo.java 2007-10-09 16:06:54 UTC (rev 302)
+++ trunk/java/org/apache/coyote/RequestGroupInfo.java 2007-10-11 00:16:16 UTC (rev 303)
@@ -50,6 +50,10 @@
}
}
+ public synchronized RequestInfo[] getRequestProcessors() {
+ return (RequestInfo[]) processors.toArray(new RequestInfo[0]);
+ }
+
public synchronized long getMaxTime() {
long maxTime=deadMaxTime;
for( int i=0; i<processors.size(); i++ ) {
Modified: trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
===================================================================
--- trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java 2007-10-09 16:06:54 UTC (rev 302)
+++ trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java 2007-10-11 00:16:16 UTC (rev 303)
@@ -201,6 +201,24 @@
log.error(sm.getString("ajpprotocol.endpoint.pauseerror"), ex);
throw ex;
}
+ // Wait for a while until all the processors are idle
+ RequestInfo[] states = cHandler.global.getRequestProcessors();
+ int retry = 0;
+ boolean done = false;
+ while (!done && retry < 20) {
+ retry++;
+ for (int i = 0; i < states.length; i++) {
+ if (states[i].getStage() == org.apache.coyote.Constants.STAGE_SERVICE) {
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ ;
+ }
+ continue;
+ }
+ }
+ done = true;
+ }
if (log.isInfoEnabled())
log.info(sm.getString("ajpprotocol.pause", getName()));
}
Modified: trunk/java/org/apache/coyote/ajp/AjpProtocol.java
===================================================================
--- trunk/java/org/apache/coyote/ajp/AjpProtocol.java 2007-10-09 16:06:54 UTC (rev 302)
+++ trunk/java/org/apache/coyote/ajp/AjpProtocol.java 2007-10-11 00:16:16 UTC (rev 303)
@@ -200,6 +200,24 @@
log.error(sm.getString("ajpprotocol.endpoint.pauseerror"), ex);
throw ex;
}
+ // Wait for a while until all the processors are idle
+ RequestInfo[] states = cHandler.global.getRequestProcessors();
+ int retry = 0;
+ boolean done = false;
+ while (!done && retry < 20) {
+ retry++;
+ for (int i = 0; i < states.length; i++) {
+ if (states[i].getStage() == org.apache.coyote.Constants.STAGE_SERVICE) {
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ ;
+ }
+ continue;
+ }
+ }
+ done = true;
+ }
if (log.isInfoEnabled())
log.info(sm.getString("ajpprotocol.pause", getName()));
}
Modified: trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11AprProtocol.java 2007-10-09 16:06:54 UTC (rev 302)
+++ trunk/java/org/apache/coyote/http11/Http11AprProtocol.java 2007-10-11 00:16:16 UTC (rev 303)
@@ -150,6 +150,24 @@
log.error(sm.getString("http11protocol.endpoint.pauseerror"), ex);
throw ex;
}
+ // Wait for a while until all the processors are idle
+ RequestInfo[] states = cHandler.global.getRequestProcessors();
+ int retry = 0;
+ boolean done = false;
+ while (!done && retry < 20) {
+ retry++;
+ for (int i = 0; i < states.length; i++) {
+ if (states[i].getStage() == org.apache.coyote.Constants.STAGE_SERVICE) {
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ ;
+ }
+ continue;
+ }
+ }
+ done = true;
+ }
if(log.isInfoEnabled())
log.info(sm.getString("http11protocol.pause", getName()));
}
Modified: trunk/java/org/apache/coyote/http11/Http11Protocol.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11Protocol.java 2007-10-09 16:06:54 UTC (rev 302)
+++ trunk/java/org/apache/coyote/http11/Http11Protocol.java 2007-10-11 00:16:16 UTC (rev 303)
@@ -216,6 +216,24 @@
log.error(sm.getString("http11protocol.endpoint.pauseerror"), ex);
throw ex;
}
+ // Wait for a while until all the processors are no longer processing requests
+ RequestInfo[] states = cHandler.global.getRequestProcessors();
+ int retry = 0;
+ boolean done = false;
+ while (!done && retry < 20) {
+ retry++;
+ for (int i = 0; i < states.length; i++) {
+ if (states[i].getStage() == org.apache.coyote.Constants.STAGE_SERVICE) {
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ ;
+ }
+ continue;
+ }
+ }
+ done = true;
+ }
if (log.isInfoEnabled())
log.info(sm.getString("http11protocol.pause", getName()));
}
17 years, 3 months
JBossWeb SVN: r302 - tags.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-10-09 12:06:54 -0400 (Tue, 09 Oct 2007)
New Revision: 302
Added:
tags/JBOSSWEB_2_1_0_CR6/
Log:
- Fix packaging glitch in CR5 in the JBoss JARs.
Copied: tags/JBOSSWEB_2_1_0_CR6 (from rev 301, trunk)
17 years, 3 months
JBossWeb SVN: r301 - trunk.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-10-09 12:00:00 -0400 (Tue, 09 Oct 2007)
New Revision: 301
Modified:
trunk/build.xml
Log:
- Fix packaging of the JBoss binary (oops).
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2007-10-09 15:27:25 UTC (rev 300)
+++ trunk/build.xml 2007-10-09 16:00:00 UTC (rev 301)
@@ -481,6 +481,7 @@
<include name="org/apache/catalina/**" />
<exclude name="org/apache/catalina/startup/catalina.properties" />
<include name="org/apache/naming/**" />
+ <include name="org/apache/comet/**" />
<include name="org/apache/coyote/**" />
<include name="org/apache/tomcat/jni/**" />
<include name="org/apache/tomcat/util/**" />
17 years, 3 months
JBossWeb SVN: r300 - tags.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-10-09 11:27:25 -0400 (Tue, 09 Oct 2007)
New Revision: 300
Added:
tags/JBOSSWEB_2_1_0_CR5/
Log:
- JBoss Web 2.1.0 CR5.
Copied: tags/JBOSSWEB_2_1_0_CR5 (from rev 299, trunk)
17 years, 3 months