cvs commit: jakarta-tapestry/framework/src/java/org/apache/tapestry TapestryStrings.properties IEngine.java Tapestry.java

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

cvs commit: jakarta-tapestry/framework/src/java/org/apache/tapestry TapestryStrings.properties IEngine.java Tapestry.java

hlship
hlship      2005/05/09 13:43:03

  Modified:    .        status.xml
               framework/src/java/org/apache/tapestry/services/impl
                        InfrastructureObjectProvider.java
                        InfrastructureContribution.java
                        InfrastructureImpl.java
                        SetupServletApplicationGlobals.java
               framework/src/java/org/apache/tapestry/error
                        ExceptionPresenter.java
               portlet/src/java/org/apache/tapestry/portlet
                        PortletMessages.java PortletStrings.properties
                        PortletExceptionPresenter.java
               framework/src/java/org/apache/tapestry/engine
                        EngineMessages.java EngineStrings.properties
                        BaseEngine.java AbstractEngine.java
               framework/src/descriptor/META-INF tapestry.error.xml
                        hivemodule.xml
               framework/src/java/org/apache/tapestry/services
                        Infrastructure.java
               framework/src/test/org/apache/tapestry/error
                        TestExceptionPresenter.java
               portlet/src/descriptor/META-INF hivemodule.xml
               framework/src/scripts TestWMLSelect.xml TestWMLTimer.xml
                        TestWMLComponents.xml TestWMLStaleSession.xml
                        TestWMLContentType.xml TestWMLFormComponents.xml
                        TestWMLNestedCard.xml
               framework/src/java/org/apache/tapestry
                        TapestryStrings.properties IEngine.java
                        Tapestry.java
  Added:       framework/src/java/org/apache/tapestry/services/impl
                        LiteralDeferredObject.java
               framework/src/java/org/apache/tapestry/error
                        StaleSessionExceptionPresenterImpl.java
                        StaleSessionExceptionPresenter.java
               portlet/src/java/org/apache/tapestry/portlet
                        PortletStaleSessionExceptionPresenter.java
               framework/src/test/org/apache/tapestry/error
                        TestStaleSessionExceptionPresenter.java
                        BaseErrorTestCase.java
  Log:
  Split out reporting of stale session exceptions into their own service.
  Allow simple strings to be contributed into the tapestry.InfrastructureContributions configuration point, not just services.
  Allow servlets to start up in either "servlet" or "wml" mode, use the mode to choose how exceptions are handled.
 
  Revision  Changes    Path
  1.99      +1 -1      jakarta-tapestry/status.xml
 
  Index: status.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/status.xml,v
  retrieving revision 1.98
  retrieving revision 1.99
  diff -u -r1.98 -r1.99
  --- status.xml 9 May 2005 14:45:14 -0000 1.98
  +++ status.xml 9 May 2005 20:43:02 -0000 1.99
  @@ -99,7 +99,7 @@
         <action type="update" dev="HLS"> Remove support for the &lt;service&gt; element in specifications (in favor of the tapestry.services.ApplicationServices configuration point). </action>
         <action type="update" dev="HLS"> Significant rework of how Tapestry URLs are formatted. </action>
         <action type="update" dev="HLS"> Removed support for the Tapestry JSP taglib. This can now be accomplished using service paths recognized by service encoders. </action>
  -      <action type="update" dev="HLS"> Changed to Form to prevent collisions between query parameters supplied by services (in an ILink) and form element ids. </action>
  +      <action type="update" dev="HLS"> Changes to Form to prevent collisions between query parameters supplied by services (in an ILink) and form element ids. </action>
         <action type="update" dev="HLS"> Change Form (and WML Go) to have the direct and action services injected. </action>
         <action type="update" dev="HLS"> Refactoring to move application state object management out of IEngine and generalize it. </action>
         <action type="add" dev="HLS"> Add &lt;inject-state&gt; element to specifications. </action>
 
 
 
  1.7       +5 -2      jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/InfrastructureObjectProvider.java
 
  Index: InfrastructureObjectProvider.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/InfrastructureObjectProvider.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- InfrastructureObjectProvider.java 18 Apr 2005 17:06:38 -0000 1.6
  +++ InfrastructureObjectProvider.java 9 May 2005 20:43:02 -0000 1.7
  @@ -58,8 +58,11 @@
       Object readProperty(String locator, Location location)
       {
           try
  -        {
  -            return PropertyUtils.read(_infrastructure, locator);
  +        {            
  +            if (PropertyUtils.isReadable(_infrastructure, locator))
  +                return PropertyUtils.read(_infrastructure, locator);
  +
  +            return _infrastructure.getProperty(locator);
           }
           catch (Throwable ex)
           {
 
 
 
  1.3       +5 -0      jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/InfrastructureContribution.java
 
  Index: InfrastructureContribution.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/InfrastructureContribution.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- InfrastructureContribution.java 18 Apr 2005 17:06:38 -0000 1.2
  +++ InfrastructureContribution.java 9 May 2005 20:43:02 -0000 1.3
  @@ -41,6 +41,11 @@
           _deferredObject = deferredObject;
       }
   
  +    public void setValue(String value)
  +    {
  +        _deferredObject = new LiteralDeferredObject(value, getLocation());
  +    }
  +
       /**
        * The object which should be exposed as the given Infrastructure property.
        */
 
 
 
  1.30      +6 -0      jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/InfrastructureImpl.java
 
  Index: InfrastructureImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/InfrastructureImpl.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- InfrastructureImpl.java 18 Apr 2005 17:06:38 -0000 1.29
  +++ InfrastructureImpl.java 9 May 2005 20:43:02 -0000 1.30
  @@ -34,6 +34,7 @@
   import org.apache.tapestry.engine.state.ApplicationStateManager;
   import org.apache.tapestry.error.ExceptionPresenter;
   import org.apache.tapestry.error.RequestExceptionReporter;
  +import org.apache.tapestry.error.StaleSessionExceptionPresenter;
   import org.apache.tapestry.listener.ListenerMapSource;
   import org.apache.tapestry.markup.MarkupWriterSource;
   import org.apache.tapestry.services.ComponentMessagesSource;
  @@ -236,6 +237,11 @@
           return (ListenerMapSource) getProperty("listenerMapSource");
       }
   
  +    public StaleSessionExceptionPresenter getStaleSessionExceptionPresenter()
  +    {
  +        return (StaleSessionExceptionPresenter) getProperty("staleSessionExceptionPresenter");
  +    }
  +
       public Object getProperty(String propertyName)
       {
           Defense.notNull(propertyName, "propertyName");
 
 
 
  1.4       +7 -2      jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/SetupServletApplicationGlobals.java
 
  Index: SetupServletApplicationGlobals.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/SetupServletApplicationGlobals.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SetupServletApplicationGlobals.java 18 Apr 2005 17:06:38 -0000 1.3
  +++ SetupServletApplicationGlobals.java 9 May 2005 20:43:02 -0000 1.4
  @@ -22,7 +22,10 @@
    * Stores services and configurations into the
    * {@link org.apache.tapestry.services.ApplicationGlobals tapestry.globals.ApplicationGlobals}
    * service, which is used to see the
  - * {@link org.apache.tapestry.services.Infrastructure tapestry.infrastructure}&nbsp;service.
  + * {@link org.apache.tapestry.services.Infrastructure tapestry.infrastructure} service. The mode to
  + * use is normally "servlet", but this can be overriden by setting the
  + * org.apache.tapestry.application-mode initialization parameter. WML applications should use the
  + * mode "wml".
    *
    * @author Howard M. Lewis Ship
    * @since 4.0
  @@ -32,6 +35,8 @@
   {
       public void initialize(HttpServlet servlet)
       {
  -        initialize("servlet");
  +        String mode = servlet.getInitParameter("org.apache.tapestry.application-mode");
  +
  +        initialize(mode == null ? "servlet" : mode);
       }
   }
  \ No newline at end of file
 
 
 
  1.1                  jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/LiteralDeferredObject.java
 
  Index: LiteralDeferredObject.java
  ===================================================================
  // Copyright 2005 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.
  // You may obtain a copy of the License at
  //
  //     http://www.apache.org/licenses/LICENSE-2.0
  //
  // Unless required by applicable law or agreed to in writing, software
  // distributed under the License is distributed on an "AS IS" BASIS,
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  // See the License for the specific language governing permissions and
  // limitations under the License.
 
  package org.apache.tapestry.services.impl;
 
  import org.apache.hivemind.Location;
 
  /**
   * @author Howard M. Lewis Ship
   * @since 4.0
   */
  public class LiteralDeferredObject implements DeferredObject
  {
      private String _value;
 
      private Location _location;
 
      public LiteralDeferredObject(String value, Location location)
      {
          _value = value;
          _location = location;
      }
 
      public Object getObject()
      {
          return _value;
      }
 
      public Location getLocation()
      {
          return _location;
      }
 
  }
 
 
 
  1.4       +1 -1      jakarta-tapestry/framework/src/java/org/apache/tapestry/error/ExceptionPresenter.java
 
  Index: ExceptionPresenter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/error/ExceptionPresenter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ExceptionPresenter.java 18 Apr 2005 17:06:41 -0000 1.3
  +++ ExceptionPresenter.java 9 May 2005 20:43:02 -0000 1.4
  @@ -17,7 +17,7 @@
   import org.apache.tapestry.IRequestCycle;
   
   /**
  - * Invoked by the {@link org.apache.tapestry.IEngine}&nbsp;if there's an uncaught exception
  + * Invoked by the {@link org.apache.tapestry.IEngine} if there's an uncaught exception
    * (checked or runtime) processing a request. The ExceptionPresenter is responsible for presenting a
    * exception message (or description) to the user. The default implementation activates the
    * "Exception" page, but it is common to override this to do something application specific
 
 
 
  1.1                  jakarta-tapestry/framework/src/java/org/apache/tapestry/error/StaleSessionExceptionPresenterImpl.java
 
  Index: StaleSessionExceptionPresenterImpl.java
  ===================================================================
  // Copyright 2005 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.
  // You may obtain a copy of the License at
  //
  //     http://www.apache.org/licenses/LICENSE-2.0
  //
  // Unless required by applicable law or agreed to in writing, software
  // distributed under the License is distributed on an "AS IS" BASIS,
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  // See the License for the specific language governing permissions and
  // limitations under the License.
 
  package org.apache.tapestry.error;
 
  import org.apache.hivemind.ApplicationRuntimeException;
  import org.apache.tapestry.IPage;
  import org.apache.tapestry.IRequestCycle;
  import org.apache.tapestry.StaleSessionException;
  import org.apache.tapestry.services.ResponseRenderer;
 
  /**
   * Used to activate a particular page to report the
   * {@link org.apache.tapestry.StaleSessionException}.
   *
   * @author Howard M. Lewis Ship
   * @since 4.0
   */
  public class StaleSessionExceptionPresenterImpl implements StaleSessionExceptionPresenter
  {
      private RequestExceptionReporter _requestExceptionReporter;
 
      private ResponseRenderer _responseRenderer;
 
      private String _pageName;
 
      public void presentStaleSessionException(IRequestCycle cycle, StaleSessionException cause)
      {
          try
          {
              IPage exceptionPage = cycle.getPage(_pageName);
 
              cycle.activate(exceptionPage);
 
              _responseRenderer.renderResponse(cycle);
          }
          catch (Exception ex)
          {
              // Worst case scenario. The exception page itself is broken, leaving
              // us with no option but to write the cause to the output.
 
              _requestExceptionReporter.reportRequestException(ErrorMessages
                      .unableToProcessClientRequest(cause), cause);
 
              // Also, write the exception thrown when redendering the exception
              // page, so that can get fixed as well.
 
              _requestExceptionReporter.reportRequestException(ErrorMessages
                      .unableToPresentExceptionPage(ex), ex);
 
              // And throw the exception.
 
              throw new ApplicationRuntimeException(ex.getMessage(), ex);
          }
 
      }
 
      public void setPageName(String pageName)
      {
          _pageName = pageName;
      }
 
      public void setRequestExceptionReporter(RequestExceptionReporter requestExceptionReporter)
      {
          _requestExceptionReporter = requestExceptionReporter;
      }
 
      public void setResponseRenderer(ResponseRenderer responseRenderer)
      {
          _responseRenderer = responseRenderer;
      }
 
  }
 
 
 
  1.1                  jakarta-tapestry/framework/src/java/org/apache/tapestry/error/StaleSessionExceptionPresenter.java
 
  Index: StaleSessionExceptionPresenter.java
  ===================================================================
  // Copyright 2005 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.
  // You may obtain a copy of the License at
  //
  //     http://www.apache.org/licenses/LICENSE-2.0
  //
  // Unless required by applicable law or agreed to in writing, software
  // distributed under the License is distributed on an "AS IS" BASIS,
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  // See the License for the specific language governing permissions and
  // limitations under the License.
 
  package org.apache.tapestry.error;
 
  import org.apache.tapestry.IRequestCycle;
  import org.apache.tapestry.StaleSessionException;
 
  /**
   * Interface for a service used to report stale session exceptions.
   *
   * @author Howard M. Lewis Ship
   * @since 4.0
   */
  public interface StaleSessionExceptionPresenter
  {
      /**
       * Reports the stale session exception.
       *
       * @param cycle
       *            the current request cycle
       * @param cause
       *            the exception that was caught
       */
      public void presentStaleSessionException(IRequestCycle cycle, StaleSessionException ex);
  }
 
 
 
  1.6       +5 -0      jakarta-tapestry/portlet/src/java/org/apache/tapestry/portlet/PortletMessages.java
 
  Index: PortletMessages.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/portlet/src/java/org/apache/tapestry/portlet/PortletMessages.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- PortletMessages.java 4 May 2005 23:03:42 -0000 1.5
  +++ PortletMessages.java 9 May 2005 20:43:02 -0000 1.6
  @@ -51,4 +51,9 @@
       {
           return _formatter.format("error-reporting-exception", cause);
       }
  +
  +    static String staleSession()
  +    {
  +        return _formatter.getMessage("sale-session");
  +    }
   }
  \ No newline at end of file
 
 
 
  1.5       +2 -1      jakarta-tapestry/portlet/src/java/org/apache/tapestry/portlet/PortletStrings.properties
 
  Index: PortletStrings.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/portlet/src/java/org/apache/tapestry/portlet/PortletStrings.properties,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PortletStrings.properties 4 May 2005 23:03:42 -0000 1.4
  +++ PortletStrings.properties 9 May 2005 20:43:02 -0000 1.5
  @@ -16,4 +16,5 @@
   error-getting-resource=Error getting portlet context resource ''{0}'': {1}
   error-processing-action=Error processing action request: {0}
   error-processing-render=Error processing render request: {0}
  -error-reporting-exception=Error producing exception report: {0}
  \ No newline at end of file
  +error-reporting-exception=Error producing exception report: {0}
  +stale-session=Your server session has expired.
  \ No newline at end of file
 
 
 
  1.2       +12 -4     jakarta-tapestry/portlet/src/java/org/apache/tapestry/portlet/PortletExceptionPresenter.java
 
  Index: PortletExceptionPresenter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/portlet/src/java/org/apache/tapestry/portlet/PortletExceptionPresenter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PortletExceptionPresenter.java 4 May 2005 23:03:42 -0000 1.1
  +++ PortletExceptionPresenter.java 9 May 2005 20:43:02 -0000 1.2
  @@ -27,8 +27,7 @@
   import org.apache.tapestry.error.ErrorMessages;
   import org.apache.tapestry.error.ExceptionPresenter;
   import org.apache.tapestry.error.RequestExceptionReporter;
  -import org.apache.tapestry.markup.AsciiMarkupFilter;
  -import org.apache.tapestry.markup.MarkupWriterImpl;
  +import org.apache.tapestry.markup.MarkupWriterSource;
   import org.apache.tapestry.services.ServiceConstants;
   import org.apache.tapestry.util.ContentType;
   import org.apache.tapestry.util.exception.ExceptionAnalyzer;
  @@ -60,6 +59,8 @@
   
       private WebResponse _response;
   
  +    private MarkupWriterSource _markupWriterSource;
  +
       public void presentException(IRequestCycle cycle, Throwable cause)
       {
           try
  @@ -94,7 +95,8 @@
           CharArrayWriter caw = new CharArrayWriter();
           PrintWriter pw = new PrintWriter(caw);
   
  -        IMarkupWriter writer = new MarkupWriterImpl("text/html", pw, new AsciiMarkupFilter());
  +        IMarkupWriter writer = _markupWriterSource
  +                .newMarkupWriter(pw, new ContentType("text/html"));
   
           writeException(writer, cycle, cause);
   
  @@ -116,7 +118,8 @@
       {
           PrintWriter pw = _response.getPrintWriter(new ContentType("text/html"));
   
  -        IMarkupWriter writer = new MarkupWriterImpl("text/html", pw, new AsciiMarkupFilter());
  +        IMarkupWriter writer = _markupWriterSource
  +                .newMarkupWriter(pw, new ContentType("text/html"));
   
           writeException(writer, cycle, cause);
       }
  @@ -146,6 +149,11 @@
           _response = response;
       }
   
  +    public void setMarkupWriterSource(MarkupWriterSource markupWriterSource)
  +    {
  +        _markupWriterSource = markupWriterSource;
  +    }
  +
       private void writeException(IMarkupWriter writer, IRequestCycle cycle,
               ExceptionDescription exception, boolean showStackTrace)
       {
 
 
 
  1.1                  jakarta-tapestry/portlet/src/java/org/apache/tapestry/portlet/PortletStaleSessionExceptionPresenter.java
 
  Index: PortletStaleSessionExceptionPresenter.java
  ===================================================================
  // Copyright 2005 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.
  // You may obtain a copy of the License at
  //
  //     http://www.apache.org/licenses/LICENSE-2.0
  //
  // Unless required by applicable law or agreed to in writing, software
  // distributed under the License is distributed on an "AS IS" BASIS,
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  // See the License for the specific language governing permissions and
  // limitations under the License.
 
  package org.apache.tapestry.portlet;
 
  import javax.portlet.ActionRequest;
  import javax.portlet.ActionResponse;
 
  import org.apache.hivemind.ApplicationRuntimeException;
  import org.apache.tapestry.IRequestCycle;
  import org.apache.tapestry.StaleSessionException;
  import org.apache.tapestry.error.RequestExceptionReporter;
  import org.apache.tapestry.error.StaleSessionExceptionPresenter;
  import org.apache.tapestry.services.ServiceConstants;
 
  /**
   * @author Howard M. Lewis Ship
   * @since 4.0
   */
  public class PortletStaleSessionExceptionPresenter implements StaleSessionExceptionPresenter
  {
      private PortletRequestGlobals _globals;
 
      private RequestExceptionReporter _requestExceptionReporter;
 
      public void presentStaleSessionException(IRequestCycle cycle, StaleSessionException cause)
      {
          try
          {
              String markup = PortletMessages.staleSession();
 
              ActionRequest request = _globals.getActionRequest();
 
              request.getPortletSession(true).setAttribute(
                      PortletConstants.PORTLET_EXCEPTION_MARKUP_ATTRIBUTE,
                      markup);
 
              ActionResponse response = _globals.getActionResponse();
 
              response.setRenderParameter(
                      ServiceConstants.SERVICE,
                      PortletConstants.EXCEPTION_SERVICE);
          }
          catch (Exception ex)
          {
              // Worst case scenario. The exception page itself is broken, leaving
              // us with no option but to write the cause to the output.
 
              // Also, write the exception thrown when redendering the exception
              // page, so that can get fixed as well.
 
              _requestExceptionReporter.reportRequestException(PortletMessages
                      .errorReportingException(ex), ex);
 
              // And throw the exception.
 
              throw new ApplicationRuntimeException(ex.getMessage(), ex);
          }
      }
 
      public void setGlobals(PortletRequestGlobals globals)
      {
          _globals = globals;
      }
 
      public void setRequestExceptionReporter(RequestExceptionReporter requestExceptionReporter)
      {
          _requestExceptionReporter = requestExceptionReporter;
      }
  }
 
 
 
  1.5       +27 -4     jakarta-tapestry/framework/src/java/org/apache/tapestry/engine/EngineMessages.java
 
  Index: EngineMessages.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/engine/EngineMessages.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- EngineMessages.java 18 Apr 2005 17:06:37 -0000 1.4
  +++ EngineMessages.java 9 May 2005 20:43:02 -0000 1.5
  @@ -14,6 +14,8 @@
   
   package org.apache.tapestry.engine;
   
  +import java.util.List;
  +
   import org.apache.hivemind.impl.MessageFormatter;
   import org.apache.tapestry.IComponent;
   import org.apache.tapestry.IPage;
  @@ -27,24 +29,45 @@
       private static final MessageFormatter _formatter = new MessageFormatter(EngineMessages.class,
               "EngineStrings");
   
  -    public static String serviceNoParameter(IEngineService service)
  +    static String serviceNoParameter(IEngineService service)
       {
           return _formatter.format("service-no-parameter", service.getName());
       }
   
  -    public static String wrongComponentType(IComponent component, Class expectedType)
  +    static String wrongComponentType(IComponent component, Class expectedType)
       {
           return _formatter.format("wrong-component-type", component.getExtendedId(), expectedType
                   .getName());
       }
   
  -    public static String requestStateSession(IComponent component)
  +    static String requestStateSession(IComponent component)
       {
           return _formatter.format("request-stale-session", component.getExtendedId());
       }
   
  -    public static String pageNotCompatible(IPage page, Class expectedType)
  +    static String pageNotCompatible(IPage page, Class expectedType)
       {
           return _formatter.format("page-not-compatible", page.getPageName(), expectedType.getName());
       }
  +
  +    static String exceptionDuringCleanup(Throwable cause)
  +    {
  +        return _formatter.format("exception-during-cleanup", cause);
  +    }
  +
  +    static String validateCycle(List pageNames)
  +    {
  +        StringBuffer buffer = new StringBuffer();
  +        int count = pageNames.size();
  +
  +        for (int i = 0; i < count; i++)
  +        {
  +            if (i > 0)
  +                buffer.append("; ");
  +
  +            buffer.append(pageNames.get(i));
  +        }
  +        
  +        return _formatter.format("validate-cycle", buffer);
  +    }
   }
  \ No newline at end of file
 
 
 
  1.4       +4 -0      jakarta-tapestry/framework/src/java/org/apache/tapestry/engine/EngineStrings.properties
 
  Index: EngineStrings.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/engine/EngineStrings.properties,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- EngineStrings.properties 6 Jan 2005 02:17:12 -0000 1.3
  +++ EngineStrings.properties 9 May 2005 20:43:02 -0000 1.4
  @@ -19,3 +19,7 @@
   request-stale-session=Component {0} is stateful, but the HttpSession has expired (or has not yet been created).
   
   page-not-compatible=Page {0} does not implement the {1} interface.
  +
  +exception-during-cleanup=Exception during post-request cleanup: {0}
  +
  +validate-cycle=A validate cycle during page activation was detected: {0}.
 
 
 
  1.6       +6 -50     jakarta-tapestry/framework/src/java/org/apache/tapestry/engine/BaseEngine.java
 
  Index: BaseEngine.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/engine/BaseEngine.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- BaseEngine.java 28 Jan 2005 21:07:15 -0000 1.5
  +++ BaseEngine.java 9 May 2005 20:43:02 -0000 1.6
  @@ -20,8 +20,8 @@
   import org.apache.tapestry.IRequestCycle;
   
   /**
  - * Concrete implementation of {@link org.apache.tapestry.IEngine}used for ordinary applications.
  - * All page state information is maintained in the {@link javax.servlet.http.HttpSession}using
  + * Concrete implementation of {@link org.apache.tapestry.IEngine} used for ordinary applications.
  + * All page state information is maintained in the {@link javax.servlet.http.HttpSession} using
    * instances of {@link org.apache.tapestry.record.SessionPageRecorder}.
    *
    * @author Howard Lewis Ship
  @@ -30,43 +30,10 @@
   public class BaseEngine extends AbstractEngine
   {
       /**
  -     * Removes all page recorders that contain no changes, or are marked for discard. Subclasses
  -     * should invoke this implementation in addition to providing thier own.
  -     */
  -
  -    protected void cleanupAfterRequest(IRequestCycle cycle)
  -    {
  -        //        if (Tapestry.isEmpty(_recorders))
  -        //            return;
  -        //
  -        // boolean markDirty = false;
  -        //        Iterator i = _recorders.entrySet().iterator();
  -        //
  -        //        while (i.hasNext())
  -        //        {
  -        //            Map.Entry entry = (Map.Entry) i.next();
  -        //            String pageName = (String) entry.getKey();
  -        //            IPageRecorder recorder = (IPageRecorder) entry.getValue();
  -        //
  -        //            if (!recorder.getHasChanges() || recorder.isMarkedForDiscard())
  -        //            {
  -        //                recorder.discard();
  -        //
  -        //                i.remove();
  -        //
  -        //                _activePageNames.remove(pageName);
  -        //      
  -        //       markDirty = true;
  -        //            }
  -        //        }
  -        //        
  -        //        if (markDirty)
  -        //         markDirty();
  -    }
  -
  -    /**
  -     * Returns an unmodifiable {@link Collection}of the page names for which {@link IPageRecorder}
  -     * instances exist.
  +     * Returns an unmodifiable {@link Collection} of the page names for which {@link IPageRecorder}
  +     * instances exist. Note: Starting in 4.0, this method is deprecated and returns an empty list.
  +     *
  +     * @deprecated
        */
   
       public Collection getActivePageNames()
  @@ -74,15 +41,4 @@
           return Collections.EMPTY_LIST;
   
       }
  -
  -    public IPageRecorder getPageRecorder(String pageName, IRequestCycle cycle)
  -    {
  -        throw new UnsupportedOperationException("getPageRecorder()");
  -    }
  -
  -    public IPageRecorder createPageRecorder(String pageName, IRequestCycle cycle)
  -    {
  -        throw new UnsupportedOperationException("createPageRecorder()");
  -    }
  -
   }
  \ No newline at end of file
 
 
 
  1.32      +12 -48    jakarta-tapestry/framework/src/java/org/apache/tapestry/engine/AbstractEngine.java
 
  Index: AbstractEngine.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/engine/AbstractEngine.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- AbstractEngine.java 18 Apr 2005 17:06:37 -0000 1.31
  +++ AbstractEngine.java 9 May 2005 20:43:02 -0000 1.32
  @@ -16,7 +16,6 @@
   
   import java.io.IOException;
   import java.util.ArrayList;
  -import java.util.Collection;
   import java.util.List;
   import java.util.Locale;
   
  @@ -39,7 +38,6 @@
   import org.apache.tapestry.RedirectException;
   import org.apache.tapestry.StaleLinkException;
   import org.apache.tapestry.StaleSessionException;
  -import org.apache.tapestry.Tapestry;
   import org.apache.tapestry.TapestryConstants;
   import org.apache.tapestry.listener.ListenerMap;
   import org.apache.tapestry.request.RequestContext;
  @@ -143,10 +141,13 @@
   
       /**
        * Invoked at the end of the request cycle to release any resources specific to the request
  -     * cycle.
  +     * cycle. This implementation does nothing and may be overriden freely.
        */
   
  -    protected abstract void cleanupAfterRequest(IRequestCycle cycle);
  +    protected void cleanupAfterRequest(IRequestCycle cycle)
  +    {
  +
  +    }
   
       /**
        * Returns the locale for the engine. This is initially set by the {@link ApplicationServlet}
  @@ -234,8 +235,7 @@
                   monitor.serviceBegin(service.getName(), _infrastructure.getRequest()
                           .getRequestURI());
   
  -                // Invoke the service, which returns true if it may have changed
  -                // the state of the engine (most do return true).
  +                // Let the service handle the rest of the request.
   
                   service.service(cycle);
   
  @@ -263,7 +263,7 @@
               monitor.serviceException(ex);
   
               // Attempt to switch to the exception page. However, this may itself
  -            // fail for a number of reasons, in which case a ApplicationRuntimeException is
  +            // fail for a number of reasons, in which case an ApplicationRuntimeException is
               // thrown.
   
               if (LOG.isDebugEnabled())
  @@ -283,7 +283,7 @@
               }
               catch (Exception ex)
               {
  -                reportException(Tapestry.getMessage("AbstractEngine.exception-during-cleanup"), ex);
  +                reportException(EngineMessages.exceptionDuringCleanup(ex), ex);
               }
           }
       }
  @@ -309,25 +309,9 @@
           {
               if (pageNames.contains(pageName))
               {
  -                // Add the offending page to pageNames so it shows in the
  -                // list.
  -
                   pageNames.add(pageName);
   
  -                StringBuffer buffer = new StringBuffer();
  -                int count = pageNames.size();
  -
  -                for (int i = 0; i < count; i++)
  -                {
  -                    if (i > 0)
  -                        buffer.append("; ");
  -
  -                    buffer.append(pageNames.get(i));
  -                }
  -
  -                throw new ApplicationRuntimeException(Tapestry.format(
  -                        "AbstractEngine.validate-cycle",
  -                        buffer.toString()));
  +                throw new ApplicationRuntimeException(EngineMessages.validateCycle(pageNames));
               }
   
               // Record that this page has been a target.
  @@ -393,9 +377,10 @@
        */
   
       protected void handleStaleSessionException(IRequestCycle cycle, StaleSessionException exception)
  -            throws IOException
       {
  -        redirect(getStaleSessionPageName(), cycle, exception);
  +        _infrastructure.getStaleSessionExceptionPresenter().presentStaleSessionException(
  +                cycle,
  +                exception);
       }
   
       /**
  @@ -440,13 +425,6 @@
       }
   
       /**
  -     * Implemented by subclasses to return the names of the active pages (pages for which recorders
  -     * exist). May return the empty list, but should not return null.
  -     */
  -
  -    abstract public Collection getActivePageNames();
  -
  -    /**
        * Gets the visit object from the
        * {@link org.apache.tapestry.engine.state.ApplicationStateManager}, creating it if it does not
        * already exist.
  @@ -553,25 +531,11 @@
   
       /** @since 3.0 */
   
  -    protected String getExceptionPageName()
  -    {
  -        return TapestryConstants.EXCEPTION_PAGE;
  -    }
  -
  -    /** @since 3.0 */
  -
       protected String getStaleLinkPageName()
       {
           return TapestryConstants.STALE_LINK_PAGE;
       }
   
  -    /** @since 3.0 */
  -
  -    protected String getStaleSessionPageName()
  -    {
  -        return TapestryConstants.STALE_SESSION_PAGE;
  -    }
  -
       /** @since 4.0 */
       public Infrastructure getInfrastructure()
       {
 
 
 
  1.4       +33 -2     jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.error.xml
 
  Index: tapestry.error.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.error.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- tapestry.error.xml 18 Apr 2005 17:07:50 -0000 1.3
  +++ tapestry.error.xml 9 May 2005 20:43:02 -0000 1.4
  @@ -21,10 +21,15 @@
     
     <service-point id="ExceptionPresenter">
       
  +    Handler for uncaught exceptions inside the main request
  +    processing code path; the default implementation
  +    displays the exception page to report the
  +    exception.
  +    
       <invoke-factory>
         <construct class="ExceptionPresenterImpl">
           <set-object property="exceptionPageName"
  -                       value="app-property:org.apache.tapestry.exception-page-name"/>
  +                       value="infrastructure:exceptionPageName"/>
           <set-object property="requestExceptionReporter"
                          value="infrastructure:requestExceptionReporter"/>
           <set-object property="responseRenderer"
  @@ -34,8 +39,27 @@
       
     </service-point>
     
  +  <service-point id="StaleSessionExceptionPresenter">
  +    
  +    Handler for StaleSessionExceptions, which indicate that
  +    the session has expired between the time a link or form
  +    was rendered, and the time it was triggered in a new request.
  +    
  +    <invoke-factory>
  +      <construct class="StaleSessionExceptionPresenterImpl">
  +        <set-object property="pageName"
  +                       value="infrastructure:staleSessionPageName"/>
  +        <set-object property="requestExceptionReporter"
  +                       value="infrastructure:requestExceptionReporter"/>
  +        <set-object property="responseRenderer"
  +                      value="infrastructure:responseRenderer"/>
  +      </construct>
  +    </invoke-factory>    
  +  </service-point>
  +  
     <contribution configuration-id="hivemind.FactoryDefaults">
       <default symbol="org.apache.tapestry.exception-page-name" value="Exception"/>
  +    <default symbol="org.apache.tapestry.stale-session-page-name" value="StaleSession"/>
     </contribution>
     
     
  @@ -52,8 +76,15 @@
     </service-point>  
     
     <contribution configuration-id="tapestry.Infrastructure">
  -    <property name="requestExceptionReporter" object="service:RequestExceptionReporter"/>\    
  +    <property name="exceptionPageName" value="Exception"/>
  +    <property name="exceptionPageName" mode="wml" value="WMLException"/>
  +    
  +    <property name="staleSessionPageName" value="StaleSession"/>
  +    <property name="staleSessionPageName" mode="wml" value="WMLStaleSession"/>
  +    
  +    <property name="requestExceptionReporter" object="service:RequestExceptionReporter"/>    
       <property name="exceptionPresenter" object="service:ExceptionPresenter"/>
  +    <property name="staleSessionExceptionPresenter" object="service:StaleSessionExceptionPresenter"/>
     </contribution>  
     
   </module>
  \ No newline at end of file
 
 
 
  1.41      +5 -1      jakarta-tapestry/framework/src/descriptor/META-INF/hivemodule.xml
 
  Index: hivemodule.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/descriptor/META-INF/hivemodule.xml,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- hivemodule.xml 6 May 2005 17:29:10 -0000 1.40
  +++ hivemodule.xml 9 May 2005 20:43:02 -0000 1.41
  @@ -76,10 +76,14 @@
           Infrastructure mode.
         </attribute>
         
  -      <attribute name="object" required="true" translator="deferred-object">
  +      <attribute name="object"  translator="deferred-object">
           The object to be contributed into the Infrastructure property.
         </attribute>
         
  +      <attribute name="value">
  +        A literal value for the property.  Either value or object should be provided.
  +      </attribute>
  +      
         <conversion class="impl.InfrastructureContribution">
           <map attribute="name" property="property"/>
           <map attribute="object" property="deferredObject"/>
 
 
 
  1.31      +7 -0      jakarta-tapestry/framework/src/java/org/apache/tapestry/services/Infrastructure.java
 
  Index: Infrastructure.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/services/Infrastructure.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- Infrastructure.java 18 Apr 2005 17:06:38 -0000 1.30
  +++ Infrastructure.java 9 May 2005 20:43:02 -0000 1.31
  @@ -26,6 +26,7 @@
   import org.apache.tapestry.engine.state.ApplicationStateManager;
   import org.apache.tapestry.error.ExceptionPresenter;
   import org.apache.tapestry.error.RequestExceptionReporter;
  +import org.apache.tapestry.error.StaleSessionExceptionPresenter;
   import org.apache.tapestry.listener.ListenerMapSource;
   import org.apache.tapestry.markup.MarkupWriterSource;
   import org.apache.tapestry.spec.IApplicationSpecification;
  @@ -244,4 +245,10 @@
        */
   
       public ListenerMapSource getListenerMapSource();
  +
  +    /**
  +     * The service responsible for reporting {@link org.apache.tapestry.StaleSessionException}s.
  +     */
  +
  +    public StaleSessionExceptionPresenter getStaleSessionExceptionPresenter();
   }
  \ No newline at end of file
 
 
 
  1.4       +1 -39     jakarta-tapestry/framework/src/test/org/apache/tapestry/error/TestExceptionPresenter.java
 
  Index: TestExceptionPresenter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/test/org/apache/tapestry/error/TestExceptionPresenter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestExceptionPresenter.java 18 Apr 2005 17:07:53 -0000 1.3
  +++ TestExceptionPresenter.java 9 May 2005 20:43:03 -0000 1.4
  @@ -21,8 +21,6 @@
   import org.apache.tapestry.error.ExceptionPresenterImpl;
   import org.apache.tapestry.html.BasePage;
   import org.apache.tapestry.services.ResponseRenderer;
  -import org.apache.tapestry.test.Creator;
  -import org.easymock.MockControl;
   
   /**
    * Tests for {@link org.apache.tapestry.error.ExceptionPresenterImpl}.
  @@ -30,49 +28,13 @@
    * @author Howard M. Lewis Ship
    * @since 4.0
    */
  -public class TestExceptionPresenter extends HiveMindTestCase
  +public class TestExceptionPresenter extends BaseErrorTestCase
   {
       public abstract static class ExceptionFixture extends BasePage
       {
           public abstract void setException(Throwable exception);
       }
   
  -    private IPage newPage()
  -    {
  -        Creator c = new Creator();
  -
  -        return (IPage) c.newInstance(ExceptionFixture.class);
  -    }
  -
  -    private IRequestCycle newCycle(String pageName, IPage page)
  -    {
  -        MockControl control = newControl(IRequestCycle.class);
  -        IRequestCycle cycle = (IRequestCycle) control.getMock();
  -
  -        cycle.getPage(pageName);
  -        control.setReturnValue(page);
  -
  -        return cycle;
  -    }
  -
  -    private ResponseRenderer newRenderer(IRequestCycle cycle, Throwable throwable) throws Exception
  -    {
  -        MockControl control = newControl(ResponseRenderer.class);
  -        ResponseRenderer renderer = (ResponseRenderer) control.getMock();
  -
  -        renderer.renderResponse(cycle);
  -
  -        if (throwable != null)
  -            control.setThrowable(throwable);
  -
  -        return renderer;
  -    }
  -
  -    private RequestExceptionReporter newReporter()
  -    {
  -        return (RequestExceptionReporter) newMock(RequestExceptionReporter.class);
  -    }
  -
       public void testSuccess() throws Exception
       {
           Throwable cause = new IllegalArgumentException();
 
 
 
  1.1                  jakarta-tapestry/framework/src/test/org/apache/tapestry/error/TestStaleSessionExceptionPresenter.java
 
  Index: TestStaleSessionExceptionPresenter.java
  ===================================================================
  // Copyright 2005 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.
  // You may obtain a copy of the License at
  //
  //     http://www.apache.org/licenses/LICENSE-2.0
  //
  // Unless required by applicable law or agreed to in writing, software
  // distributed under the License is distributed on an "AS IS" BASIS,
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  // See the License for the specific language governing permissions and
  // limitations under the License.
 
  package org.apache.tapestry.error;
 
  import org.apache.hivemind.ApplicationRuntimeException;
  import org.apache.tapestry.IPage;
  import org.apache.tapestry.IRequestCycle;
  import org.apache.tapestry.StaleSessionException;
  import org.apache.tapestry.services.ResponseRenderer;
 
  /**
   * Tests for {@link org.apache.tapestry.error.StaleSessionExceptionPresenterImpl}.
   *
   * @author Howard M. Lewis Ship
   * @since 4.0
   */
  public class TestStaleSessionExceptionPresenter extends BaseErrorTestCase
  {
      public void testSuccess() throws Exception
      {
          IPage page = newPage();
          IRequestCycle cycle = newCycle("StaleSession", page);
          ResponseRenderer renderer = newRenderer(cycle, null);
 
          cycle.activate(page);
 
          replayControls();
 
          StaleSessionExceptionPresenterImpl presenter = new StaleSessionExceptionPresenterImpl();
 
          presenter.setPageName("StaleSession");
          presenter.setResponseRenderer(renderer);
 
          presenter.presentStaleSessionException(cycle, new StaleSessionException());
 
          verifyControls();
      }
 
      public void testFailure() throws Exception
      {
          StaleSessionException cause = new StaleSessionException();
          Throwable renderCause = new ApplicationRuntimeException("Some failure.");
 
          IPage page = newPage();
 
          IRequestCycle cycle = newCycle("StaleSession", page);
          ResponseRenderer renderer = newRenderer(cycle, renderCause);
          RequestExceptionReporter reporter = newReporter();
 
          cycle.activate(page);
 
          reporter.reportRequestException(ErrorMessages.unableToProcessClientRequest(cause), cause);
          reporter.reportRequestException(
                  ErrorMessages.unableToPresentExceptionPage(renderCause),
                  renderCause);
 
          replayControls();
 
          StaleSessionExceptionPresenterImpl presenter = new StaleSessionExceptionPresenterImpl();
          presenter.setPageName("StaleSession");
          presenter.setResponseRenderer(renderer);
          presenter.setRequestExceptionReporter(reporter);
 
          try
          {
              presenter.presentStaleSessionException(cycle, cause);
              unreachable();
          }
          catch (ApplicationRuntimeException ex)
          {
              assertSame(renderCause, ex.getRootCause());
          }
 
          verifyControls();
      }
  }
 
 
 
  1.1                  jakarta-tapestry/framework/src/test/org/apache/tapestry/error/BaseErrorTestCase.java
 
  Index: BaseErrorTestCase.java
  ===================================================================
  // Copyright 2005 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.
  // You may obtain a copy of the License at
  //
  //     http://www.apache.org/licenses/LICENSE-2.0
  //
  // Unless required by applicable law or agreed to in writing, software
  // distributed under the License is distributed on an "AS IS" BASIS,
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  // See the License for the specific language governing permissions and
  // limitations under the License.
 
  package org.apache.tapestry.error;
 
  import org.apache.hivemind.test.HiveMindTestCase;
  import org.apache.tapestry.IPage;
  import org.apache.tapestry.IRequestCycle;
  import org.apache.tapestry.error.TestExceptionPresenter.ExceptionFixture;
  import org.apache.tapestry.services.ResponseRenderer;
  import org.apache.tapestry.test.Creator;
  import org.easymock.MockControl;
 
  /**
   * Base class for tests of the various error reporting service implementations.
   *
   * @author Howard M. Lewis Ship
   * @since 4.0
   */
  public abstract class BaseErrorTestCase extends HiveMindTestCase
  {
 
      protected IPage newPage()
      {
          Creator c = new Creator();
     
          return (IPage) c.newInstance(ExceptionFixture.class);
      }
 
      protected IRequestCycle newCycle(String pageName, IPage page)
      {
          MockControl control = newControl(IRequestCycle.class);
          IRequestCycle cycle = (IRequestCycle) control.getMock();
     
          cycle.getPage(pageName);
          control.setReturnValue(page);
     
          return cycle;
      }
 
      protected ResponseRenderer newRenderer(IRequestCycle cycle, Throwable throwable) throws Exception
      {
          MockControl control = newControl(ResponseRenderer.class);
          ResponseRenderer renderer = (ResponseRenderer) control.getMock();
     
          renderer.renderResponse(cycle);
     
          if (throwable != null)
              control.setThrowable(throwable);
     
          return renderer;
      }
 
      protected RequestExceptionReporter newReporter()
      {
          return (RequestExceptionReporter) newMock(RequestExceptionReporter.class);
      }
 
  }
 
 
 
  1.13      +15 -0     jakarta-tapestry/portlet/src/descriptor/META-INF/hivemodule.xml
 
  Index: hivemodule.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/portlet/src/descriptor/META-INF/hivemodule.xml,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- hivemodule.xml 4 May 2005 23:03:42 -0000 1.12
  +++ hivemodule.xml 9 May 2005 20:43:03 -0000 1.13
  @@ -244,11 +244,26 @@
           <set-object property="requestExceptionReporter"
                          value="infrastructure:requestExceptionReporter"/>  
           <set-object property="renderStrategy" value="service:tapestry.describe.RenderStrategy"/>
  +        <set-object property="markupWriterSource" value="infrastructure:markupWriterSource"/>
        </construct>
       </invoke-factory>
       
     </service-point>
     
  +  <service-point id="PortletStaleSessionExceptionPresenter" interface="org.apache.tapestry.error.StaleSessionExceptionPresenter">
  +    
  +    Displays a short message announcing that the session has expired.
  +    
  +    <invoke-factory>
  +      <construct class="PortletStaleSessionExceptionPresenter">
  +        <set-service property="globals" service-id="PortletRequestGlobals"/>
  +        <set-object property="requestExceptionReporter"
  +                       value="infrastructure:requestExceptionReporter"/>  
  +      </construct>
  +    </invoke-factory>
  +    
  +  </service-point>
  +  
    <contribution configuration-id="tapestry.describe.DescribableStrategies">
       <strategy class="javax.portlet.PortletSession" object="instance:PortletSessionDescribableStrategy"/>
       <strategy class="javax.portlet.PortletConfig" object="instance:PortletConfigStrategy"/>
 
 
 
  1.5       +2 -0      jakarta-tapestry/framework/src/scripts/TestWMLSelect.xml
 
  Index: TestWMLSelect.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/scripts/TestWMLSelect.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestWMLSelect.xml 29 Mar 2005 15:24:29 -0000 1.4
  +++ TestWMLSelect.xml 9 May 2005 20:43:03 -0000 1.5
  @@ -22,6 +22,8 @@
      <init-parameter
      name="org.apache.tapestry.application-specification"
      value="/org/apache/tapestry/junit/mock/wml/Mock.application"/>
  +      <init-parameter
  +          name="org.apache.tapestry.application-mode" value="wml"/>            
      </servlet>
   
       <request>
 
 
 
  1.4       +2 -0      jakarta-tapestry/framework/src/scripts/TestWMLTimer.xml
 
  Index: TestWMLTimer.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/scripts/TestWMLTimer.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestWMLTimer.xml 5 Jan 2005 23:17:16 -0000 1.3
  +++ TestWMLTimer.xml 9 May 2005 20:43:03 -0000 1.4
  @@ -22,6 +22,8 @@
      <init-parameter
      name="org.apache.tapestry.application-specification"
      value="/org/apache/tapestry/junit/mock/wml/Mock.application"/>
  +      <init-parameter
  +          name="org.apache.tapestry.application-mode" value="wml"/>            
      </servlet>
   
       <request>
 
 
 
  1.7       +2 -0      jakarta-tapestry/framework/src/scripts/TestWMLComponents.xml
 
  Index: TestWMLComponents.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/scripts/TestWMLComponents.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TestWMLComponents.xml 9 Apr 2005 00:54:07 -0000 1.6
  +++ TestWMLComponents.xml 9 May 2005 20:43:03 -0000 1.7
  @@ -22,6 +22,8 @@
      <init-parameter
      name="org.apache.tapestry.application-specification"
      value="/org/apache/tapestry/junit/mock/wml/Mock.application"/>
  +      <init-parameter
  +        name="org.apache.tapestry.application-mode" value="wml"/>
      </servlet>
   
       <request>
 
 
 
  1.7       +2 -0      jakarta-tapestry/framework/src/scripts/TestWMLStaleSession.xml
 
  Index: TestWMLStaleSession.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/scripts/TestWMLStaleSession.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TestWMLStaleSession.xml 9 Apr 2005 00:54:07 -0000 1.6
  +++ TestWMLStaleSession.xml 9 May 2005 20:43:03 -0000 1.7
  @@ -22,6 +22,8 @@
           <init-parameter
               name="org.apache.tapestry.application-specification"
               value="/org/apache/tapestry/junit/mock/wml/Mock.application"/>
  +        <init-parameter
  +            name="org.apache.tapestry.application-mode" value="wml"/>                
       </servlet>
   
       <request>
 
 
 
  1.4       +2 -0      jakarta-tapestry/framework/src/scripts/TestWMLContentType.xml
 
  Index: TestWMLContentType.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/scripts/TestWMLContentType.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestWMLContentType.xml 6 Jan 2005 02:17:19 -0000 1.3
  +++ TestWMLContentType.xml 9 May 2005 20:43:03 -0000 1.4
  @@ -22,6 +22,8 @@
           <init-parameter
               name="org.apache.tapestry.application-specification"
               value="/org/apache/tapestry/junit/mock/wml/Mock.application"/>
  +        <init-parameter
  +            name="org.apache.tapestry.application-mode" value="wml"/>            
       </servlet>
   
       <request>
 
 
 
  1.7       +2 -0      jakarta-tapestry/framework/src/scripts/TestWMLFormComponents.xml
 
  Index: TestWMLFormComponents.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/scripts/TestWMLFormComponents.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TestWMLFormComponents.xml 9 Apr 2005 00:54:07 -0000 1.6
  +++ TestWMLFormComponents.xml 9 May 2005 20:43:03 -0000 1.7
  @@ -22,6 +22,8 @@
           <init-parameter
               name="org.apache.tapestry.application-specification"
               value="/org/apache/tapestry/junit/mock/wml/Mock.application"/>
  +        <init-parameter
  +            name="org.apache.tapestry.application-mode" value="wml"/>                
       </servlet>
   
       <request>
 
 
 
  1.4       +2 -0      jakarta-tapestry/framework/src/scripts/TestWMLNestedCard.xml
 
  Index: TestWMLNestedCard.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/scripts/TestWMLNestedCard.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestWMLNestedCard.xml 6 Jan 2005 02:17:19 -0000 1.3
  +++ TestWMLNestedCard.xml 9 May 2005 20:43:03 -0000 1.4
  @@ -22,6 +22,8 @@
           <init-parameter
               name="org.apache.tapestry.application-specification"
               value="/org/apache/tapestry/junit/mock/wml/Mock.application"/>
  +        <init-parameter
  +            name="org.apache.tapestry.application-mode" value="wml"/>                
       </servlet>
   
       <request>
 
 
 
  1.21      +0 -2      jakarta-tapestry/framework/src/java/org/apache/tapestry/TapestryStrings.properties
 
  Index: TapestryStrings.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/TapestryStrings.properties,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- TapestryStrings.properties 3 May 2005 17:41:26 -0000 1.20
  +++ TapestryStrings.properties 9 May 2005 20:43:03 -0000 1.21
  @@ -109,9 +109,7 @@
   AbstractEngine.unable-to-begin-request=Tapestry unable to begin processing request.
   AbstractEngine.unable-to-cleanup-page=Unable to cleanup page {0}.
   AbstractEngine.unable-to-create-cleanup-context=Unable to create an instance of RequestContext to process end-of-session page cleanups.
  -AbstractEngine.exception-during-cleanup=Exception during post-request cleanup.
   AbstractEngine.exception-during-cache-clear=Exception while clearing caches after request.
  -AbstractEngine.validate-cycle=A validate cycle during page activation was detected: {0}.
   
   ActionService.context-parameters=Service action requires either three or four service contect parameters.
   ActionService.action-component-wrong-type=Component {0} does not implement the IAction interface.
 
 
 
  1.19      +4 -4      jakarta-tapestry/framework/src/java/org/apache/tapestry/IEngine.java
 
  Index: IEngine.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/IEngine.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- IEngine.java 18 Apr 2005 17:06:42 -0000 1.18
  +++ IEngine.java 9 May 2005 20:43:03 -0000 1.19
  @@ -68,7 +68,7 @@
       /**
        * Returns the application specification that defines the application and its pages.
        *
  -     * @deprecated To be removed in 4.1. This value can be injected.
  +     * @deprecated To be removed in 4.1. This value can be injected as "infrastructure:applicationSpecification".
        */
   
       public IApplicationSpecification getSpecification();
  @@ -78,7 +78,7 @@
        * between sessions.
        *
        * @see org.apache.tapestry.engine.AbstractEngine#createSpecificationSource(RequestContext)
  -     * @deprecated To be removed in 4.1. This value can be injected.
  +     * @deprecated To be removed in 4.1. This value can be injected as "infrastructure:specificationSource".
        */
   
       public ISpecificationSource getSpecificationSource();
  @@ -138,7 +138,7 @@
        * between all sessions.
        *
        * @since 1.0.2
  -     * @deprecated To be removed in 4.1. This value can now be injected.
  +     * @deprecated To be removed in 4.1. This value can now be injected as "infrastructure:scriptSource".
        */
   
       public IScriptSource getScriptSource();
  @@ -158,7 +158,7 @@
        *
        * @since 2.3
        * @see org.apache.tapestry.engine.AbstractEngine#createPropertySource(RequestContext)
  -     * @deprecated To be removed in 4.1. This value can now be injected.
  +     * @deprecated To be removed in 4.1. This value can now be injected as "infrastructure:applicationPropertySource".
        */
   
       public IPropertySource getPropertySource();
 
 
 
  1.18      +22 -23    jakarta-tapestry/framework/src/java/org/apache/tapestry/Tapestry.java
 
  Index: Tapestry.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/Tapestry.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- Tapestry.java 18 Apr 2005 17:06:42 -0000 1.17
  +++ Tapestry.java 9 May 2005 20:43:03 -0000 1.18
  @@ -31,6 +31,7 @@
   import org.apache.hivemind.ApplicationRuntimeException;
   import org.apache.hivemind.HiveMind;
   import org.apache.hivemind.Location;
  +import org.apache.hivemind.service.ClassFabUtils;
   import org.apache.tapestry.event.ChangeObserver;
   import org.apache.tapestry.event.ObservedChangeEvent;
   import org.apache.tapestry.services.ServiceConstants;
  @@ -49,7 +50,7 @@
   {
       /**
        * The name ("action") of a service that allows behavior to be associated with an
  -     * {@link IAction}component, such as {@link org.apache.tapestry.link.ActionLink}or
  +     * {@link IAction} component, such as {@link org.apache.tapestry.link.ActionLink }or
        * {@link org.apache.tapestry.form.Form}.
        * <p>
        * This service is used with actions that are tied to the dynamic state of the page, and whi