Author: hlship
Date: Wed May 19 01:02:33 2010
New Revision: 945983
URL: http://svn.apache.org/viewvc?rev=945983&view=rev
Log:
Define a new constant to make it easier to make other symbols default values
match production mode.
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/SymbolConstants.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/SymbolConstants.java
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/SymbolConstants.java?rev=945983&r1=945982&r2=945983&view=diff
==============================================================================
---
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/SymbolConstants.java
(original)
+++
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/SymbolConstants.java
Wed May 19 01:02:33 2010
@@ -1,4 +1,4 @@
-// Copyright 2008, 2009 The Apache Software Foundation
+// Copyright 2008, 2009, 2010 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -32,6 +32,15 @@ public class SymbolConstants
public static final String PRODUCTION_MODE = "tapestry.production-mode";
/**
+ * A version of {...@link #PRODUCTION_MODE} as a symbol reference. This
can be used as the default value
+ * of other symbols, to indicate that their default matches whatever
PRODUCTION_MODE is set to, which is quite
+ * common.
+ *
+ * @since 5.2.0
+ */
+ public static final String PRODUCTION_MODE_VALUE = String.format("${%s}",
PRODUCTION_MODE);
+
+ /**
* Symbol which may be set to "true" to force the use of absolute URIs
(not relative URIs) exclusively.
*/
public static final String FORCE_ABSOLUTE_URIS =
"tapestry.force-absolute-uris";
@@ -240,6 +249,8 @@ public class SymbolConstants
* configured to use when processing requests.
* The default is 20 page instances.
*
+ * @deprecated The hard limit will be removed in a later release of
Tapestry, as the maximum number of instance
+ * is easily controlled by limiting the number of request
handling threads in the servlet container.
* @since 5.2.0
*/
public static final String PAGE_POOL_HARD_LIMIT =
"tapestry.page-pool.hard-limit";
@@ -287,14 +298,14 @@ public class SymbolConstants
public static final String BLACKBIRD = "tapestry.blackbird";
/**
- * The default javascript (tapestry.js) automatically injected into every
rendered HTML page.
+ * The Asset path of the default javascript (tapestry.js) automatically
injected into every rendered HTML page.
*
* @since 5.2.0
*/
public static final String DEFAULT_JAVASCRIPT =
"tapestry.default-javascript";
/**
- * If "true", then JSON page initialization content is compressed; if false
+ * If "true", then JSON page initialization content is compressed; if
"false"
* then extra white space is added (pretty printing). Defaults to "true"
in production mode.
*
* @since 5.2.0
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java?rev=945983&r1=945982&r2=945983&view=diff
==============================================================================
---
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java
(original)
+++
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java
Wed May 19 01:02:33 2010
@@ -2439,11 +2439,9 @@ public final class TapestryModule
configuration.add(SymbolConstants.OMIT_GENERATOR_META, "false");
configuration.add(SymbolConstants.GZIP_COMPRESSION_ENABLED, "true");
- String matchProductionMode = String.format("${%s}",
SymbolConstants.PRODUCTION_MODE);
-
- configuration.add(SymbolConstants.SECURE_ENABLED, matchProductionMode);
- configuration.add(SymbolConstants.COMBINE_SCRIPTS,
matchProductionMode);
- configuration.add(SymbolConstants.COMPACT_JSON, matchProductionMode);
+ configuration.add(SymbolConstants.SECURE_ENABLED,
SymbolConstants.PRODUCTION_MODE_VALUE);
+ configuration.add(SymbolConstants.COMBINE_SCRIPTS,
SymbolConstants.PRODUCTION_MODE_VALUE);
+ configuration.add(SymbolConstants.COMPACT_JSON,
SymbolConstants.PRODUCTION_MODE_VALUE);
configuration.add(SymbolConstants.ENCODE_LOCALE_INTO_PATH, "true");