JBossWeb SVN: r1607 - tags.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2010-12-07 09:20:50 -0500 (Tue, 07 Dec 2010)
New Revision: 1607
Added:
tags/JBOSSWEB_3_0_0_BETA8/
Log:
- Web 3.0 beta 8.
Copied: tags/JBOSSWEB_3_0_0_BETA8 (from rev 1606, trunk)
14 years
JBossWeb SVN: r1606 - trunk/webapps/docs.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2010-12-07 08:24:06 -0500 (Tue, 07 Dec 2010)
New Revision: 1606
Modified:
trunk/webapps/docs/changelog.xml
Log:
- Add the pause() fix to the changelog.
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2010-12-07 02:12:23 UTC (rev 1605)
+++ trunk/webapps/docs/changelog.xml 2010-12-07 13:24:06 UTC (rev 1606)
@@ -48,6 +48,9 @@
<fix>
<jboss-jira>JBPAPP-5293</jboss-jira>: ConcurrentModificationException in HandshakeCompletedNotify-Thread. (remm)
</fix>
+ <fix>
+ <jira>186</jira>: Fix wait logic in pause() and add configuration. (jfclere)
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">
14 years
JBossWeb SVN: r1605 - in branches/JBOSSWEB_2_1_10_GA_JBPAPP-5515/java/org/apache/coyote: ajp and 1 other directories.
by jbossweb-commits@lists.jboss.org
Author: mmillson
Date: 2010-12-06 21:12:23 -0500 (Mon, 06 Dec 2010)
New Revision: 1605
Modified:
branches/JBOSSWEB_2_1_10_GA_JBPAPP-5515/java/org/apache/coyote/Constants.java
branches/JBOSSWEB_2_1_10_GA_JBPAPP-5515/java/org/apache/coyote/ajp/AjpAprProtocol.java
branches/JBOSSWEB_2_1_10_GA_JBPAPP-5515/java/org/apache/coyote/ajp/AjpProtocol.java
branches/JBOSSWEB_2_1_10_GA_JBPAPP-5515/java/org/apache/coyote/http11/Http11AprProtocol.java
branches/JBOSSWEB_2_1_10_GA_JBPAPP-5515/java/org/apache/coyote/http11/Http11Protocol.java
Log:
Fix native connector causing JVM crash on shutdown for [JBPAPP-5515].
Modified: branches/JBOSSWEB_2_1_10_GA_JBPAPP-5515/java/org/apache/coyote/Constants.java
===================================================================
--- branches/JBOSSWEB_2_1_10_GA_JBPAPP-5515/java/org/apache/coyote/Constants.java 2010-12-07 01:36:04 UTC (rev 1604)
+++ branches/JBOSSWEB_2_1_10_GA_JBPAPP-5515/java/org/apache/coyote/Constants.java 2010-12-07 02:12:23 UTC (rev 1605)
@@ -68,4 +68,7 @@
"org.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER",
"false")).booleanValue();
+ public static final int MAX_PAUSE_WAIT =
+ Integer.valueOf(System.getProperty("org.apache.coyote.MAX_PAUSE_WAIT", "60")).intValue();
+
}
Modified: branches/JBOSSWEB_2_1_10_GA_JBPAPP-5515/java/org/apache/coyote/ajp/AjpAprProtocol.java
===================================================================
--- branches/JBOSSWEB_2_1_10_GA_JBPAPP-5515/java/org/apache/coyote/ajp/AjpAprProtocol.java 2010-12-07 01:36:04 UTC (rev 1604)
+++ branches/JBOSSWEB_2_1_10_GA_JBPAPP-5515/java/org/apache/coyote/ajp/AjpAprProtocol.java 2010-12-07 02:12:23 UTC (rev 1605)
@@ -205,8 +205,9 @@
RequestInfo[] states = cHandler.global.getRequestProcessors();
int retry = 0;
boolean done = false;
- while (!done && retry < 20) {
+ while (!done && retry < org.apache.coyote.Constants.MAX_PAUSE_WAIT) {
retry++;
+ done = true;
for (int i = 0; i < states.length; i++) {
if (states[i].getStage() == org.apache.coyote.Constants.STAGE_SERVICE) {
try {
@@ -214,10 +215,10 @@
} catch (InterruptedException e) {
;
}
- continue;
+ done = false;
+ break;
}
}
- done = true;
}
if (log.isInfoEnabled())
log.info(sm.getString("ajpprotocol.pause", getName()));
Modified: branches/JBOSSWEB_2_1_10_GA_JBPAPP-5515/java/org/apache/coyote/ajp/AjpProtocol.java
===================================================================
--- branches/JBOSSWEB_2_1_10_GA_JBPAPP-5515/java/org/apache/coyote/ajp/AjpProtocol.java 2010-12-07 01:36:04 UTC (rev 1604)
+++ branches/JBOSSWEB_2_1_10_GA_JBPAPP-5515/java/org/apache/coyote/ajp/AjpProtocol.java 2010-12-07 02:12:23 UTC (rev 1605)
@@ -204,8 +204,9 @@
RequestInfo[] states = cHandler.global.getRequestProcessors();
int retry = 0;
boolean done = false;
- while (!done && retry < 20) {
+ while (!done && retry < org.apache.coyote.Constants.MAX_PAUSE_WAIT) {
retry++;
+ done = true;
for (int i = 0; i < states.length; i++) {
if (states[i].getStage() == org.apache.coyote.Constants.STAGE_SERVICE) {
try {
@@ -213,10 +214,10 @@
} catch (InterruptedException e) {
;
}
- continue;
+ done = false;
+ break;
}
}
- done = true;
}
if (log.isInfoEnabled())
log.info(sm.getString("ajpprotocol.pause", getName()));
Modified: branches/JBOSSWEB_2_1_10_GA_JBPAPP-5515/java/org/apache/coyote/http11/Http11AprProtocol.java
===================================================================
--- branches/JBOSSWEB_2_1_10_GA_JBPAPP-5515/java/org/apache/coyote/http11/Http11AprProtocol.java 2010-12-07 01:36:04 UTC (rev 1604)
+++ branches/JBOSSWEB_2_1_10_GA_JBPAPP-5515/java/org/apache/coyote/http11/Http11AprProtocol.java 2010-12-07 02:12:23 UTC (rev 1605)
@@ -153,8 +153,9 @@
RequestInfo[] states = cHandler.global.getRequestProcessors();
int retry = 0;
boolean done = false;
- while (!done && retry < 20) {
+ while (!done && retry < org.apache.coyote.Constants.MAX_PAUSE_WAIT) {
retry++;
+ done = true;
for (int i = 0; i < states.length; i++) {
if (states[i].getStage() == org.apache.coyote.Constants.STAGE_SERVICE) {
try {
@@ -162,10 +163,10 @@
} catch (InterruptedException e) {
;
}
- continue;
+ done = false;
+ break;
}
}
- done = true;
}
if(log.isInfoEnabled())
log.info(sm.getString("http11protocol.pause", getName()));
Modified: branches/JBOSSWEB_2_1_10_GA_JBPAPP-5515/java/org/apache/coyote/http11/Http11Protocol.java
===================================================================
--- branches/JBOSSWEB_2_1_10_GA_JBPAPP-5515/java/org/apache/coyote/http11/Http11Protocol.java 2010-12-07 01:36:04 UTC (rev 1604)
+++ branches/JBOSSWEB_2_1_10_GA_JBPAPP-5515/java/org/apache/coyote/http11/Http11Protocol.java 2010-12-07 02:12:23 UTC (rev 1605)
@@ -219,8 +219,9 @@
RequestInfo[] states = cHandler.global.getRequestProcessors();
int retry = 0;
boolean done = false;
- while (!done && retry < 20) {
+ while (!done && retry < org.apache.coyote.Constants.MAX_PAUSE_WAIT) {
retry++;
+ done = true;
for (int i = 0; i < states.length; i++) {
if (states[i].getStage() == org.apache.coyote.Constants.STAGE_SERVICE) {
try {
@@ -228,10 +229,10 @@
} catch (InterruptedException e) {
;
}
- continue;
+ done = false;
+ break;
}
}
- done = true;
}
if (log.isInfoEnabled())
log.info(sm.getString("http11protocol.pause", getName()));
14 years
JBossWeb SVN: r1604 - branches.
by jbossweb-commits@lists.jboss.org
Author: mmillson
Date: 2010-12-06 20:36:04 -0500 (Mon, 06 Dec 2010)
New Revision: 1604
Added:
branches/JBOSSWEB_2_1_10_GA_JBPAPP-5515/
Log:
Create JBPAPP-5515 patch branch from JBOSSWEB_2_1_10_GA tag
Copied: branches/JBOSSWEB_2_1_10_GA_JBPAPP-5515 (from rev 1603, tags/JBOSSWEB_2_1_10_GA)
14 years
JBossWeb SVN: r1603 - in trunk/java/org/apache/coyote: http11 and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2010-12-06 07:24:17 -0500 (Mon, 06 Dec 2010)
New Revision: 1603
Modified:
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:
Fix for JBWEB-186.
Modified: trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
===================================================================
--- trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java 2010-12-06 11:54:20 UTC (rev 1602)
+++ trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java 2010-12-06 12:24:17 UTC (rev 1603)
@@ -216,6 +216,7 @@
boolean done = false;
while (!done && retry < org.apache.coyote.Constants.MAX_PAUSE_WAIT) {
retry++;
+ done = true;
for (int i = 0; i < states.length; i++) {
if (states[i].getStage() == org.apache.coyote.Constants.STAGE_SERVICE) {
try {
@@ -223,10 +224,10 @@
} catch (InterruptedException e) {
;
}
- continue;
+ done = false;
+ break;
}
}
- 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 2010-12-06 11:54:20 UTC (rev 1602)
+++ trunk/java/org/apache/coyote/ajp/AjpProtocol.java 2010-12-06 12:24:17 UTC (rev 1603)
@@ -216,6 +216,7 @@
boolean done = false;
while (!done && retry < org.apache.coyote.Constants.MAX_PAUSE_WAIT) {
retry++;
+ done = true;
for (int i = 0; i < states.length; i++) {
if (states[i].getStage() == org.apache.coyote.Constants.STAGE_SERVICE) {
try {
@@ -223,10 +224,10 @@
} catch (InterruptedException e) {
;
}
- continue;
+ done = false;
+ break;
}
}
- 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 2010-12-06 11:54:20 UTC (rev 1602)
+++ trunk/java/org/apache/coyote/http11/Http11AprProtocol.java 2010-12-06 12:24:17 UTC (rev 1603)
@@ -164,6 +164,7 @@
boolean done = false;
while (!done && retry < org.apache.coyote.Constants.MAX_PAUSE_WAIT) {
retry++;
+ done = true;
for (int i = 0; i < states.length; i++) {
if (states[i].getStage() == org.apache.coyote.Constants.STAGE_SERVICE) {
try {
@@ -171,10 +172,10 @@
} catch (InterruptedException e) {
;
}
- continue;
+ done = false;
+ break;
}
}
- 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 2010-12-06 11:54:20 UTC (rev 1602)
+++ trunk/java/org/apache/coyote/http11/Http11Protocol.java 2010-12-06 12:24:17 UTC (rev 1603)
@@ -232,6 +232,7 @@
boolean done = false;
while (!done && retry < org.apache.coyote.Constants.MAX_PAUSE_WAIT) {
retry++;
+ done = true;
for (int i = 0; i < states.length; i++) {
if (states[i].getStage() == org.apache.coyote.Constants.STAGE_SERVICE) {
try {
@@ -239,10 +240,10 @@
} catch (InterruptedException e) {
;
}
- continue;
+ done = false;
+ break;
}
}
- done = true;
}
if (log.isInfoEnabled())
log.info(sm.getString("http11protocol.pause", getName()));
14 years
JBossWeb SVN: r1602 - in branches/2.1.x/java/org/apache/coyote: ajp and 1 other directories.
by jbossweb-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2010-12-06 06:54:20 -0500 (Mon, 06 Dec 2010)
New Revision: 1602
Modified:
branches/2.1.x/java/org/apache/coyote/Constants.java
branches/2.1.x/java/org/apache/coyote/ajp/AjpAprProtocol.java
branches/2.1.x/java/org/apache/coyote/ajp/AjpProtocol.java
branches/2.1.x/java/org/apache/coyote/http11/Http11AprProtocol.java
branches/2.1.x/java/org/apache/coyote/http11/Http11Protocol.java
Log:
Fix for JBWEB-186.
Modified: branches/2.1.x/java/org/apache/coyote/Constants.java
===================================================================
--- branches/2.1.x/java/org/apache/coyote/Constants.java 2010-12-01 13:49:46 UTC (rev 1601)
+++ branches/2.1.x/java/org/apache/coyote/Constants.java 2010-12-06 11:54:20 UTC (rev 1602)
@@ -68,4 +68,7 @@
"org.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER",
"false")).booleanValue();
+ public static final int MAX_PAUSE_WAIT =
+ Integer.valueOf(System.getProperty("org.apache.coyote.MAX_PAUSE_WAIT", "60")).intValue();
+
}
Modified: branches/2.1.x/java/org/apache/coyote/ajp/AjpAprProtocol.java
===================================================================
--- branches/2.1.x/java/org/apache/coyote/ajp/AjpAprProtocol.java 2010-12-01 13:49:46 UTC (rev 1601)
+++ branches/2.1.x/java/org/apache/coyote/ajp/AjpAprProtocol.java 2010-12-06 11:54:20 UTC (rev 1602)
@@ -205,8 +205,9 @@
RequestInfo[] states = cHandler.global.getRequestProcessors();
int retry = 0;
boolean done = false;
- while (!done && retry < 20) {
+ while (!done && retry < org.apache.coyote.Constants.MAX_PAUSE_WAIT) {
retry++;
+ done = true;
for (int i = 0; i < states.length; i++) {
if (states[i].getStage() == org.apache.coyote.Constants.STAGE_SERVICE) {
try {
@@ -214,10 +215,10 @@
} catch (InterruptedException e) {
;
}
- continue;
+ done = false;
+ break;
}
}
- done = true;
}
if (log.isInfoEnabled())
log.info(sm.getString("ajpprotocol.pause", getName()));
Modified: branches/2.1.x/java/org/apache/coyote/ajp/AjpProtocol.java
===================================================================
--- branches/2.1.x/java/org/apache/coyote/ajp/AjpProtocol.java 2010-12-01 13:49:46 UTC (rev 1601)
+++ branches/2.1.x/java/org/apache/coyote/ajp/AjpProtocol.java 2010-12-06 11:54:20 UTC (rev 1602)
@@ -204,8 +204,9 @@
RequestInfo[] states = cHandler.global.getRequestProcessors();
int retry = 0;
boolean done = false;
- while (!done && retry < 20) {
+ while (!done && retry < org.apache.coyote.Constants.MAX_PAUSE_WAIT) {
retry++;
+ done = true;
for (int i = 0; i < states.length; i++) {
if (states[i].getStage() == org.apache.coyote.Constants.STAGE_SERVICE) {
try {
@@ -213,10 +214,10 @@
} catch (InterruptedException e) {
;
}
- continue;
+ done = false;
+ break;
}
}
- done = true;
}
if (log.isInfoEnabled())
log.info(sm.getString("ajpprotocol.pause", getName()));
Modified: branches/2.1.x/java/org/apache/coyote/http11/Http11AprProtocol.java
===================================================================
--- branches/2.1.x/java/org/apache/coyote/http11/Http11AprProtocol.java 2010-12-01 13:49:46 UTC (rev 1601)
+++ branches/2.1.x/java/org/apache/coyote/http11/Http11AprProtocol.java 2010-12-06 11:54:20 UTC (rev 1602)
@@ -153,8 +153,9 @@
RequestInfo[] states = cHandler.global.getRequestProcessors();
int retry = 0;
boolean done = false;
- while (!done && retry < 20) {
+ while (!done && retry < org.apache.coyote.Constants.MAX_PAUSE_WAIT) {
retry++;
+ done = true;
for (int i = 0; i < states.length; i++) {
if (states[i].getStage() == org.apache.coyote.Constants.STAGE_SERVICE) {
try {
@@ -162,10 +163,10 @@
} catch (InterruptedException e) {
;
}
- continue;
+ done = false;
+ break;
}
}
- done = true;
}
if(log.isInfoEnabled())
log.info(sm.getString("http11protocol.pause", getName()));
Modified: branches/2.1.x/java/org/apache/coyote/http11/Http11Protocol.java
===================================================================
--- branches/2.1.x/java/org/apache/coyote/http11/Http11Protocol.java 2010-12-01 13:49:46 UTC (rev 1601)
+++ branches/2.1.x/java/org/apache/coyote/http11/Http11Protocol.java 2010-12-06 11:54:20 UTC (rev 1602)
@@ -219,8 +219,9 @@
RequestInfo[] states = cHandler.global.getRequestProcessors();
int retry = 0;
boolean done = false;
- while (!done && retry < 20) {
+ while (!done && retry < org.apache.coyote.Constants.MAX_PAUSE_WAIT) {
retry++;
+ done = true;
for (int i = 0; i < states.length; i++) {
if (states[i].getStage() == org.apache.coyote.Constants.STAGE_SERVICE) {
try {
@@ -228,10 +229,10 @@
} catch (InterruptedException e) {
;
}
- continue;
+ done = false;
+ break;
}
}
- done = true;
}
if (log.isInfoEnabled())
log.info(sm.getString("http11protocol.pause", getName()));
14 years
JBossWeb SVN: r1601 - in trunk: webapps/docs and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2010-12-01 08:49:46 -0500 (Wed, 01 Dec 2010)
New Revision: 1601
Modified:
trunk/java/org/jboss/web/rewrite/TomcatResolver.java
trunk/webapps/docs/changelog.xml
Log:
- The resolver should look at request attributes.
Modified: trunk/java/org/jboss/web/rewrite/TomcatResolver.java
===================================================================
--- trunk/java/org/jboss/web/rewrite/TomcatResolver.java 2010-12-01 10:44:48 UTC (rev 1600)
+++ trunk/java/org/jboss/web/rewrite/TomcatResolver.java 2010-12-01 13:49:46 UTC (rev 1601)
@@ -132,7 +132,8 @@
}
public String resolveEnv(String key) {
- return System.getProperty(key);
+ Object result = request.getAttribute(key);
+ return (result != null) ? result.toString() : System.getProperty(key);
}
public String resolveSsl(String key) {
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2010-12-01 10:44:48 UTC (rev 1600)
+++ trunk/webapps/docs/changelog.xml 2010-12-01 13:49:46 UTC (rev 1601)
@@ -17,13 +17,6 @@
<body>
<section name="JBoss Web 3.0.0.Beta8 (remm)">
- <subsection name="Coyote">
- <changelog>
- <fix>
- <jboss-jira>JBPAPP-5293</jboss-jira>: ConcurrentModificationException in HandshakeCompletedNotify-Thread. (remm)
- </fix>
- </changelog>
- </subsection>
<subsection name="Catalina">
<changelog>
<fix>
@@ -45,8 +38,18 @@
<fix>
Allow a landing page for FORM. (markt)
</fix>
+ <fix>
+ <jira>190</jira>: The rewrite resolver should look at request attributes. (remm)
+ </fix>
</changelog>
</subsection>
+ <subsection name="Coyote">
+ <changelog>
+ <fix>
+ <jboss-jira>JBPAPP-5293</jboss-jira>: ConcurrentModificationException in HandshakeCompletedNotify-Thread. (remm)
+ </fix>
+ </changelog>
+ </subsection>
<subsection name="Jasper">
<changelog>
<fix>
14 years
JBossWeb SVN: r1600 - trunk/java/org/apache/jasper/compiler.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2010-12-01 05:44:48 -0500 (Wed, 01 Dec 2010)
New Revision: 1600
Modified:
trunk/java/org/apache/jasper/compiler/Compiler.java
trunk/java/org/apache/jasper/compiler/ELFunctionMapper.java
Log:
- Port Tomcat code formatting, the old one is unreadable in this class.
Modified: trunk/java/org/apache/jasper/compiler/Compiler.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/Compiler.java 2010-12-01 10:44:46 UTC (rev 1599)
+++ trunk/java/org/apache/jasper/compiler/Compiler.java 2010-12-01 10:44:48 UTC (rev 1600)
@@ -237,7 +237,7 @@
TextOptimizer.concatenate(this, pageNodes);
// Generate static function mapper codes.
- ELFunctionMapper.map(this, pageNodes);
+ ELFunctionMapper.map(pageNodes);
// generate servlet .java file
writer = setupContextWriter(javaFileName);
Modified: trunk/java/org/apache/jasper/compiler/ELFunctionMapper.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/ELFunctionMapper.java 2010-12-01 10:44:46 UTC (rev 1599)
+++ trunk/java/org/apache/jasper/compiler/ELFunctionMapper.java 2010-12-01 10:44:48 UTC (rev 1600)
@@ -19,7 +19,9 @@
import java.security.AccessController;
import java.security.PrivilegedAction;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+
import javax.servlet.jsp.tagext.FunctionInfo;
import org.apache.jasper.Constants;
@@ -27,7 +29,7 @@
/**
* This class generates functions mappers for the EL expressions in the page.
- * Instead of a global mapper, a mapper is used for ecah call to EL
+ * Instead of a global mapper, a mapper is used for each call to EL
* evaluator, thus avoiding the prefix overlapping and redefinition
* issues.
*
@@ -42,25 +44,24 @@
/**
* Creates the functions mappers for all EL expressions in the JSP page.
*
- * @param compiler Current compiler, mainly for accessing error dispatcher.
* @param page The current compilation unit.
*/
- public static void map(Compiler compiler, Node.Nodes page)
- throws JasperException {
+ public static void map(Node.Nodes page)
+ throws JasperException {
- ELFunctionMapper map = new ELFunctionMapper();
- map.ds = new StringBuilder();
- map.ss = new StringBuilder();
+ ELFunctionMapper map = new ELFunctionMapper();
+ map.ds = new StringBuilder();
+ map.ss = new StringBuilder();
- page.visit(map.new ELFunctionVisitor());
+ page.visit(map.new ELFunctionVisitor());
- // Append the declarations to the root node
- String ds = map.ds.toString();
- if (ds.length() > 0) {
- Node root = page.getRoot();
- new Node.Declaration(map.ss.toString(), null, root);
- new Node.Declaration("static {\n" + ds + "}\n", null, root);
- }
+ // Append the declarations to the root node
+ String ds = map.ds.toString();
+ if (ds.length() > 0) {
+ Node root = page.getRoot();
+ new Node.Declaration(map.ss.toString(), null, root);
+ new Node.Declaration("static {\n" + ds + "}\n", null, root);
+ }
}
/**
@@ -68,210 +69,196 @@
* for functions, and if found functions mappers are created.
*/
class ELFunctionVisitor extends Node.Visitor {
-
- /**
- * Use a global name map to facilitate reuse of function maps.
- * The key used is prefix:function:uri.
- */
- private HashMap gMap = new HashMap();
+
+ /**
+ * Use a global name map to facilitate reuse of function maps.
+ * The key used is prefix:function:uri.
+ */
+ private HashMap<String, String> gMap = new HashMap<String, String>();
- public void visit(Node.ParamAction n) throws JasperException {
- doMap(n.getValue());
- visitBody(n);
- }
+ @Override
+ public void visit(Node.ParamAction n) throws JasperException {
+ doMap(n.getValue());
+ visitBody(n);
+ }
- public void visit(Node.IncludeAction n) throws JasperException {
- doMap(n.getPage());
- visitBody(n);
- }
+ @Override
+ public void visit(Node.IncludeAction n) throws JasperException {
+ doMap(n.getPage());
+ visitBody(n);
+ }
- public void visit(Node.ForwardAction n) throws JasperException {
- doMap(n.getPage());
- visitBody(n);
- }
+ @Override
+ public void visit(Node.ForwardAction n) throws JasperException {
+ doMap(n.getPage());
+ visitBody(n);
+ }
+ @Override
public void visit(Node.SetProperty n) throws JasperException {
- doMap(n.getValue());
- visitBody(n);
- }
+ doMap(n.getValue());
+ visitBody(n);
+ }
+ @Override
public void visit(Node.UseBean n) throws JasperException {
- doMap(n.getBeanName());
- visitBody(n);
- }
+ doMap(n.getBeanName());
+ visitBody(n);
+ }
+ @Override
public void visit(Node.PlugIn n) throws JasperException {
- doMap(n.getHeight());
- doMap(n.getWidth());
- visitBody(n);
- }
+ doMap(n.getHeight());
+ doMap(n.getWidth());
+ visitBody(n);
+ }
+ @Override
public void visit(Node.JspElement n) throws JasperException {
- Node.JspAttribute[] attrs = n.getJspAttributes();
- for (int i = 0; attrs != null && i < attrs.length; i++) {
- doMap(attrs[i]);
- }
- doMap(n.getNameAttribute());
- visitBody(n);
- }
+ Node.JspAttribute[] attrs = n.getJspAttributes();
+ for (int i = 0; attrs != null && i < attrs.length; i++) {
+ doMap(attrs[i]);
+ }
+ doMap(n.getNameAttribute());
+ visitBody(n);
+ }
+ @Override
public void visit(Node.UninterpretedTag n) throws JasperException {
- Node.JspAttribute[] attrs = n.getJspAttributes();
- for (int i = 0; attrs != null && i < attrs.length; i++) {
- doMap(attrs[i]);
- }
- visitBody(n);
- }
+ Node.JspAttribute[] attrs = n.getJspAttributes();
+ for (int i = 0; attrs != null && i < attrs.length; i++) {
+ doMap(attrs[i]);
+ }
+ visitBody(n);
+ }
+ @Override
public void visit(Node.CustomTag n) throws JasperException {
- Node.JspAttribute[] attrs = n.getJspAttributes();
- for (int i = 0; attrs != null && i < attrs.length; i++) {
- doMap(attrs[i]);
- }
- visitBody(n);
- }
+ Node.JspAttribute[] attrs = n.getJspAttributes();
+ for (int i = 0; attrs != null && i < attrs.length; i++) {
+ doMap(attrs[i]);
+ }
+ visitBody(n);
+ }
+ @Override
public void visit(Node.ELExpression n) throws JasperException {
- doMap(n.getEL());
- }
+ doMap(n.getEL());
+ }
- private void doMap(Node.JspAttribute attr)
- throws JasperException {
- if (attr != null) {
- doMap(attr.getEL());
- }
- }
+ private void doMap(Node.JspAttribute attr)
+ throws JasperException {
+ if (attr != null) {
+ doMap(attr.getEL());
+ }
+ }
/**
* Creates function mappers, if needed, from ELNodes
*/
- private void doMap(ELNode.Nodes el)
- throws JasperException {
+ private void doMap(ELNode.Nodes el)
+ throws JasperException {
// Only care about functions in ELNode's
- class Fvisitor extends ELNode.Visitor {
- ArrayList funcs = new ArrayList();
- HashMap keyMap = new HashMap();
- public void visit(ELNode.Function n) throws JasperException {
- String key = n.getPrefix() + ":" + n.getName();
- if (! keyMap.containsKey(key)) {
- keyMap.put(key,"");
- funcs.add(n);
- }
- }
- }
+ class Fvisitor extends ELNode.Visitor {
+ ArrayList<ELNode.Function> funcs =
+ new ArrayList<ELNode.Function>();
+ HashMap<String, String> keyMap = new HashMap<String, String>();
+ @Override
+ public void visit(ELNode.Function n) throws JasperException {
+ String key = n.getPrefix() + ":" + n.getName();
+ if (! keyMap.containsKey(key)) {
+ keyMap.put(key,"");
+ funcs.add(n);
+ }
+ }
+ }
- if (el == null) {
- return;
- }
+ if (el == null) {
+ return;
+ }
- // First locate all unique functions in this EL
- Fvisitor fv = new Fvisitor();
- el.visit(fv);
- ArrayList functions = fv.funcs;
+ // First locate all unique functions in this EL
+ Fvisitor fv = new Fvisitor();
+ el.visit(fv);
+ ArrayList<ELNode.Function> functions = fv.funcs;
- if (functions.size() == 0) {
- return;
- }
+ if (functions.size() == 0) {
+ return;
+ }
- // Reuse a previous map if possible
- String decName = matchMap(functions);
- if (decName != null) {
- el.setMapName(decName);
- return;
- }
-
- // Generate declaration for the map statically
- decName = getMapName();
- ss.append("static private org.apache.jasper.runtime.ProtectedFunctionMapper " + decName + ";\n");
+ // Reuse a previous map if possible
+ String decName = matchMap(functions);
+ if (decName != null) {
+ el.setMapName(decName);
+ return;
+ }
+
+ // Generate declaration for the map statically
+ decName = getMapName();
+ ss.append("static private org.apache.jasper.runtime.ProtectedFunctionMapper " + decName + ";\n");
- ds.append(" " + decName + "= ");
- ds.append("org.apache.jasper.runtime.ProtectedFunctionMapper");
+ ds.append(" " + decName + "= ");
+ ds.append("org.apache.jasper.runtime.ProtectedFunctionMapper");
- // Special case if there is only one function in the map
- String funcMethod = null;
- if (functions.size() == 1) {
- funcMethod = ".getMapForFunction";
- } else {
- ds.append(".getInstance();\n");
- funcMethod = " " + decName + ".mapFunction";
- }
+ // Special case if there is only one function in the map
+ String funcMethod = null;
+ if (functions.size() == 1) {
+ funcMethod = ".getMapForFunction";
+ } else {
+ ds.append(".getInstance();\n");
+ funcMethod = " " + decName + ".mapFunction";
+ }
// Setup arguments for either getMapForFunction or mapFunction
- for (int i = 0; i < functions.size(); i++) {
- ELNode.Function f = (ELNode.Function)functions.get(i);
- FunctionInfo funcInfo = f.getFunctionInfo();
- String key = f.getPrefix()+ ":" + f.getName();
- ds.append(funcMethod + "(\"" + key + "\", " +
- getCanonicalName(funcInfo.getFunctionClass()) +
- ".class, " + '\"' + f.getMethodName() + "\", " +
- "new Class[] {");
- String params[] = f.getParameters();
- for (int k = 0; k < params.length; k++) {
- if (k != 0) {
- ds.append(", ");
- }
- int iArray = params[k].indexOf('[');
- if (iArray < 0) {
- ds.append(params[k] + ".class");
- }
- else {
- String baseType = params[k].substring(0, iArray);
- ds.append("java.lang.reflect.Array.newInstance(");
- ds.append(baseType);
- ds.append(".class,");
+ for (int i = 0; i < functions.size(); i++) {
+ ELNode.Function f = functions.get(i);
+ FunctionInfo funcInfo = f.getFunctionInfo();
+ String key = f.getPrefix()+ ":" + f.getName();
+ ds.append(funcMethod + "(\"" + key + "\", " +
+ getCanonicalName(funcInfo.getFunctionClass()) +
+ ".class, " + '\"' + f.getMethodName() + "\", " +
+ "new Class[] {");
+ String params[] = f.getParameters();
+ for (int k = 0; k < params.length; k++) {
+ if (k != 0) {
+ ds.append(", ");
+ }
+ int iArray = params[k].indexOf('[');
+ if (iArray < 0) {
+ ds.append(params[k] + ".class");
+ }
+ else {
+ String baseType = params[k].substring(0, iArray);
+ ds.append("java.lang.reflect.Array.newInstance(");
+ ds.append(baseType);
+ ds.append(".class,");
- // Count the number of array dimension
- int aCount = 0;
- for (int jj = iArray; jj < params[k].length(); jj++ ) {
- if (params[k].charAt(jj) == '[') {
- aCount++;
- }
- }
- if (aCount == 1) {
- ds.append("0).getClass()");
- } else {
- ds.append("new int[" + aCount + "]).getClass()");
- }
- }
- }
- ds.append("});\n");
- // Put the current name in the global function map
- gMap.put(f.getPrefix() + ':' + f.getName() + ':' + f.getUri(),
- decName);
- }
- el.setMapName(decName);
- }
+ // Count the number of array dimension
+ int aCount = 0;
+ for (int jj = iArray; jj < params[k].length(); jj++ ) {
+ if (params[k].charAt(jj) == '[') {
+ aCount++;
+ }
+ }
+ if (aCount == 1) {
+ ds.append("0).getClass()");
+ } else {
+ ds.append("new int[" + aCount + "]).getClass()");
+ }
+ }
+ }
+ ds.append("});\n");
+ // Put the current name in the global function map
+ gMap.put(f.getPrefix() + ':' + f.getName() + ':' + f.getUri(),
+ decName);
+ }
+ el.setMapName(decName);
+ }
- /**
- * Convert a binary class name into a canonical one that can be used
- * when generating Java source code.
- *
- * @param className Binary class name
- * @return Canonical equivalent
- */
- private String getCanonicalName(String className) throws JasperException {
- Class<?> clazz;
-
- ClassLoader tccl;
- if (Constants.IS_SECURITY_ENABLED) {
- PrivilegedAction<ClassLoader> pa = new PrivilegedGetTccl();
- tccl = AccessController.doPrivileged(pa);
- } else {
- tccl = Thread.currentThread().getContextClassLoader();
- }
-
- try {
- clazz = Class.forName(className, true, tccl);
- } catch (ClassNotFoundException e) {
- throw new JasperException(e);
- }
- return clazz.getCanonicalName();
- }
-
- /**
+ /**
* Find the name of the function mapper for an EL. Reuse a
* previously generated one if possible.
* @param functions An ArrayList of ELNode.Function instances that
@@ -279,41 +266,66 @@
* @return A previous generated function mapper name that can be used
* by this EL; null if none found.
*/
- private String matchMap(ArrayList functions) {
+ private String matchMap(ArrayList<ELNode.Function> functions) {
- String mapName = null;
- for (int i = 0; i < functions.size(); i++) {
- ELNode.Function f = (ELNode.Function)functions.get(i);
- String temName = (String) gMap.get(f.getPrefix() + ':' +
- f.getName() + ':' + f.getUri());
- if (temName == null) {
- return null;
- }
- if (mapName == null) {
- mapName = temName;
- } else if (!temName.equals(mapName)) {
- // If not all in the previous match, then no match.
- return null;
- }
- }
- return mapName;
- }
+ String mapName = null;
+ for (int i = 0; i < functions.size(); i++) {
+ ELNode.Function f = functions.get(i);
+ String temName = gMap.get(f.getPrefix() + ':' + f.getName() +
+ ':' + f.getUri());
+ if (temName == null) {
+ return null;
+ }
+ if (mapName == null) {
+ mapName = temName;
+ } else if (!temName.equals(mapName)) {
+ // If not all in the previous match, then no match.
+ return null;
+ }
+ }
+ return mapName;
+ }
/*
* @return An unique name for a function mapper.
*/
- private String getMapName() {
- return "_jspx_fnmap_" + currFunc++;
- }
+ private String getMapName() {
+ return "_jspx_fnmap_" + currFunc++;
+ }
+
+ /**
+ * Convert a binary class name into a canonical one that can be used
+ * when generating Java source code.
+ *
+ * @param className Binary class name
+ * @return Canonical equivalent
+ */
+ private String getCanonicalName(String className) throws JasperException {
+ Class<?> clazz;
+
+ ClassLoader tccl;
+ if (Constants.IS_SECURITY_ENABLED) {
+ PrivilegedAction<ClassLoader> pa = new PrivilegedGetTccl();
+ tccl = AccessController.doPrivileged(pa);
+ } else {
+ tccl = Thread.currentThread().getContextClassLoader();
+ }
+
+ try {
+ clazz = Class.forName(className, true, tccl);
+ } catch (ClassNotFoundException e) {
+ throw new JasperException(e);
+ }
+ return clazz.getCanonicalName();
+ }
}
-
+
private static class PrivilegedGetTccl
- implements PrivilegedAction<ClassLoader> {
+ implements PrivilegedAction<ClassLoader> {
public ClassLoader run() {
return Thread.currentThread().getContextClassLoader();
}
}
-
}
14 years
JBossWeb SVN: r1599 - trunk/webapps/docs.
by jbossweb-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2010-12-01 05:44:46 -0500 (Wed, 01 Dec 2010)
New Revision: 1599
Modified:
trunk/webapps/docs/changelog.xml
Log:
Add changelog entry for r1595
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2010-12-01 10:41:27 UTC (rev 1598)
+++ trunk/webapps/docs/changelog.xml 2010-12-01 10:44:46 UTC (rev 1599)
@@ -17,6 +17,13 @@
<body>
<section name="JBoss Web 3.0.0.Beta8 (remm)">
+ <subsection name="Coyote">
+ <changelog>
+ <fix>
+ <jboss-jira>JBPAPP-5293</jboss-jira>: ConcurrentModificationException in HandshakeCompletedNotify-Thread. (remm)
+ </fix>
+ </changelog>
+ </subsection>
<subsection name="Catalina">
<changelog>
<fix>
14 years
JBossWeb SVN: r1598 - trunk/java/org/apache/jasper/compiler.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2010-12-01 05:41:27 -0500 (Wed, 01 Dec 2010)
New Revision: 1598
Modified:
trunk/java/org/apache/jasper/compiler/ELFunctionMapper.java
Log:
- Fix.
Modified: trunk/java/org/apache/jasper/compiler/ELFunctionMapper.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/ELFunctionMapper.java 2010-12-01 10:13:16 UTC (rev 1597)
+++ trunk/java/org/apache/jasper/compiler/ELFunctionMapper.java 2010-12-01 10:41:27 UTC (rev 1598)
@@ -269,17 +269,8 @@
throw new JasperException(e);
}
return clazz.getCanonicalName();
- }
}
- private static class PrivilegedGetTccl
- implements PrivilegedAction<ClassLoader> {
-
- public ClassLoader run() {
- return Thread.currentThread().getContextClassLoader();
- }
- }
-
/**
* Find the name of the function mapper for an EL. Reuse a
* previously generated one if possible.
@@ -315,5 +306,14 @@
return "_jspx_fnmap_" + currFunc++;
}
}
+
+ private static class PrivilegedGetTccl
+ implements PrivilegedAction<ClassLoader> {
+
+ public ClassLoader run() {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ }
+
}
14 years