JBossWeb SVN: r1716 - tags.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2011-04-28 12:16:42 -0400 (Thu, 28 Apr 2011)
New Revision: 1716
Added:
tags/JBOSSWEB_7_0_0_CR1/
Log:
CR1 !
13 years, 8 months
JBossWeb SVN: r1715 - in trunk: webapps/docs and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2011-04-28 07:31:44 -0400 (Thu, 28 Apr 2011)
New Revision: 1715
Modified:
trunk/java/org/apache/catalina/session/StandardManager.java
trunk/webapps/docs/changelog.xml
Log:
Add new defaults for max sessions and session persistence.
Modified: trunk/java/org/apache/catalina/session/StandardManager.java
===================================================================
--- trunk/java/org/apache/catalina/session/StandardManager.java 2011-04-27 14:22:06 UTC (rev 1714)
+++ trunk/java/org/apache/catalina/session/StandardManager.java 2011-04-28 11:31:44 UTC (rev 1715)
@@ -67,6 +67,13 @@
extends ManagerBase
implements Lifecycle, PropertyChangeListener {
+ public static final int MAX_ACTIVE_SESSIONS =
+ Integer.valueOf(System.getProperty("org.apache.catalina.session.StandardManager.MAX_ACTIVE_SESSIONS",
+ (org.apache.tomcat.util.Constants.LOW_MEMORY) ? "1024" : "-1")).intValue();
+
+ public static final String PATHNAME =
+ System.getProperty("org.apache.catalina.session.StandardManager.PATHNAME");
+
// ---------------------------------------------------- Security Classes
private class PrivilegedDoLoad
implements PrivilegedExceptionAction {
@@ -112,7 +119,7 @@
/**
* The maximum number of active Sessions allowed, or -1 for no limit.
*/
- protected int maxActiveSessions = -1;
+ protected int maxActiveSessions = MAX_ACTIVE_SESSIONS;
/**
@@ -129,7 +136,7 @@
* temporary working directory provided by our context, available via
* the <code>javax.servlet.context.tempdir</code> context attribute.
*/
- protected String pathname = "SESSIONS.ser";
+ protected String pathname = PATHNAME;
/**
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2011-04-27 14:22:06 UTC (rev 1714)
+++ trunk/webapps/docs/changelog.xml 2011-04-28 11:31:44 UTC (rev 1715)
@@ -25,6 +25,10 @@
<fix>
Default to a cheaper seed method for request randoms. (remm)
</fix>
+ <fix>
+ Low memory default for session manager (with low max amount of sessions), and disable
+ session persistence by default. (remm)
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">
13 years, 8 months
JBossWeb SVN: r1714 - branches/2.1.x/java/org/apache/el/lang.
by jbossweb-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2011-04-27 10:22:06 -0400 (Wed, 27 Apr 2011)
New Revision: 1714
Modified:
branches/2.1.x/java/org/apache/el/lang/ELSupport.java
Log:
Fix for JBWEB-198 / JBPAPP-6382
Modified: branches/2.1.x/java/org/apache/el/lang/ELSupport.java
===================================================================
--- branches/2.1.x/java/org/apache/el/lang/ELSupport.java 2011-04-27 07:21:56 UTC (rev 1713)
+++ branches/2.1.x/java/org/apache/el/lang/ELSupport.java 2011-04-27 14:22:06 UTC (rev 1714)
@@ -246,6 +246,9 @@
if (Float.TYPE == type || Float.class.equals(type)) {
return new Float(number.floatValue());
}
+ if (Number.class.equals(type)) {
+ return number;
+ }
throw new IllegalArgumentException(MessageFactory.get("error.convert",
number, number.getClass(), type));
13 years, 8 months
JBossWeb SVN: r1713 - in branches: 3.0.x/java/org/apache/el/lang and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2011-04-27 03:21:56 -0400 (Wed, 27 Apr 2011)
New Revision: 1713
Modified:
branches/2.1.x/java/org/apache/el/lang/ELArithmetic.java
branches/3.0.x/java/org/apache/el/lang/ELArithmetic.java
Log:
47371: Fix empty string to number conversion (should be converted to 0).
Modified: branches/2.1.x/java/org/apache/el/lang/ELArithmetic.java
===================================================================
--- branches/2.1.x/java/org/apache/el/lang/ELArithmetic.java 2011-04-27 07:14:59 UTC (rev 1712)
+++ branches/2.1.x/java/org/apache/el/lang/ELArithmetic.java 2011-04-27 07:21:56 UTC (rev 1713)
@@ -353,12 +353,12 @@
if (isNumber(obj)) {
return coerce((Number) obj);
}
+ if (obj == null || "".equals(obj)) {
+ return coerce(ZERO);
+ }
if (obj instanceof String) {
return coerce((String) obj);
}
- if (obj == null || "".equals(obj)) {
- return coerce(ZERO);
- }
if (obj instanceof Character) {
return coerce(new Short((short) ((Character) obj).charValue()));
Modified: branches/3.0.x/java/org/apache/el/lang/ELArithmetic.java
===================================================================
--- branches/3.0.x/java/org/apache/el/lang/ELArithmetic.java 2011-04-27 07:14:59 UTC (rev 1712)
+++ branches/3.0.x/java/org/apache/el/lang/ELArithmetic.java 2011-04-27 07:21:56 UTC (rev 1713)
@@ -353,12 +353,12 @@
if (isNumber(obj)) {
return coerce((Number) obj);
}
+ if (obj == null || "".equals(obj)) {
+ return coerce(ZERO);
+ }
if (obj instanceof String) {
return coerce((String) obj);
}
- if (obj == null || "".equals(obj)) {
- return coerce(ZERO);
- }
if (obj instanceof Character) {
return coerce(new Short((short) ((Character) obj).charValue()));
13 years, 8 months
JBossWeb SVN: r1712 - in trunk: webapps/docs and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2011-04-27 03:14:59 -0400 (Wed, 27 Apr 2011)
New Revision: 1712
Modified:
trunk/java/org/apache/el/lang/ELArithmetic.java
trunk/webapps/docs/changelog.xml
Log:
- Fix bad code for conversion of empty string to number.
Modified: trunk/java/org/apache/el/lang/ELArithmetic.java
===================================================================
--- trunk/java/org/apache/el/lang/ELArithmetic.java 2011-04-21 14:10:45 UTC (rev 1711)
+++ trunk/java/org/apache/el/lang/ELArithmetic.java 2011-04-27 07:14:59 UTC (rev 1712)
@@ -394,12 +394,12 @@
if (isNumber(obj)) {
return coerce((Number) obj);
}
+ if (obj == null || "".equals(obj)) {
+ return coerce(ZERO);
+ }
if (obj instanceof String) {
return coerce((String) obj);
}
- if (obj == null || "".equals(obj)) {
- return coerce(ZERO);
- }
if (obj instanceof Character) {
return coerce(Short.valueOf((short) ((Character) obj).charValue()));
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2011-04-21 14:10:45 UTC (rev 1711)
+++ trunk/webapps/docs/changelog.xml 2011-04-27 07:14:59 UTC (rev 1712)
@@ -27,6 +27,13 @@
</fix>
</changelog>
</subsection>
+ <subsection name="Jasper">
+ <changelog>
+ <fix>
+ <bug>47371</bug>: Fix conversion from empty string to number in EL. (remm)
+ </fix>
+ </changelog>
+ </subsection>
</section>
<section name="JBoss Web 7.0.0.Beta11 (remm)">
13 years, 8 months
JBossWeb SVN: r1711 - in branches/2.1.x: java/org/apache/coyote/http11 and 1 other directories.
by jbossweb-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2011-04-21 10:10:45 -0400 (Thu, 21 Apr 2011)
New Revision: 1711
Modified:
branches/2.1.x/java/org/apache/coyote/ajp/AjpAprProtocol.java
branches/2.1.x/java/org/apache/coyote/ajp/LocalStrings.properties
branches/2.1.x/java/org/apache/coyote/http11/Http11AprProtocol.java
branches/2.1.x/java/org/apache/coyote/http11/LocalStrings.properties
branches/2.1.x/webapps/docs/changelog.xml
Log:
Fix for JBWEB-186.
Modified: branches/2.1.x/java/org/apache/coyote/ajp/AjpAprProtocol.java
===================================================================
--- branches/2.1.x/java/org/apache/coyote/ajp/AjpAprProtocol.java 2011-04-20 23:23:27 UTC (rev 1710)
+++ branches/2.1.x/java/org/apache/coyote/ajp/AjpAprProtocol.java 2011-04-21 14:10:45 UTC (rev 1711)
@@ -110,6 +110,9 @@
private AjpConnectionHandler cHandler;
+ private boolean canDestroy = false;
+
+
// --------------------------------------------------------- Public Methods
@@ -201,6 +204,7 @@
log.error(sm.getString("ajpprotocol.endpoint.pauseerror"), ex);
throw ex;
}
+ canDestroy = false;
// Wait for a while until all the processors are idle
RequestInfo[] states = cHandler.global.getRequestProcessors();
int retry = 0;
@@ -219,6 +223,9 @@
break;
}
}
+ if (done) {
+ canDestroy = true;
+ }
}
if (log.isInfoEnabled())
log.info(sm.getString("ajpprotocol.pause", getName()));
@@ -238,7 +245,22 @@
public void destroy() throws Exception {
if (log.isInfoEnabled())
log.info(sm.getString("ajpprotocol.stop", getName()));
- endpoint.destroy();
+ if (canDestroy) {
+ endpoint.destroy();
+ } else {
+ log.warn(sm.getString("ajpprotocol.cannotDestroy", getName()));
+ try {
+ RequestInfo[] states = cHandler.global.getRequestProcessors();
+ for (int i = 0; i < states.length; i++) {
+ if (states[i].getStage() == org.apache.coyote.Constants.STAGE_SERVICE) {
+ // FIXME: Log RequestInfo content
+ }
+ }
+ } catch (Exception ex) {
+ log.error(sm.getString("ajpprotocol.cannotDestroy", getName()), ex);
+ throw ex;
+ }
+ }
if (tpOname!=null)
Registry.getRegistry(null, null).unregisterComponent(tpOname);
if (rgOname != null)
Modified: branches/2.1.x/java/org/apache/coyote/ajp/LocalStrings.properties
===================================================================
--- branches/2.1.x/java/org/apache/coyote/ajp/LocalStrings.properties 2011-04-20 23:23:27 UTC (rev 1710)
+++ branches/2.1.x/java/org/apache/coyote/ajp/LocalStrings.properties 2011-04-21 14:10:45 UTC (rev 1711)
@@ -16,6 +16,7 @@
ajpprotocol.setattribute=Attribute {0}: {1}
ajpprotocol.start=Starting Coyote AJP/1.3 on {0}
ajpprotocol.stop=Stopping Coyote AJP/1.3 on {0}
+ajpprotocol.cannotDestroy=Skip destroy for Coyote AJP/1.3 on {0} due to active request processors
ajpprotocol.pause=Pausing Coyote AJP/1.3 on {0}
ajpprotocol.endpoint.pauseerror=Error pausing endpoint
ajpprotocol.resume=Resuming Coyote AJP/1.3 on {0}
Modified: branches/2.1.x/java/org/apache/coyote/http11/Http11AprProtocol.java
===================================================================
--- branches/2.1.x/java/org/apache/coyote/http11/Http11AprProtocol.java 2011-04-20 23:23:27 UTC (rev 1710)
+++ branches/2.1.x/java/org/apache/coyote/http11/Http11AprProtocol.java 2011-04-21 14:10:45 UTC (rev 1711)
@@ -95,6 +95,7 @@
public void setAdapter(Adapter adapter) { this.adapter = adapter; }
public Adapter getAdapter() { return adapter; }
+ private boolean canDestroy = false;
/** Start the protocol
*/
@@ -149,6 +150,7 @@
log.error(sm.getString("http11protocol.endpoint.pauseerror"), ex);
throw ex;
}
+ canDestroy = false;
// Wait for a while until all the processors are idle
RequestInfo[] states = cHandler.global.getRequestProcessors();
int retry = 0;
@@ -167,6 +169,9 @@
break;
}
}
+ if (done) {
+ canDestroy = true;
+ }
}
if(log.isInfoEnabled())
log.info(sm.getString("http11protocol.pause", getName()));
@@ -186,7 +191,22 @@
public void destroy() throws Exception {
if(log.isInfoEnabled())
log.info(sm.getString("http11protocol.stop", getName()));
- endpoint.destroy();
+ if (canDestroy) {
+ endpoint.destroy();
+ } else {
+ log.warn(sm.getString("http11protocol.cannotDestroy", getName()));
+ try {
+ RequestInfo[] states = cHandler.global.getRequestProcessors();
+ for (int i = 0; i < states.length; i++) {
+ if (states[i].getStage() == org.apache.coyote.Constants.STAGE_SERVICE) {
+ // FIXME: Log RequestInfo content
+ }
+ }
+ } catch (Exception ex) {
+ log.error(sm.getString("http11protocol.cannotDestroy", getName()), ex);
+ throw ex;
+ }
+ }
if( tpOname!=null )
Registry.getRegistry(null, null).unregisterComponent(tpOname);
if( rgOname != null )
Modified: branches/2.1.x/java/org/apache/coyote/http11/LocalStrings.properties
===================================================================
--- branches/2.1.x/java/org/apache/coyote/http11/LocalStrings.properties 2011-04-20 23:23:27 UTC (rev 1710)
+++ branches/2.1.x/java/org/apache/coyote/http11/LocalStrings.properties 2011-04-21 14:10:45 UTC (rev 1711)
@@ -21,6 +21,7 @@
http11protocol.socketfactory.initerror=Error initializing socket factory
http11protocol.start=Starting Coyote HTTP/1.1 on {0}
http11protocol.stop=Stopping Coyote HTTP/1.1 on {0}
+http11protocol.cannotDestroy=Skip destroy for Coyote HTTP/1.1 on {0} due to active request processors
http11protocol.pause=Pausing Coyote HTTP/1.1 on {0}
http11protocol.endpoint.pauseerror=Error pausing endpoint
http11protocol.resume=Resuming Coyote HTTP/1.1 on {0}
Modified: branches/2.1.x/webapps/docs/changelog.xml
===================================================================
--- branches/2.1.x/webapps/docs/changelog.xml 2011-04-20 23:23:27 UTC (rev 1710)
+++ branches/2.1.x/webapps/docs/changelog.xml 2011-04-21 14:10:45 UTC (rev 1711)
@@ -23,6 +23,13 @@
</fix>
</changelog>
</subsection>
+ <subsection name="Coyote">
+ <changelog>
+ <fix>
+ <jboss-jira>JBWEB-186</jboss-jira>: Using the native connector causes the JVM to crash when shutting down on Windows. (remm)
+ </fix>
+ </changelog>
+ </subsection>
</section>
<section name="JBoss Web 2.1.11.GA (remm)">
@@ -1951,7 +1958,7 @@
<bug>41289</bug>: Create configBase, since it is no longer created elsewhere.
Submitted by Shiva Kumar H R. (remm)
</fix>
- </changelog>
+ </changelog>
</subsection>
<subsection name="Coyote">
<changelog>
13 years, 8 months
JBossWeb SVN: r1710 - in branches/JBOSSWEB_2_0_0_GA_CP05_JBPAPP-6381: src/share/classes/javax/el and 2 other directories.
by jbossweb-commits@lists.jboss.org
Author: bmaxwell
Date: 2011-04-20 19:23:27 -0400 (Wed, 20 Apr 2011)
New Revision: 1710
Modified:
branches/JBOSSWEB_2_0_0_GA_CP05_JBPAPP-6381/
branches/JBOSSWEB_2_0_0_GA_CP05_JBPAPP-6381/src/share/classes/javax/el/BeanELResolver.java
branches/JBOSSWEB_2_0_0_GA_CP05_JBPAPP-6381/src/share/classes/org/apache/el/lang/ExpressionBuilder.java
branches/JBOSSWEB_2_0_0_GA_CP05_JBPAPP-6381/src/share/classes/org/apache/el/util/ConcurrentCache.java
Log:
[JBPAPP-6381] fix Concurrent access to WeakHashMap in ConcurrentCache causes infinite loop, 100% CPU usage
Property changes on: branches/JBOSSWEB_2_0_0_GA_CP05_JBPAPP-6381
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/JBOSSWEB_2_0_0_GA_CP:1574
Modified: branches/JBOSSWEB_2_0_0_GA_CP05_JBPAPP-6381/src/share/classes/javax/el/BeanELResolver.java
===================================================================
--- branches/JBOSSWEB_2_0_0_GA_CP05_JBPAPP-6381/src/share/classes/javax/el/BeanELResolver.java 2011-04-20 23:19:41 UTC (rev 1709)
+++ branches/JBOSSWEB_2_0_0_GA_CP05_JBPAPP-6381/src/share/classes/javax/el/BeanELResolver.java 2011-04-20 23:23:27 UTC (rev 1710)
@@ -25,6 +25,8 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
@@ -34,11 +36,30 @@
public class BeanELResolver extends ELResolver {
- private final boolean readOnly;
+ private static final int CACHE_SIZE;
+ private static final String CACHE_SIZE_PROP =
+ "org.apache.el.BeanELResolver.CACHE_SIZE";
- private final ConcurrentCache<String, BeanProperties> cache = new ConcurrentCache<String, BeanProperties>(
- 1000);
+ static {
+ if (System.getSecurityManager() == null) {
+ CACHE_SIZE = Integer.parseInt(
+ System.getProperty(CACHE_SIZE_PROP, "1000"));
+ } else {
+ CACHE_SIZE = AccessController.doPrivileged(
+ new PrivilegedAction<Integer>() {
+ public Integer run() {
+ return Integer.valueOf(
+ System.getProperty(CACHE_SIZE_PROP, "1000"));
+ }
+ }).intValue();
+ }
+ }
+ private final boolean readOnly;
+
+ private final ConcurrentCache<String, BeanProperties> cache =
+ new ConcurrentCache<String, BeanProperties>(CACHE_SIZE);
+
public BeanELResolver() {
this.readOnly = false;
}
@@ -299,34 +320,37 @@
private final static class ConcurrentCache<K,V> {
- private final int size;
- private final Map<K,V> eden;
- private final Map<K,V> longterm;
-
- public ConcurrentCache(int size) {
- this.size = size;
- this.eden = new ConcurrentHashMap<K,V>(size);
- this.longterm = new WeakHashMap<K,V>(size);
- }
-
- public V get(K key) {
- V value = this.eden.get(key);
- if (value == null) {
- value = this.longterm.get(key);
- if (value != null) {
- this.eden.put(key, value);
- }
- }
- return value;
- }
-
- public void put(K key, V value) {
- if (this.eden.size() >= this.size) {
- this.longterm.putAll(this.eden);
- this.eden.clear();
- }
- this.eden.put(key, value);
- }
-
+ private final int size;
+ private final Map<K,V> eden;
+ private final Map<K,V> longterm;
+
+ public ConcurrentCache(int size) {
+ this.size = size;
+ this.eden = new ConcurrentHashMap<K,V>(size);
+ this.longterm = new WeakHashMap<K,V>(size);
+ }
+
+ public V get(K key) {
+ V value = this.eden.get(key);
+ if (value == null) {
+ synchronized (longterm) {
+ value = this.longterm.get(key);
+ }
+ if (value != null) {
+ this.eden.put(key, value);
+ }
+ }
+ return value;
+ }
+
+ public void put(K key, V value) {
+ if (this.eden.size() >= this.size) {
+ synchronized (longterm) {
+ this.longterm.putAll(this.eden);
+ }
+ this.eden.clear();
+ }
+ this.eden.put(key, value);
+ }
}
}
Modified: branches/JBOSSWEB_2_0_0_GA_CP05_JBPAPP-6381/src/share/classes/org/apache/el/lang/ExpressionBuilder.java
===================================================================
--- branches/JBOSSWEB_2_0_0_GA_CP05_JBPAPP-6381/src/share/classes/org/apache/el/lang/ExpressionBuilder.java 2011-04-20 23:19:41 UTC (rev 1709)
+++ branches/JBOSSWEB_2_0_0_GA_CP05_JBPAPP-6381/src/share/classes/org/apache/el/lang/ExpressionBuilder.java 2011-04-20 23:23:27 UTC (rev 1710)
@@ -19,6 +19,8 @@
import java.io.StringReader;
import java.lang.reflect.Method;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
import javax.el.ELContext;
import javax.el.ELException;
@@ -50,10 +52,30 @@
*/
public final class ExpressionBuilder implements NodeVisitor {
- private static final ConcurrentCache cache = new ConcurrentCache(5000);
+ private static final int CACHE_SIZE;
+ private static final String CACHE_SIZE_PROP =
+ "org.apache.el.ExpressionBuilder.CACHE_SIZE";
- private FunctionMapper fnMapper;
+ static {
+ if (System.getSecurityManager() == null) {
+ CACHE_SIZE = Integer.parseInt(
+ System.getProperty(CACHE_SIZE_PROP, "5000"));
+ } else {
+ CACHE_SIZE = AccessController.doPrivileged(
+ new PrivilegedAction<Integer>() {
+ public Integer run() {
+ return Integer.valueOf(
+ System.getProperty(CACHE_SIZE_PROP, "5000"));
+ }
+ }).intValue();
+ }
+ }
+ private static final ConcurrentCache<String, Node> cache =
+ new ConcurrentCache<String, Node>(CACHE_SIZE);
+
+ private FunctionMapper fnMapper;
+
private VariableMapper varMapper;
private String expression;
Modified: branches/JBOSSWEB_2_0_0_GA_CP05_JBPAPP-6381/src/share/classes/org/apache/el/util/ConcurrentCache.java
===================================================================
--- branches/JBOSSWEB_2_0_0_GA_CP05_JBPAPP-6381/src/share/classes/org/apache/el/util/ConcurrentCache.java 2011-04-20 23:19:41 UTC (rev 1709)
+++ branches/JBOSSWEB_2_0_0_GA_CP05_JBPAPP-6381/src/share/classes/org/apache/el/util/ConcurrentCache.java 2011-04-20 23:23:27 UTC (rev 1710)
@@ -6,34 +6,38 @@
public final class ConcurrentCache<K,V> {
- private final int size;
-
- private final Map<K,V> eden;
-
- private final Map<K,V> longterm;
-
- public ConcurrentCache(int size) {
- this.size = size;
- this.eden = new ConcurrentHashMap<K,V>(size);
- this.longterm = new WeakHashMap<K,V>(size);
- }
-
- public V get(K k) {
- V v = this.eden.get(k);
- if (v == null) {
- v = this.longterm.get(k);
- if (v != null) {
- this.eden.put(k, v);
- }
- }
- return v;
- }
-
- public void put(K k, V v) {
- if (this.eden.size() >= size) {
- this.longterm.putAll(this.eden);
- this.eden.clear();
- }
- this.eden.put(k, v);
- }
+ private final int size;
+
+ private final Map<K,V> eden;
+
+ private final Map<K,V> longterm;
+
+ public ConcurrentCache(int size) {
+ this.size = size;
+ this.eden = new ConcurrentHashMap<K,V>(size);
+ this.longterm = new WeakHashMap<K,V>(size);
+ }
+
+ public V get(K k) {
+ V v = this.eden.get(k);
+ if (v == null) {
+ synchronized (longterm) {
+ v = this.longterm.get(k);
+ }
+ if (v != null) {
+ this.eden.put(k, v);
+ }
+ }
+ return v;
+ }
+
+ public void put(K k, V v) {
+ if (this.eden.size() >= size) {
+ synchronized (longterm) {
+ this.longterm.putAll(this.eden);
+ }
+ this.eden.clear();
+ }
+ this.eden.put(k, v);
+ }
}
13 years, 8 months
JBossWeb SVN: r1709 - branches.
by jbossweb-commits@lists.jboss.org
Author: bmaxwell
Date: 2011-04-20 19:19:41 -0400 (Wed, 20 Apr 2011)
New Revision: 1709
Added:
branches/JBOSSWEB_2_0_0_GA_CP05_JBPAPP-6381/
Log:
[JBPAPP-6381] branch for one off patch
13 years, 8 months
JBossWeb SVN: r1708 - trunk/java/org/apache/catalina/connector.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2011-04-20 05:03:58 -0400 (Wed, 20 Apr 2011)
New Revision: 1708
Modified:
trunk/java/org/apache/catalina/connector/Request.java
Log:
- Change name.
Modified: trunk/java/org/apache/catalina/connector/Request.java
===================================================================
--- trunk/java/org/apache/catalina/connector/Request.java 2011-04-19 23:27:37 UTC (rev 1707)
+++ trunk/java/org/apache/catalina/connector/Request.java 2011-04-20 09:03:58 UTC (rev 1708)
@@ -160,8 +160,8 @@
Boolean.valueOf(System.getProperty("org.apache.catalina.connector.Request.LOCAL_RANDOM", (org.apache.tomcat.util.Constants.LOW_MEMORY) ? "false" : "true")).booleanValue();
- protected static final boolean SEED_WITH_GLOBAL_RANDOM =
- Boolean.valueOf(System.getProperty("org.apache.catalina.connector.Request.SEED_WITH_GLOBAL_RANDOM", "true")).booleanValue();
+ protected static final boolean SEED_WITH_NEXT_BYTES =
+ Boolean.valueOf(System.getProperty("org.apache.catalina.connector.Request.SEED_WITH_NEXT_BYTES", "true")).booleanValue();
// ----------------------------------------------------------- Constructors
@@ -639,7 +639,7 @@
public void setConnector(Connector connector) {
this.connector = connector;
if (LOCAL_RANDOM) {
- if (SEED_WITH_GLOBAL_RANDOM) {
+ if (SEED_WITH_NEXT_BYTES) {
byte[] seed = new byte[16];
connector.getService().getRandom().nextBytes(seed);
random = new SecureRandom(seed);
13 years, 8 months
JBossWeb SVN: r1707 - in trunk: webapps/docs and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2011-04-19 19:27:37 -0400 (Tue, 19 Apr 2011)
New Revision: 1707
Modified:
trunk/java/org/apache/catalina/connector/Request.java
trunk/webapps/docs/changelog.xml
Log:
- Use a cheaper seed method by default.
Modified: trunk/java/org/apache/catalina/connector/Request.java
===================================================================
--- trunk/java/org/apache/catalina/connector/Request.java 2011-04-19 12:34:05 UTC (rev 1706)
+++ trunk/java/org/apache/catalina/connector/Request.java 2011-04-19 23:27:37 UTC (rev 1707)
@@ -160,6 +160,10 @@
Boolean.valueOf(System.getProperty("org.apache.catalina.connector.Request.LOCAL_RANDOM", (org.apache.tomcat.util.Constants.LOW_MEMORY) ? "false" : "true")).booleanValue();
+ protected static final boolean SEED_WITH_GLOBAL_RANDOM =
+ Boolean.valueOf(System.getProperty("org.apache.catalina.connector.Request.SEED_WITH_GLOBAL_RANDOM", "true")).booleanValue();
+
+
// ----------------------------------------------------------- Constructors
@@ -635,7 +639,13 @@
public void setConnector(Connector connector) {
this.connector = connector;
if (LOCAL_RANDOM) {
- random = new SecureRandom(connector.getService().getRandom().generateSeed(16));
+ if (SEED_WITH_GLOBAL_RANDOM) {
+ byte[] seed = new byte[16];
+ connector.getService().getRandom().nextBytes(seed);
+ random = new SecureRandom(seed);
+ } else {
+ random = new SecureRandom(connector.getService().getRandom().generateSeed(16));
+ }
} else {
random = connector.getService().getRandom();
}
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2011-04-19 12:34:05 UTC (rev 1706)
+++ trunk/webapps/docs/changelog.xml 2011-04-19 23:27:37 UTC (rev 1707)
@@ -22,6 +22,9 @@
<fix>
Add a new session id changed event to SessionListener, the Servlet API events are not appropriate. (remm)
</fix>
+ <fix>
+ Default to a cheaper seed method for request randoms. (remm)
+ </fix>
</changelog>
</subsection>
</section>
13 years, 8 months