Hmm... I can't reproduce. I assume you're running in a test environment
with controlled requests.

I could imagine extra GET requests caused by broken CSS, but that shouldn't
trigger a onValidate, unless maybe you've rigged something up to process
the form from a GET?

public class About {

    @Inject
    private Request request;

    void onActivate() {
        log("onActivate");
    }

    void onValidate() {
        log("onValidate");
    }

    void onSuccess() throws Exception {
        try {
            Thread.sleep(60000);
        } catch (Exception e) {

        }
        log("onSuccess");
    }

    private void log(String method) {
        System.out.printf(
                "%s %s %s%n", method, request.getMethod(), request.getPath()
        );
    }
}



Output:

onActivate GET /about
onActivate POST /about.form
onValidate POST /about.form
onSuccess POST /about.form
onActivate GET /about


On Mon, Apr 15, 2013 at 10:59 AM, George Christman
<gchrist...@cardaddy.com>wrote:

> Hello, I have a long running process in my onSuccess method. I'm
> noticing my onActivate and onValidate methods are being called
> multiple times before the onSuccess method has actually completed. I
> was able to successfully reproduce this using Thread.sleep in the
> following example. Does anybody know why this my be happening?
>
> onActivate() {
>    System.out.println("onActivate");
> }
>
> onValidate() {
>    System.out.println("onValidate");
> }
>
> Object onSuccess() throws Exception {
>         if(ApplicationActionEnum.GENERATE_PO == this.action) {
>             try {
>                 Thread.sleep(60000);
>             } catch (Exception e) {
>
>             }
>         }
>         System.out.println("onSuccess");
>         return Index.class;
>     }
>
> My output.
>
> onActivate
> pnValidate
> onActivate
> pnValidate
> OnSuccess
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to