JBossWeb SVN: r613 - trunk/conf.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-05-13 06:28:34 -0400 (Tue, 13 May 2008)
New Revision: 613
Modified:
trunk/conf/server.xml
Log:
- Fix typo in example.
Modified: trunk/conf/server.xml
===================================================================
--- trunk/conf/server.xml 2008-05-07 13:30:26 UTC (rev 612)
+++ trunk/conf/server.xml 2008-05-13 10:28:34 UTC (rev 613)
@@ -42,7 +42,7 @@
Documentation at /docs/config/engine.html -->
<!-- You should set jvmRoute to support load-balancing via AJP ie :
- <Engine name="Standalone" defaultHost="localhost" jvmRoute="jvm1">
+ <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
-->
<Engine name="Catalina" defaultHost="localhost">
16 years, 10 months
JBossWeb SVN: r612 - sandbox/webapps.
by jbossweb-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-05-07 09:30:26 -0400 (Wed, 07 May 2008)
New Revision: 612
Modified:
sandbox/webapps/myapp.xml
Log:
Comment out the <distributable/> it requires JBossCache in AS5.0.0CR1 (07/05/08).
Arrange the order in the file.
Modified: sandbox/webapps/myapp.xml
===================================================================
--- sandbox/webapps/myapp.xml 2008-05-06 13:18:45 UTC (rev 611)
+++ sandbox/webapps/myapp.xml 2008-05-07 13:30:26 UTC (rev 612)
@@ -10,7 +10,23 @@
<description>
Welcome to JFC test application
</description>
- <distributable/>
+<!-- <distributable/> -->
+<!-- Filters -->
+ <filter>
+ <filter-name>TestFilter</filter-name>
+ <description>Test Filter</description>
+ <filter-class>TestFilter</filter-class>
+ <init-param>
+ <param-name>test</param-name>
+ <param-value>ake</param-value>
+ </init-param>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>TestFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
<!-- Servlets -->
<servlet>
<servlet-name>MySession</servlet-name>
@@ -150,22 +166,6 @@
<url-pattern>/TestDispatch</url-pattern>
</servlet-mapping>
- <!-- Filter -->
- <filter>
- <filter-name>TestFilter</filter-name>
- <filter-class>TestFilter</filter-class>
- <description>Test Filter</description>
- <init-param>
- <param-name>test</param-name>
- <param-value>ake</param-value>
- </init-param>
- </filter>
-
- <filter-mapping>
- <filter-name>TestFilter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
-
<!-- Security testings -->
<security-constraint>
<web-resource-collection>
16 years, 10 months
JBossWeb SVN: r611 - tags.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-05-06 09:18:45 -0400 (Tue, 06 May 2008)
New Revision: 611
Added:
tags/JBOSSWEB_2_1_1_CR2/
Log:
- 2.1.1 CR2 tag.
Copied: tags/JBOSSWEB_2_1_1_CR2 (from rev 610, trunk)
16 years, 10 months
JBossWeb SVN: r610 - in trunk: java/org/apache/catalina/startup and 1 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-05-05 19:46:23 -0400 (Mon, 05 May 2008)
New Revision: 610
Modified:
trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java
trunk/java/org/apache/catalina/manager/ManagerServlet.java
trunk/java/org/apache/catalina/startup/ContextConfig.java
trunk/java/org/apache/catalina/startup/HostConfig.java
trunk/webapps/docs/changelog.xml
Log:
- Port fairly complex Tomcat patch adding multi level support to the deployer and manager.
Modified: trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java
===================================================================
--- trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java 2008-05-05 09:47:45 UTC (rev 609)
+++ trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java 2008-05-05 23:46:23 UTC (rev 610)
@@ -226,7 +226,7 @@
if (basename.equals("ROOT")) {
path = "";
} else {
- path = "/" + basename;
+ path = "/" + basename.replace('#', '/');
}
if ((host.findChild(path) != null) && !isDeployed(path)) {
Modified: trunk/java/org/apache/catalina/manager/ManagerServlet.java
===================================================================
--- trunk/java/org/apache/catalina/manager/ManagerServlet.java 2008-05-05 09:47:45 UTC (rev 609)
+++ trunk/java/org/apache/catalina/manager/ManagerServlet.java 2008-05-05 23:46:23 UTC (rev 610)
@@ -1306,6 +1306,9 @@
// Ignore
}
try {
+ if (path.lastIndexOf('/') > 0) {
+ path = "/" + path.substring(1).replace('/','#');
+ }
File war = new File(getAppBase(), getDocBase(path) + ".war");
File dir = new File(getAppBase(), getDocBase(path));
File xml = new File(configBase, getConfigFile(path) + ".xml");
@@ -1317,9 +1320,9 @@
xml.delete();
}
// Perform new deployment
- check(path);
+ check(path.replace('#','/'));
} finally {
- removeServiced(path);
+ removeServiced(path.replace('#','/'));
}
}
writer.println(sm.getString("managerServlet.undeployed",
@@ -1351,14 +1354,14 @@
/**
- * Given a context path, get the config file name.
+ * Given a context path, get the doc abse.
*/
protected String getDocBase(String path) {
String basename = null;
if (path.equals("")) {
basename = "ROOT";
} else {
- basename = path.substring(1);
+ basename = path.substring(1).replace('/', '#');
}
return (basename);
}
Modified: trunk/java/org/apache/catalina/startup/ContextConfig.java
===================================================================
--- trunk/java/org/apache/catalina/startup/ContextConfig.java 2008-05-05 09:47:45 UTC (rev 609)
+++ trunk/java/org/apache/catalina/startup/ContextConfig.java 2008-05-05 23:46:23 UTC (rev 610)
@@ -873,9 +873,13 @@
String contextPath = context.getPath();
if (contextPath.equals("")) {
contextPath = "ROOT";
+ } else {
+ if (contextPath.lastIndexOf('/') > 0) {
+ contextPath = "/" + contextPath.substring(1).replace('/','#');
+ }
}
if (docBase.toLowerCase().endsWith(".war") && !file.isDirectory() && unpackWARs) {
- URL war = new URL("jar:" + (new File(docBase)).toURL() + "!/");
+ URL war = new URL("jar:" + (new File(docBase)).toURI().toURL() + "!/");
docBase = ExpandWar.expand(host, war, contextPath);
file = new File(docBase);
docBase = file.getCanonicalPath();
@@ -888,7 +892,7 @@
File warFile = new File(docBase + ".war");
if (warFile.exists()) {
if (unpackWARs) {
- URL war = new URL("jar:" + warFile.toURL() + "!/");
+ URL war = new URL("jar:" + warFile.toURI().toURL() + "!/");
docBase = ExpandWar.expand(host, war, contextPath);
file = new File(docBase);
docBase = file.getCanonicalPath();
Modified: trunk/java/org/apache/catalina/startup/HostConfig.java
===================================================================
--- trunk/java/org/apache/catalina/startup/HostConfig.java 2008-05-05 09:47:45 UTC (rev 609)
+++ trunk/java/org/apache/catalina/startup/HostConfig.java 2008-05-05 23:46:23 UTC (rev 610)
@@ -463,14 +463,14 @@
/**
- * Given a context path, get the config file name.
+ * Given a context path, get the docBase.
*/
protected String getDocBase(String path) {
String basename = null;
if (path.equals("")) {
basename = "ROOT";
} else {
- basename = path.substring(1);
+ basename = path.substring(1).replace('/', '#');
}
return (basename);
}
@@ -503,7 +503,7 @@
File appBase = appBase();
File configBase = configBase();
String baseName = getConfigFile(name);
- String docBase = getConfigFile(name);
+ String docBase = getDocBase(name);
// Deploy XML descriptors from configBase
File xml = new File(configBase, baseName + ".xml");
@@ -699,7 +699,7 @@
if (files[i].toLowerCase().endsWith(".war") && dir.isFile()) {
// Calculate the context path and make sure it is unique
- String contextPath = "/" + files[i];
+ String contextPath = "/" + files[i].replace('#','/');
int period = contextPath.lastIndexOf(".");
if (period >= 0)
contextPath = contextPath.substring(0, period);
@@ -837,6 +837,7 @@
name = path;
}
}
+ name = name.replace('/', '#');
File docBase = new File(name);
if (!docBase.isAbsolute()) {
docBase = new File(appBase(), name);
@@ -873,7 +874,7 @@
if (dir.isDirectory()) {
// Calculate the context path and make sure it is unique
- String contextPath = "/" + files[i];
+ String contextPath = "/" + files[i].replace('#','/');
if (files[i].equals("ROOT"))
contextPath = "";
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2008-05-05 09:47:45 UTC (rev 609)
+++ trunk/webapps/docs/changelog.xml 2008-05-05 23:46:23 UTC (rev 610)
@@ -52,6 +52,9 @@
<bug>43079</bug> and <bug>43080</bug>: Move odd url-pattern warning to StandardContext so a) we catch all patterns
and b) it isn't logged to the wrong webapp. Based on a patch by John Kew. (markt)
</fix>
+ <fix>
+ <bug>44021</bug>: Add support to manger and deployer for wars and dirs that use # to denote multi-level contexts. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">
16 years, 10 months
JBossWeb SVN: r609 - in trunk: java/org/apache/catalina/deploy and 3 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-05-05 05:47:45 -0400 (Mon, 05 May 2008)
New Revision: 609
Modified:
trunk/java/org/apache/catalina/core/StandardContext.java
trunk/java/org/apache/catalina/deploy/SecurityCollection.java
trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
trunk/webapps/docs/changelog.xml
trunk/webapps/docs/config/http.xml
Log:
- Port 3 minor Tomcat patches.
Modified: trunk/java/org/apache/catalina/core/StandardContext.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardContext.java 2008-05-03 16:55:40 UTC (rev 608)
+++ trunk/java/org/apache/catalina/core/StandardContext.java 2008-05-05 09:47:45 UTC (rev 609)
@@ -5048,7 +5048,7 @@
// Acquire (or calculate) the work directory path
String workDir = getWorkDir();
- if (workDir == null) {
+ if (workDir == null || workDir.length() == 0) {
// Retrieve our parent (normally a host) name
String hostName = null;
@@ -5134,20 +5134,40 @@
return (false);
}
if (urlPattern.startsWith("*.")) {
- if (urlPattern.indexOf('/') < 0)
+ if (urlPattern.indexOf('/') < 0) {
+ checkUnusualURLPattern(urlPattern);
return (true);
- else
+ } else {
return (false);
+ }
}
if ( (urlPattern.startsWith("/")) &&
- (urlPattern.indexOf("*.") < 0))
+ (urlPattern.indexOf("*.") < 0)) {
+ checkUnusualURLPattern(urlPattern);
return (true);
- else
+ } else {
return (false);
+ }
}
+ /**
+ * Check for unusual but valid <code><url-pattern></code>s.
+ * See Bugzilla 34805, 43079 & 43080
+ */
+ private void checkUnusualURLPattern(String urlPattern) {
+ if (log.isInfoEnabled()) {
+ if(urlPattern.endsWith("*") && (urlPattern.length() < 2 ||
+ urlPattern.charAt(urlPattern.length()-2) != '/')) {
+ log.info("Suspicious url pattern: \"" + urlPattern + "\"" +
+ " in context [" + getName() + "] - see" +
+ " section SRV.11.2 of the Servlet specification" );
+ }
+ }
+ }
+
+
// ------------------------------------------------------------- Operations
Modified: trunk/java/org/apache/catalina/deploy/SecurityCollection.java
===================================================================
--- trunk/java/org/apache/catalina/deploy/SecurityCollection.java 2008-05-03 16:55:40 UTC (rev 608)
+++ trunk/java/org/apache/catalina/deploy/SecurityCollection.java 2008-05-05 09:47:45 UTC (rev 609)
@@ -19,14 +19,11 @@
package org.apache.catalina.deploy;
-import org.apache.catalina.util.RequestUtil;
-
-import org.jboss.logging.Logger;
-import org.jboss.logging.Logger;
-
import java.io.Serializable;
+import org.apache.catalina.util.RequestUtil;
+
/**
* Representation of a web resource collection for a web application's security
* constraint, as represented in a <code><web-resource-collection></code>
@@ -44,9 +41,7 @@
public class SecurityCollection implements Serializable {
- private static Logger log = Logger.getLogger(SecurityCollection.class);
-
// ----------------------------------------------------------- Constructors
@@ -188,17 +183,6 @@
if (pattern == null)
return;
- // Bugzilla 34805: add friendly warning.
- if(pattern.endsWith("*")) {
- if (pattern.charAt(pattern.length()-1) != '/') {
- if (log.isDebugEnabled()) {
- log.warn("Suspicious url pattern: \"" + pattern + "\"" +
- " - see http://java.sun.com/aboutJava/communityprocess/first/jsr053/servlet23_PFD..." +
- " section 11.2" );
- }
- }
- }
-
pattern = RequestUtil.URLDecode(pattern);
String results[] = new String[patterns.length + 1];
for (int i = 0; i < patterns.length; i++) {
Modified: trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
===================================================================
--- trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java 2008-05-03 16:55:40 UTC (rev 608)
+++ trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java 2008-05-05 09:47:45 UTC (rev 609)
@@ -310,7 +310,7 @@
InputStream istream = null;
try {
ks = KeyStore.getInstance(type);
- if(! "PKCS11".equalsIgnoreCase(type) ) {
+ if (!("PKCS11".equalsIgnoreCase(type) || "".equalsIgnoreCase(path))) {
File keyStoreFile = new File(path);
if (!keyStoreFile.isAbsolute()) {
keyStoreFile = new File(System.getProperty("catalina.base"),
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2008-05-03 16:55:40 UTC (rev 608)
+++ trunk/webapps/docs/changelog.xml 2008-05-05 09:47:45 UTC (rev 609)
@@ -44,6 +44,14 @@
<bug>43150</bug>: Improve URL conversion so that some more special chars can be used
in the installation path. (markt)
</fix>
+ <fix>
+ <bug>43117</bug>: Setting an empty workDir can delete all of CATALINA_HOME.
+ Patch provided by Takayuki Kaneko. (markt)
+ </fix>
+ <fix>
+ <bug>43079</bug> and <bug>43080</bug>: Move odd url-pattern warning to StandardContext so a) we catch all patterns
+ and b) it isn't logged to the wrong webapp. Based on a patch by John Kew. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">
@@ -56,6 +64,10 @@
<bug>43191</bug>: No way to turn off compression for some mime-types. Based on a patch
by Len Popp. (markt)
</fix>
+ <fix>
+ <bug>43094</bug>: Support keystoreTypes that don't need a file. Based on a patch
+ by Bruno Harbulot. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">
Modified: trunk/webapps/docs/config/http.xml
===================================================================
--- trunk/webapps/docs/config/http.xml 2008-05-03 16:55:40 UTC (rev 608)
+++ trunk/webapps/docs/config/http.xml 2008-05-05 09:47:45 UTC (rev 609)
@@ -440,7 +440,9 @@
<p>The pathname of the keystore file where you have stored the
server certificate to be loaded. By default, the pathname is
the file "<code>.keystore</code>" in the operating system home
- directory of the user that is running JBoss Web.</p>
+ directory of the user that is running JBoss Web. If your
+ <code>keystoreType</code> doesn't need a file use <code>""</code>
+ (empty string) for this parameter.</p>
</attribute>
<attribute name="keystorePass" required="false">
16 years, 10 months
JBossWeb SVN: r608 - in trunk: webapps/docs and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-05-03 12:55:40 -0400 (Sat, 03 May 2008)
New Revision: 608
Modified:
trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
trunk/java/org/apache/coyote/http11/Http11Processor.java
trunk/webapps/docs/changelog.xml
Log:
- Allow disabling compression for the default mime types.
Modified: trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 2008-05-02 21:56:55 UTC (rev 607)
+++ trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 2008-05-03 16:55:40 UTC (rev 608)
@@ -485,8 +485,8 @@
*/
public void setCompressableMimeTypes(String compressableMimeTypes) {
if (compressableMimeTypes != null) {
+ this.compressableMimeTypes = null;
StringTokenizer st = new StringTokenizer(compressableMimeTypes, ",");
-
while (st.hasMoreTokens()) {
addCompressableMimeType(st.nextToken().trim());
}
Modified: trunk/java/org/apache/coyote/http11/Http11Processor.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11Processor.java 2008-05-02 21:56:55 UTC (rev 607)
+++ trunk/java/org/apache/coyote/http11/Http11Processor.java 2008-05-03 16:55:40 UTC (rev 608)
@@ -432,8 +432,8 @@
*/
public void setCompressableMimeTypes(String compressableMimeTypes) {
if (compressableMimeTypes != null) {
+ this.compressableMimeTypes = null;
StringTokenizer st = new StringTokenizer(compressableMimeTypes, ",");
-
while (st.hasMoreTokens()) {
addCompressableMimeType(st.nextToken().trim());
}
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2008-05-02 21:56:55 UTC (rev 607)
+++ trunk/webapps/docs/changelog.xml 2008-05-03 16:55:40 UTC (rev 608)
@@ -38,7 +38,7 @@
</fix>
<fix>
<bug>43343</bug>: Correctly handle the case where a request arrives for a session
- we are in the middle of persisting. (remm)
+ we are in the middle of persisting. (markt)
</fix>
<fix>
<bug>43150</bug>: Improve URL conversion so that some more special chars can be used
@@ -52,6 +52,10 @@
<jboss-jira>JBCTS-779</jboss-jira>: Exception types for invalid charset (should return the
java.io exception rather than the java.nio one). (remm)
</fix>
+ <fix>
+ <bug>43191</bug>: No way to turn off compression for some mime-types. Based on a patch
+ by Len Popp. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">
16 years, 10 months
JBossWeb SVN: r607 - trunk/java/org/apache/coyote/http11.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-05-02 17:56:55 -0400 (Fri, 02 May 2008)
New Revision: 607
Modified:
trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
trunk/java/org/apache/coyote/http11/Http11Processor.java
Log:
- Port patch: very small code cleanup.
Modified: trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 2008-05-02 16:47:59 UTC (rev 606)
+++ trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 2008-05-02 21:56:55 UTC (rev 607)
@@ -513,7 +513,7 @@
*/
protected void addFilter(String className) {
try {
- Class clazz = Class.forName(className);
+ Class<?> clazz = Class.forName(className);
Object obj = clazz.newInstance();
if (obj instanceof InputFilter) {
inputBuffer.addFilter((InputFilter) obj);
@@ -573,22 +573,6 @@
/**
- * General use method
- *
- * @param sArray the StringArray
- * @param value string
- */
- private boolean inStringArray(String sArray[], String value) {
- for (int i = 0; i < sArray.length; i++) {
- if (sArray[i].equals(value)) {
- return true;
- }
- }
- return false;
- }
-
-
- /**
* Checks if any entry in the string array starts with the specified value
*
* @param sArray the StringArray
@@ -1208,9 +1192,7 @@
}
// User key size
sslO = new Integer(SSLSocket.getInfoI(socket, SSL.SSL_INFO_CIPHER_USEKEYSIZE));
- if (sslO != null) {
- request.setAttribute(AprEndpoint.KEY_SIZE_KEY, sslO);
- }
+ request.setAttribute(AprEndpoint.KEY_SIZE_KEY, sslO);
// SSL session ID
sslO = SSLSocket.getInfoS(socket, SSL.SSL_INFO_SESSION_ID);
if (sslO != null) {
@@ -1563,7 +1545,7 @@
int port = 0;
int mult = 1;
for (int i = valueL - 1; i > colonPos; i--) {
- int charValue = HexUtils.DEC[(int) valueB[i + valueS]];
+ int charValue = HexUtils.DEC[valueB[i + valueS]];
if (charValue == -1) {
// Invalid character
error = true;
Modified: trunk/java/org/apache/coyote/http11/Http11Processor.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11Processor.java 2008-05-02 16:47:59 UTC (rev 606)
+++ trunk/java/org/apache/coyote/http11/Http11Processor.java 2008-05-02 21:56:55 UTC (rev 607)
@@ -460,7 +460,7 @@
*/
protected void addFilter(String className) {
try {
- Class clazz = Class.forName(className);
+ Class<?> clazz = Class.forName(className);
Object obj = clazz.newInstance();
if (obj instanceof InputFilter) {
inputBuffer.addFilter((InputFilter) obj);
@@ -520,22 +520,6 @@
/**
- * General use method
- *
- * @param sArray the StringArray
- * @param value string
- */
- private boolean inStringArray(String sArray[], String value) {
- for (int i = 0; i < sArray.length; i++) {
- if (sArray[i].equals(value)) {
- return true;
- }
- }
- return false;
- }
-
-
- /**
* Checks if any entry in the string array starts with the specified value
*
* @param sArray the StringArray
@@ -1380,7 +1364,7 @@
int port = 0;
int mult = 1;
for (int i = valueL - 1; i > colonPos; i--) {
- int charValue = HexUtils.DEC[(int) valueB[i + valueS]];
+ int charValue = HexUtils.DEC[valueB[i + valueS]];
if (charValue == -1) {
// Invalid character
error = true;
@@ -1549,9 +1533,9 @@
// Add date header
String date = null;
if (org.apache.coyote.Constants.IS_SECURITY_ENABLED){
- date = (String)AccessController.doPrivileged(
- new PrivilegedAction() {
- public Object run(){
+ date = AccessController.doPrivileged(
+ new PrivilegedAction<String>() {
+ public String run(){
return FastHttpDateFormat.getCurrentDate();
}
}
16 years, 10 months
JBossWeb SVN: r606 - in trunk: java/org/apache/catalina/connector and 7 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-05-02 12:47:59 -0400 (Fri, 02 May 2008)
New Revision: 606
Modified:
trunk/bin/catalina.sh
trunk/java/org/apache/catalina/connector/OutputBuffer.java
trunk/java/org/apache/catalina/session/PersistentManagerBase.java
trunk/java/org/apache/catalina/startup/ClassLoaderFactory.java
trunk/java/org/apache/catalina/startup/HostConfig.java
trunk/java/org/apache/catalina/valves/PersistentValve.java
trunk/java/org/apache/el/lang/ELSupport.java
trunk/java/org/apache/jasper/JspCompilationContext.java
trunk/java/org/apache/tomcat/util/buf/B2CConverter.java
trunk/java/org/apache/tomcat/util/buf/C2BConverter.java
trunk/java/org/apache/tomcat/util/buf/UTF8Decoder.java
trunk/webapps/docs/aio.xml
trunk/webapps/docs/changelog.xml
Log:
- Port Tomcat fixes.
- Some minor regressions (EL glitch + switch to NIO for character handling).
Modified: trunk/bin/catalina.sh
===================================================================
--- trunk/bin/catalina.sh 2008-05-02 16:46:39 UTC (rev 605)
+++ trunk/bin/catalina.sh 2008-05-02 16:47:59 UTC (rev 606)
@@ -181,7 +181,8 @@
# Set juli LogManager if it is present
if [ -r "$CATALINA_BASE"/conf/logging.properties ]; then
- JAVA_OPTS="$JAVA_OPTS "-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" "-Djava.util.logging.config.file="$CATALINA_BASE/conf/logging.properties"
+ JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
+ LOGGING_CONFIG="-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties"
fi
# ----- Execute The Requested Command -----------------------------------------
@@ -224,7 +225,7 @@
if [ "$1" = "-security" ] ; then
echo "Using Security Manager"
shift
- exec "$_RUNJDB" $JAVA_OPTS $CATALINA_OPTS \
+ exec "$_RUNJDB" $JAVA_OPTS "$LOGGING_CONFIG" $CATALINA_OPTS \
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
-sourcepath "$CATALINA_HOME"/../../java \
-Djava.security.manager \
@@ -234,7 +235,7 @@
-Djava.io.tmpdir="$CATALINA_TMPDIR" \
org.apache.catalina.startup.Bootstrap "$@" start
else
- exec "$_RUNJDB" $JAVA_OPTS $CATALINA_OPTS \
+ exec "$_RUNJDB" $JAVA_OPTS "$LOGGING_CONFIG" $CATALINA_OPTS \
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
-sourcepath "$CATALINA_HOME"/../../java \
-Dcatalina.base="$CATALINA_BASE" \
@@ -250,7 +251,7 @@
if [ "$1" = "-security" ] ; then
echo "Using Security Manager"
shift
- exec "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
+ exec "$_RUNJAVA" $JAVA_OPTS "$LOGGING_CONFIG" $CATALINA_OPTS \
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
-Djava.security.manager \
-Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
@@ -259,7 +260,7 @@
-Djava.io.tmpdir="$CATALINA_TMPDIR" \
org.apache.catalina.startup.Bootstrap "$@" start
else
- exec "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
+ exec "$_RUNJAVA" $JAVA_OPTS "$LOGGING_CONFIG" $CATALINA_OPTS \
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
-Dcatalina.base="$CATALINA_BASE" \
-Dcatalina.home="$CATALINA_HOME" \
@@ -274,7 +275,7 @@
if [ "$1" = "-security" ] ; then
echo "Using Security Manager"
shift
- "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
+ "$_RUNJAVA" $JAVA_OPTS "$LOGGING_CONFIG" $CATALINA_OPTS \
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
-Djava.security.manager \
-Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
@@ -288,7 +289,7 @@
echo $! > $CATALINA_PID
fi
else
- "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
+ "$_RUNJAVA" $JAVA_OPTS "$LOGGING_CONFIG" $CATALINA_OPTS \
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
-Dcatalina.base="$CATALINA_BASE" \
-Dcatalina.home="$CATALINA_HOME" \
@@ -353,4 +354,4 @@
echo " version What version of tomcat are you running?"
exit 1
-fi
+fi
\ No newline at end of file
Modified: trunk/java/org/apache/catalina/connector/OutputBuffer.java
===================================================================
--- trunk/java/org/apache/catalina/connector/OutputBuffer.java 2008-05-02 16:46:39 UTC (rev 605)
+++ trunk/java/org/apache/catalina/connector/OutputBuffer.java 2008-05-02 16:47:59 UTC (rev 606)
@@ -458,7 +458,6 @@
public void realWriteChars(char buf[], int off, int len)
throws IOException {
- charsWritten += len;
outputCharChunk.setChars(buf, off, len);
while (outputCharChunk.getLength() > 0) {
conv.convert(outputCharChunk, bb);
@@ -476,6 +475,7 @@
return;
cb.append((char) c);
+ charsWritten ++;
}
@@ -495,6 +495,7 @@
return;
cb.append(c, off, len);
+ charsWritten += len;
}
@@ -511,6 +512,7 @@
if (s == null)
s = "null";
cb.append(s, off, len);
+ charsWritten += len;
}
@@ -524,6 +526,7 @@
if (s == null)
s = "null";
cb.append(s);
+ charsWritten += s.length();
}
@@ -608,7 +611,7 @@
}
public int getContentWritten() {
- long size = bytesWritten + charsWritten ;
+ long size = bytesWritten + charsWritten;
if (size < Integer.MAX_VALUE) {
return (int) size;
}
Modified: trunk/java/org/apache/catalina/session/PersistentManagerBase.java
===================================================================
--- trunk/java/org/apache/catalina/session/PersistentManagerBase.java 2008-05-02 16:46:39 UTC (rev 605)
+++ trunk/java/org/apache/catalina/session/PersistentManagerBase.java 2008-05-02 16:47:59 UTC (rev 606)
@@ -212,10 +212,10 @@
/**
- * Indicates how many seconds old a session can get, after its last use in a
- * request, before it should be backed up to the store. -1 means sessions
- * are not backed up.
- */
+ * Indicates how many seconds old a session can get, after its last use in a
+ * request, before it should be backed up to the store. -1 means sessions
+ * are not backed up.
+ */
public int getMaxIdleBackup() {
return maxIdleBackup;
@@ -315,13 +315,13 @@
/**
- * Set the Container with which this Manager has been associated. If it is a
- * Context (the usual case), listen for changes to the session timeout
- * property.
- *
- * @param container
- * The associated Container
- */
+ * Set the Container with which this Manager has been associated. If it is a
+ * Context (the usual case), listen for changes to the session timeout
+ * property.
+ *
+ * @param container
+ * The associated Container
+ */
public void setContainer(Container container) {
// De-register from the old Container (if any)
@@ -535,8 +535,8 @@
/**
* Implements the Manager interface, direct call to processExpires and processPersistenceChecks
*/
- public void processExpires() {
-
+ public void processExpires() {
+
long timeNow = System.currentTimeMillis();
Session sessions[] = findSessions();
int expireHere = 0 ;
@@ -557,8 +557,8 @@
if(log.isDebugEnabled())
log.debug("End expire sessions " + getName() + " processingTime " + (timeEnd - timeNow) + " expired sessions: " + expireHere);
processingTime += (timeEnd - timeNow);
-
- }
+
+ }
/**
@@ -590,6 +590,23 @@
public Session findSession(String id) throws IOException {
Session session = super.findSession(id);
+ // OK, at this point, we're not sure if another thread is trying to
+ // remove the session or not so the only way around this is to lock it
+ // (or attempt to) and then try to get it by this session id again. If
+ // the other code ran swapOut, then we should get a null back during
+ // this run, and if not, we lock it out so we can access the session
+ // safely.
+ if(session != null) {
+ synchronized(session){
+ session = super.findSession(session.getIdInternal());
+ if(session != null){
+ // To keep any external calling code from messing up the
+ // concurrency.
+ session.access();
+ session.endAccess();
+ }
+ }
+ }
if (session != null)
return (session);
@@ -1024,24 +1041,24 @@
long timeNow = System.currentTimeMillis();
// Swap out all sessions idle longer than maxIdleSwap
- // FIXME: What's preventing us from mangling a session during
- // a request?
if (maxIdleSwap >= 0) {
for (int i = 0; i < sessions.length; i++) {
StandardSession session = (StandardSession) sessions[i];
- if (!session.isValid())
- continue;
- int timeIdle = // Truncate, do not round up
- (int) ((timeNow - session.getLastAccessedTime()) / 1000L);
- if (timeIdle > maxIdleSwap && timeIdle > minIdleSwap) {
- if (log.isDebugEnabled())
- log.debug(sm.getString
- ("persistentManager.swapMaxIdle",
- session.getIdInternal(), new Integer(timeIdle)));
- try {
- swapOut(session);
- } catch (IOException e) {
- ; // This is logged in writeSession()
+ synchronized (session) {
+ if (!session.isValid())
+ continue;
+ int timeIdle = // Truncate, do not round up
+ (int) ((timeNow - session.getLastAccessedTime()) / 1000L);
+ if (timeIdle > maxIdleSwap && timeIdle > minIdleSwap) {
+ if (log.isDebugEnabled())
+ log.debug(sm.getString
+ ("persistentManager.swapMaxIdle",
+ session.getIdInternal(), new Integer(timeIdle)));
+ try {
+ swapOut(session);
+ } catch (IOException e) {
+ ; // This is logged in writeSession()
+ }
}
}
}
@@ -1073,19 +1090,21 @@
long timeNow = System.currentTimeMillis();
for (int i = 0; i < sessions.length && toswap > 0; i++) {
- int timeIdle = // Truncate, do not round up
- (int) ((timeNow - sessions[i].getLastAccessedTime()) / 1000L);
- if (timeIdle > minIdleSwap) {
- if(log.isDebugEnabled())
- log.debug(sm.getString
- ("persistentManager.swapTooManyActive",
- sessions[i].getIdInternal(), new Integer(timeIdle)));
- try {
- swapOut(sessions[i]);
- } catch (IOException e) {
- ; // This is logged in writeSession()
+ synchronized (sessions[i]) {
+ int timeIdle = // Truncate, do not round up
+ (int) ((timeNow - sessions[i].getLastAccessedTime()) / 1000L);
+ if (timeIdle > minIdleSwap) {
+ if(log.isDebugEnabled())
+ log.debug(sm.getString
+ ("persistentManager.swapTooManyActive",
+ sessions[i].getIdInternal(), new Integer(timeIdle)));
+ try {
+ swapOut(sessions[i]);
+ } catch (IOException e) {
+ ; // This is logged in writeSession()
+ }
+ toswap--;
}
- toswap--;
}
}
@@ -1107,20 +1126,22 @@
if (maxIdleBackup >= 0) {
for (int i = 0; i < sessions.length; i++) {
StandardSession session = (StandardSession) sessions[i];
- if (!session.isValid())
- continue;
- int timeIdle = // Truncate, do not round up
- (int) ((timeNow - session.getLastAccessedTime()) / 1000L);
- if (timeIdle > maxIdleBackup) {
- if (log.isDebugEnabled())
- log.debug(sm.getString
- ("persistentManager.backupMaxIdle",
- session.getIdInternal(), new Integer(timeIdle)));
-
- try {
- writeSession(session);
- } catch (IOException e) {
- ; // This is logged in writeSession()
+ synchronized (session) {
+ if (!session.isValid())
+ continue;
+ int timeIdle = // Truncate, do not round up
+ (int) ((timeNow - session.getLastAccessedTime()) / 1000L);
+ if (timeIdle > maxIdleBackup) {
+ if (log.isDebugEnabled())
+ log.debug(sm.getString
+ ("persistentManager.backupMaxIdle",
+ session.getIdInternal(), new Integer(timeIdle)));
+
+ try {
+ writeSession(session);
+ } catch (IOException e) {
+ ; // This is logged in writeSession()
+ }
}
}
}
Modified: trunk/java/org/apache/catalina/startup/ClassLoaderFactory.java
===================================================================
--- trunk/java/org/apache/catalina/startup/ClassLoaderFactory.java 2008-05-02 16:46:39 UTC (rev 605)
+++ trunk/java/org/apache/catalina/startup/ClassLoaderFactory.java 2008-05-02 16:47:59 UTC (rev 606)
@@ -121,7 +121,7 @@
if (!file.exists() || !file.canRead())
continue;
file = new File(file.getCanonicalPath() + File.separator);
- URL url = file.toURL();
+ URL url = file.toURI().toURL();
if (log.isDebugEnabled())
log.debug(" Including directory " + url);
list.add(url);
@@ -143,7 +143,7 @@
File file = new File(directory, filenames[j]);
if (log.isDebugEnabled())
log.debug(" Including jar file " + file.getAbsolutePath());
- URL url = file.toURL();
+ URL url = file.toURI().toURL();
list.add(url);
}
}
@@ -201,7 +201,7 @@
if (!directory.exists() || !directory.isDirectory() ||
!directory.canRead())
continue;
- URL url = directory.toURL();
+ URL url = directory.toURI().toURL();
if (log.isDebugEnabled())
log.debug(" Including directory " + url);
list.add(url);
@@ -210,7 +210,7 @@
file = new File(file.getCanonicalPath());
if (!file.exists() || !file.canRead())
continue;
- URL url = file.toURL();
+ URL url = file.toURI().toURL();
if (log.isDebugEnabled())
log.debug(" Including jar file " + url);
list.add(url);
@@ -234,7 +234,7 @@
if (log.isDebugEnabled())
log.debug(" Including glob jar file "
+ file.getAbsolutePath());
- URL url = file.toURL();
+ URL url = file.toURI().toURL();
list.add(url);
}
}
Modified: trunk/java/org/apache/catalina/startup/HostConfig.java
===================================================================
--- trunk/java/org/apache/catalina/startup/HostConfig.java 2008-05-02 16:46:39 UTC (rev 605)
+++ trunk/java/org/apache/catalina/startup/HostConfig.java 2008-05-02 16:47:59 UTC (rev 606)
@@ -696,7 +696,7 @@
if (files[i].equalsIgnoreCase("WEB-INF"))
continue;
File dir = new File(appBase, files[i]);
- if (files[i].toLowerCase().endsWith(".war")) {
+ if (files[i].toLowerCase().endsWith(".war") && dir.isFile()) {
// Calculate the context path and make sure it is unique
String contextPath = "/" + files[i];
Modified: trunk/java/org/apache/catalina/valves/PersistentValve.java
===================================================================
--- trunk/java/org/apache/catalina/valves/PersistentValve.java 2008-05-02 16:46:39 UTC (rev 605)
+++ trunk/java/org/apache/catalina/valves/PersistentValve.java 2008-05-02 16:47:59 UTC (rev 606)
@@ -30,16 +30,18 @@
import org.apache.catalina.Store;
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
-import org.apache.catalina.core.StandardHost;
import org.apache.catalina.session.PersistentManager;
import org.apache.catalina.util.StringManager;
/**
- * Valve that implements the default basic behavior for the
- * <code>StandardHost</code> container implementation.
+ * Valve that implements per-request session persistence. It is intended to be
+ * used with non-sticky load-balancers.
* <p>
* <b>USAGE CONSTRAINT</b>: To work correctly it requires a PersistentManager.
+ * <p>
+ * <b>USAGE CONSTRAINT</b>: To work correctly it assumes only one request exists
+ * per session at any one time.
*
* @author Jean-Frederic Clere
* @version $Revision$ $Date$
@@ -97,7 +99,6 @@
throws IOException, ServletException {
// Select the Context to be used for this Request
- StandardHost host = (StandardHost) getContainer();
Context context = request.getContext();
if (context == null) {
response.sendError
Modified: trunk/java/org/apache/el/lang/ELSupport.java
===================================================================
--- trunk/java/org/apache/el/lang/ELSupport.java 2008-05-02 16:46:39 UTC (rev 605)
+++ trunk/java/org/apache/el/lang/ELSupport.java 2008-05-02 16:47:59 UTC (rev 606)
@@ -343,7 +343,7 @@
public final static Object coerceToType(final Object obj, final Class type)
throws IllegalArgumentException {
if (type == null || Object.class.equals(type) ||
- type.equals(obj.getClass())) {
+ (obj != null && type.equals(obj.getClass()))) {
return obj;
}
if (String.class.equals(type)) {
Modified: trunk/java/org/apache/jasper/JspCompilationContext.java
===================================================================
--- trunk/java/org/apache/jasper/JspCompilationContext.java 2008-05-02 16:46:39 UTC (rev 605)
+++ trunk/java/org/apache/jasper/JspCompilationContext.java 2008-05-02 16:47:59 UTC (rev 606)
@@ -654,19 +654,18 @@
protected void createOutputDir() {
String path = null;
if (isTagFile()) {
- String tagName = tagInfo.getTagClassName();
- path = tagName.replace('.', '/');
- path = path.substring(0, path.lastIndexOf('/'));
+ String tagName = tagInfo.getTagClassName();
+ path = tagName.replace('.', File.separatorChar);
+ path = path.substring(0, path.lastIndexOf(File.separatorChar));
} else {
- path = getServletPackageName().replace('.', '/');
- }
+ path = getServletPackageName().replace('.',File.separatorChar);
+ }
// Append servlet or tag handler path to scratch dir
try {
- baseUrl = options.getScratchDir().toURL();
- String outUrlString = baseUrl.toString() + '/' + path;
- URL outUrl = new URL(outUrlString);
- outputDir = outUrl.getFile() + File.separator;
+ File base = options.getScratchDir();
+ baseUrl = base.toURI().toURL();
+ outputDir = base.getAbsolutePath() + File.separator + path + File.separator;
if (!makeOutputDir()) {
throw new IllegalStateException(Localizer.getMessage("jsp.error.outputfolder"));
}
Modified: trunk/java/org/apache/tomcat/util/buf/B2CConverter.java
===================================================================
--- trunk/java/org/apache/tomcat/util/buf/B2CConverter.java 2008-05-02 16:46:39 UTC (rev 605)
+++ trunk/java/org/apache/tomcat/util/buf/B2CConverter.java 2008-05-02 16:47:59 UTC (rev 606)
@@ -19,11 +19,13 @@
package org.apache.tomcat.util.buf;
import java.io.IOException;
+import java.io.UnsupportedEncodingException;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CoderResult;
+import java.nio.charset.UnsupportedCharsetException;
/**
* NIO based character decoder.
@@ -47,8 +49,13 @@
/**
* Create a decoder for the specified charset.
*/
- public B2CConverter(String charset) {
- decoder = Charset.forName(charset).newDecoder();
+ public B2CConverter(String charset)
+ throws IOException {
+ try {
+ decoder = Charset.forName(charset).newDecoder();
+ } catch (UnsupportedCharsetException e) {
+ throw new UnsupportedEncodingException(charset);
+ }
byte[] left = new byte[4];
leftovers = ByteBuffer.wrap(left);
}
Modified: trunk/java/org/apache/tomcat/util/buf/C2BConverter.java
===================================================================
--- trunk/java/org/apache/tomcat/util/buf/C2BConverter.java 2008-05-02 16:46:39 UTC (rev 605)
+++ trunk/java/org/apache/tomcat/util/buf/C2BConverter.java 2008-05-02 16:47:59 UTC (rev 606)
@@ -18,11 +18,13 @@
package org.apache.tomcat.util.buf;
import java.io.IOException;
+import java.io.UnsupportedEncodingException;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.Charset;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CoderResult;
+import java.nio.charset.UnsupportedCharsetException;
/**
* NIO based character encoder.
@@ -41,8 +43,13 @@
/**
* Create an encoder for the specified charset.
*/
- public C2BConverter(String charset) {
- encoder = Charset.forName(charset).newEncoder();
+ public C2BConverter(String charset)
+ throws IOException {
+ try {
+ encoder = Charset.forName(charset).newEncoder();
+ } catch (UnsupportedCharsetException e) {
+ throw new UnsupportedEncodingException(charset);
+ }
}
/**
Modified: trunk/java/org/apache/tomcat/util/buf/UTF8Decoder.java
===================================================================
--- trunk/java/org/apache/tomcat/util/buf/UTF8Decoder.java 2008-05-02 16:46:39 UTC (rev 605)
+++ trunk/java/org/apache/tomcat/util/buf/UTF8Decoder.java 2008-05-02 16:47:59 UTC (rev 606)
@@ -39,7 +39,8 @@
// may have state !!
- public UTF8Decoder() {
+ public UTF8Decoder()
+ throws IOException {
super("UTF-8");
}
Modified: trunk/webapps/docs/aio.xml
===================================================================
--- trunk/webapps/docs/aio.xml 2008-05-02 16:46:39 UTC (rev 605)
+++ trunk/webapps/docs/aio.xml 2008-05-02 16:47:59 UTC (rev 606)
@@ -333,10 +333,11 @@
<p>
Any servlet can instruct JBoss Web to perform a sendfile call by setting the appropriate
- response attributes. When using sendfile, it is best to ensure that neither the
+ response attributes. It is also necessary to correctly set the content length
+ for the response. When using sendfile, it is best to ensure that neither the
request or response have been wrapped, since as the response body will be sent later
by the connector itself, it cannot be filtered. Other than setting the 3 needed
- response attributes, the servlet should not send any response data, but it may use
+ request attributes, the servlet should not send any response data, but it may use
any method which will result in modifying the response header (like setting cookies).
</p>
@@ -344,7 +345,7 @@
<li>org.apache.tomcat.sendfile.filename: Canonical filename of the file which will be sent as
a String</li>
<li>org.apache.tomcat.sendfile.start: Start offset as a Long</li>
- <li>org.apache.tomcat.sendfile.start: End offset as a Long</li>
+ <li>org.apache.tomcat.sendfile.end: End offset as a Long</li>
</ul>
</section>
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2008-05-02 16:46:39 UTC (rev 605)
+++ trunk/webapps/docs/changelog.xml 2008-05-02 16:47:59 UTC (rev 606)
@@ -16,6 +16,53 @@
<body>
+<section name="JBoss Web 2.1.1.CR2 (remm)">
+ <subsection name="General">
+ <changelog>
+ <update>
+ Add Maven target to the dist script. (remm)
+ </update>
+ <fix>
+ <bug>43578</bug>: Tomcat doesn't start if installation path contains a space.
+ Patch submitted by Ray Sauers. (markt)
+ </fix>
+ </changelog>
+ </subsection>
+ <subsection name="Catalina">
+ <changelog>
+ <fix>
+ <bug>43142</bug>: Directory xxx.war is not always a war. (markt)
+ </fix>
+ <fix>
+ <jboss-jira>JBCTS-778</jboss-jira>: Fix updating charsWritten. (remm)
+ </fix>
+ <fix>
+ <bug>43343</bug>: Correctly handle the case where a request arrives for a session
+ we are in the middle of persisting. (remm)
+ </fix>
+ <fix>
+ <bug>43150</bug>: Improve URL conversion so that some more special chars can be used
+ in the installation path. (markt)
+ </fix>
+ </changelog>
+ </subsection>
+ <subsection name="Coyote">
+ <changelog>
+ <fix>
+ <jboss-jira>JBCTS-779</jboss-jira>: Exception types for invalid charset (should return the
+ java.io exception rather than the java.nio one). (remm)
+ </fix>
+ </changelog>
+ </subsection>
+ <subsection name="Jasper">
+ <changelog>
+ <fix>
+ <jboss-jira>JBCTS-776</jboss-jira>: NPE regression in EL type handling. (remm)
+ </fix>
+ </changelog>
+ </subsection>
+</section>
+
<section name="JBoss Web 2.1.1.CR1 (remm)">
<subsection name="General">
<changelog>
16 years, 10 months
JBossWeb SVN: r605 - trunk/java/org/jboss/web/cluster.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-05-02 12:46:39 -0400 (Fri, 02 May 2008)
New Revision: 605
Modified:
trunk/java/org/jboss/web/cluster/ClusterListener.java
Log:
- Small WIP.
Modified: trunk/java/org/jboss/web/cluster/ClusterListener.java
===================================================================
--- trunk/java/org/jboss/web/cluster/ClusterListener.java 2008-04-30 00:49:07 UTC (rev 604)
+++ trunk/java/org/jboss/web/cluster/ClusterListener.java 2008-05-02 16:46:39 UTC (rev 605)
@@ -152,6 +152,8 @@
Service[] services = ((Server) source).findServices();
for (int i = 0; i < services.length; i++) {
services[i].getContainer().removeContainerListener(this);
+ ((Lifecycle) services[i].getContainer()).removeLifecycleListener(this);
+ removeAll((Engine) services[i].getContainer());
Container[] children = services[i].getContainer().findChildren();
for (int j = 0; j < children.length; j++) {
children[j].removeContainerListener(this);
@@ -203,6 +205,16 @@
}
+ protected void removeAll(Engine engine) {
+ System.out.println("Stop: " + engine.getName());
+ // FIXME: send STATUS
+ HashMap<String, String> parameters = new HashMap<String, String>();
+ parameters.put("JVMRoute", engine.getJvmRoute());
+
+ // FIXME: Send REMOVE-APP * request
+ }
+
+
protected void status(Engine engine) {
System.out.println("Status: " + engine.getName());
// FIXME: send STATUS
@@ -210,8 +222,7 @@
HashMap<String, String> parameters = new HashMap<String, String>();
parameters.put("JVMRoute", engine.getJvmRoute());
- // Send STATUS request
- // FIXME: By default, connect on localhost on some predefined port ?
+ // FIXME: Send STATUS request
}
16 years, 10 months