portals-pluto-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdore...@apache.org
Subject svn commit: r678334 - /portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/Configuration.java
Date Mon, 21 Jul 2008 01:24:42 GMT
Author: cdoremus
Date: Sun Jul 20 18:24:42 2008
New Revision: 678334

URL: http://svn.apache.org/viewvc?rev=678334&view=rev
Log:
Added preventUnecessaryCrossContext() from trunk for PLUTO-488 patch.

Modified:
    portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/Configuration.java

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/Configuration.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/Configuration.java?rev=678334&r1=678333&r2=678334&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/Configuration.java
(original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/Configuration.java
Sun Jul 20 18:24:42 2008
@@ -2,6 +2,7 @@
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.MissingResourceException;
 import java.util.PropertyResourceBundle;
 import java.util.ResourceBundle;
 
@@ -18,6 +19,13 @@
 	
 	private static final String CONTAINER_RUNTIME_OPTIONS =
     	"org.apache.pluto.container.supportedContainerRuntimeOptions";
+
+    /**
+     * org.apache.pluto.PREVENT_UNECESSARY_CROSS_CONTEXT
+     */
+    private static final String PREVENT_UNECESSARY_CROSS_CONTEXT =
+        "org.apache.pluto.PREVENT_UNECESSARY_CROSS_CONTEXT";
+
 	
 	public static List<String> getSupportedContainerRuntimeOptions() {
     	String options =  BUNDLE.getString(CONTAINER_RUNTIME_OPTIONS);
@@ -28,4 +36,18 @@
 		}
     	return result;
     }
+
+    private static Boolean prevent;
+
+    public static boolean preventUnecessaryCrossContext() {
+        if (prevent == null) {
+            try {
+                String test = BUNDLE.getString(PREVENT_UNECESSARY_CROSS_CONTEXT);
+                prevent = new Boolean(test);
+            } catch (MissingResourceException mre) {
+                prevent = Boolean.FALSE;
+            }
+        }
+        return prevent.booleanValue();
+    }
 }



Mime
View raw message