tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1390900 - in /tomcat/sandbox/trunk-resources: ./ java/org/apache/catalina/ java/org/apache/catalina/core/ java/org/apache/catalina/manager/ java/org/apache/catalina/startup/
Date Thu, 27 Sep 2012 08:59:51 GMT
Author: markt
Date: Thu Sep 27 08:59:50 2012
New Revision: 1390900

URL: http://svn.apache.org/viewvc?rev=1390900&view=rev
Log:
Sync with trunk

Modified:
    tomcat/sandbox/trunk-resources/   (props changed)
    tomcat/sandbox/trunk-resources/java/org/apache/catalina/Context.java
    tomcat/sandbox/trunk-resources/java/org/apache/catalina/core/StandardContext.java
    tomcat/sandbox/trunk-resources/java/org/apache/catalina/core/StandardWrapperValve.java
    tomcat/sandbox/trunk-resources/java/org/apache/catalina/manager/HTMLManagerServlet.java
    tomcat/sandbox/trunk-resources/java/org/apache/catalina/manager/ManagerServlet.java
    tomcat/sandbox/trunk-resources/java/org/apache/catalina/startup/FailedContext.java

Propchange: tomcat/sandbox/trunk-resources/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1390718-1390899

Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/Context.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/Context.java?rev=1390900&r1=1390899&r2=1390900&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/catalina/Context.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/Context.java Thu Sep 27 08:59:50
2012
@@ -149,12 +149,6 @@ public interface Context extends Contain
 
 
     /**
-     * Return the application available flag for this Context.
-     */
-    public boolean getAvailable();
-
-
-    /**
      * Obtain the character set name to use with the given Locale. Note that
      * different Contexts may have different mappings of Locale to character
      * set.

Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/core/StandardContext.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/core/StandardContext.java?rev=1390900&r1=1390899&r2=1390900&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/core/StandardContext.java Thu
Sep 27 08:59:50 2012
@@ -1334,18 +1334,6 @@ public class StandardContext extends Con
 
 
     /**
-     * Return the application available flag for this Context.
-     */
-    @Override
-    public boolean getAvailable() {
-
-        // TODO Remove this method entirely
-        return getState().isAvailable();
-
-    }
-
-
-    /**
      * Return the Locale to character set mapper for this Context.
      */
     public CharsetMapper getCharsetMapper() {

Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/core/StandardWrapperValve.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/core/StandardWrapperValve.java?rev=1390900&r1=1390899&r2=1390900&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/catalina/core/StandardWrapperValve.java
(original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/core/StandardWrapperValve.java
Thu Sep 27 08:59:50 2012
@@ -107,7 +107,7 @@ final class StandardWrapperValve
         Context context = (Context) wrapper.getParent();
 
         // Check for the application being marked unavailable
-        if (!context.getAvailable()) {
+        if (!context.getState().isAvailable()) {
             response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE,
                            sm.getString("standardContext.isUnavailable"));
             unavailable = true;
@@ -359,7 +359,8 @@ final class StandardWrapperValve
         Context context = (Context) wrapper.getParent();
 
         // Check for the application being marked unavailable
-        boolean unavailable = !context.getAvailable() || wrapper.isUnavailable();
+        boolean unavailable = !context.getState().isAvailable() ||
+                wrapper.isUnavailable();
 
         // Allocate a servlet instance to process this request
         try {

Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/manager/HTMLManagerServlet.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/manager/HTMLManagerServlet.java?rev=1390900&r1=1390899&r2=1390900&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/catalina/manager/HTMLManagerServlet.java
(original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/manager/HTMLManagerServlet.java
Thu Sep 27 08:59:50 2012
@@ -510,7 +510,7 @@ public final class HTMLManagerServlet ex
                 } else {
                     args[2] = RequestUtil.filter(ctxt.getDisplayName());
                 }
-                args[3] = Boolean.valueOf(ctxt.getAvailable());
+                args[3] = Boolean.valueOf(ctxt.getState().isAvailable());
                 args[4] = RequestUtil.filter(response.encodeURL(request.getContextPath()
+
                      "/html/sessions?" + pathVersion));
                 Manager manager = ctxt.getManager();
@@ -559,13 +559,13 @@ public final class HTMLManagerServlet ex
                 if (ctxt.getName().equals(this.context.getName())) {
                     writer.print(MessageFormat.format(
                         MANAGER_APP_ROW_BUTTON_SECTION, args));
-                } else if (ctxt.getAvailable() && isDeployed) {
+                } else if (ctxt.getState().isAvailable() && isDeployed) {
                     writer.print(MessageFormat.format(
                         STARTED_DEPLOYED_APPS_ROW_BUTTON_SECTION, args));
-                } else if (ctxt.getAvailable() && !isDeployed) {
+                } else if (ctxt.getState().isAvailable() && !isDeployed) {
                     writer.print(MessageFormat.format(
                         STARTED_NONDEPLOYED_APPS_ROW_BUTTON_SECTION, args));
-                } else if (!ctxt.getAvailable() && isDeployed) {
+                } else if (!ctxt.getState().isAvailable() && isDeployed) {
                     writer.print(MessageFormat.format(
                         STOPPED_DEPLOYED_APPS_ROW_BUTTON_SECTION, args));
                 } else {

Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/manager/ManagerServlet.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/manager/ManagerServlet.java?rev=1390900&r1=1390899&r2=1390900&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/catalina/manager/ManagerServlet.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/manager/ManagerServlet.java Thu
Sep 27 08:59:50 2012
@@ -859,10 +859,11 @@ public class ManagerServlet extends Http
                 }
             }
             context = (Context) host.findChild(name);
-            if (context != null && context.getConfigured() && context.getAvailable())
{
+            if (context != null && context.getConfigured() &&
+                    context.getState().isAvailable()) {
                 writer.println(smClient.getString(
                         "managerServlet.deployed", displayPath));
-            } else if (context!=null && !context.getAvailable()) {
+            } else if (context!=null && !context.getState().isAvailable()) {
                 writer.println(smClient.getString(
                         "managerServlet.deployedButNotStarted", displayPath));
             } else {
@@ -900,7 +901,7 @@ public class ManagerServlet extends Http
                 String displayPath = context.getPath();
                 if( displayPath.equals("") )
                     displayPath = "/";
-                if (context.getAvailable()) {
+                if (context.getState().isAvailable()) {
                     writer.println(smClient.getString("managerServlet.listitem",
                             displayPath,
                             "running",
@@ -1231,7 +1232,7 @@ public class ManagerServlet extends Http
                 return;
             }
             context.start();
-            if (context.getAvailable())
+            if (context.getState().isAvailable())
                 writer.println(smClient.getString("managerServlet.started",
                         displayPath));
             else

Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/startup/FailedContext.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/startup/FailedContext.java?rev=1390900&r1=1390899&r2=1390900&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/catalina/startup/FailedContext.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/startup/FailedContext.java Thu
Sep 27 08:59:50 2012
@@ -312,9 +312,6 @@ public class FailedContext extends Lifec
     public void setApplicationLifecycleListeners(Object[] listeners) { /* NO-OP */ }
 
     @Override
-    public boolean getAvailable() { return false; }
-
-    @Override
     public String getCharset(Locale locale) { return null; }
 
     @Override



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message