One thing to notice is that a form component has a validation tracker
and that is persisted in session behind the scenes. To avoid this we
provide a new validation tracker to every form like this:

Tml:->
<t:form tracker="validationTracker" t:id="mySessionlessForm">
        <t:blah/>
</t:form>

Class: ->

/**
         * This is essentially a hack to stop the session from being
created. HLS told us to return a new
         * [EMAIL PROTECTED] ValidationTrackerImpl} per request
         * 
         * @return
         */
        public ValidationTracker getValidationTracker() {
                return new ValidationTrackerImpl();
        }

        public void setValidationTracker(ValidationTracker
validationTracker) {
                // NO OP
        }

That is the one tip I can offer apart from don't use persist, use
onActivate and onPassivate (as other poster said).

If you do come across any other scalability gotchas please post them. I
will do likewise if we discover any as we move forward with our
development.

Cheers

Russell

-----Original Message-----
From: Jack Nuzbit [mailto:[EMAIL PROTECTED] 
Sent: 16 October 2008 15:32
To: Tapestry users
Subject: tapestry 5 without sessions

I'm about to start a large project and intend to use tapestry 5 but want
to
avoid using sessions due to scalability.  The only issue I can see is
losing
form data when the validation fails because of the redirect after the
post.

I've noticed the property
tapestry.suppress-redirect-from-action-requests
but in general I prefer this behaviour so I'd rather not use this if
there
is an alternative. Plus the documentation says 'This option should be
used
with care' which makes me nervous about using it at all.

The only time I don't want a redirect occurring is when validation fails
and
form data needs to be presented back to the user without being
persisted. Is
there a way to do this because being forced to use session just for this
reason doesn't seem worthwhile.

I'm wondering what other peoples thoughts and approaches were to this
problem.
Has anyone used tapestry5 without sessions?


Cheers,

Jack

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to