You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "B.S.Navin (JIRA)" <ta...@jakarta.apache.org> on 2006/09/29 05:49:53 UTC

[jira] Created: (TAPESTRY-1101) @Persist("session") does not make the accessor fetch from session everytime

@Persist("session") does not make the accessor fetch from session everytime
---------------------------------------------------------------------------

                 Key: TAPESTRY-1101
                 URL: http://issues.apache.org/jira/browse/TAPESTRY-1101
             Project: Tapestry
          Issue Type: Bug
          Components: Core
    Affects Versions: 4.0.2
            Reporter: B.S.Navin


I was going through the Persistence mechanism implementations in Tapestry 4.0.2 and came across the following behaviour:

----------------------
For properties marked as @Persist("session"), the mutator(setter) stores the value in a instance variable and also puts it into session using the corresponding persistence strategy. But the accessor(getter) just fetches the value stored in the instance variable and does not check for an updated value within the session.
----------------------

This entire approach works fine until we start getting multiple simultaneous requests within the same session (which is possible when using asynchronous requests).

Here's a sample scenario where the above approach may cause a problem:

----------------------
Assume that 2 asynchronous requests (say 2 lookups) are running of the same page (same page class, but 2 different instances), simultaneously.

If Request#1 updates an @Persist("session") property value, Request#2 will not see this updated value as the accessor of that property.
----------------------

Is what I have mentioned here right? Or is there something in the code that escaped my notice?


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Closed: (TAPESTRY-1101) @Persist("session") does not make the accessor fetch from session everytime

Posted by "Jesse Kuhnert (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-1101?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jesse Kuhnert closed TAPESTRY-1101.
-----------------------------------

    Resolution: Won't Fix

Right - this is for performance reasons. In clustered environments actually reading from  / to the session on every access would be a huge drain on performance. If an actual problem creeps up we will of course address it but I'm wondering if this is really a problem for you?

> @Persist("session") does not make the accessor fetch from session everytime
> ---------------------------------------------------------------------------
>
>                 Key: TAPESTRY-1101
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1101
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 4.0.2
>            Reporter: B.S.Navin
>             Fix For: 4.1.2
>
>
> I was going through the Persistence mechanism implementations in Tapestry 4.0.2 and came across the following behaviour:
> ----------------------
> For properties marked as @Persist("session"), the mutator(setter) stores the value in a instance variable and also puts it into session using the corresponding persistence strategy. But the accessor(getter) just fetches the value stored in the instance variable and does not check for an updated value within the session.
> ----------------------
> This entire approach works fine until we start getting multiple simultaneous requests within the same session (which is possible when using asynchronous requests).
> Here's a sample scenario where the above approach may cause a problem:
> ----------------------
> Assume that 2 asynchronous requests (say 2 lookups) are running of the same page (same page class, but 2 different instances), simultaneously.
> If Request#1 updates an @Persist("session") property value, Request#2 will not see this updated value as the accessor of that property.
> ----------------------
> Is what I have mentioned here right? Or is there something in the code that escaped my notice?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (TAPESTRY-1101) @Persist("session") does not make the accessor fetch from session everytime

Posted by "Jesse Kuhnert (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-1101?page=all ]

Jesse Kuhnert updated TAPESTRY-1101:
------------------------------------

    Fix Version/s: 4.1.2

> @Persist("session") does not make the accessor fetch from session everytime
> ---------------------------------------------------------------------------
>
>                 Key: TAPESTRY-1101
>                 URL: http://issues.apache.org/jira/browse/TAPESTRY-1101
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 4.0.2
>            Reporter: B.S.Navin
>             Fix For: 4.1.2
>
>
> I was going through the Persistence mechanism implementations in Tapestry 4.0.2 and came across the following behaviour:
> ----------------------
> For properties marked as @Persist("session"), the mutator(setter) stores the value in a instance variable and also puts it into session using the corresponding persistence strategy. But the accessor(getter) just fetches the value stored in the instance variable and does not check for an updated value within the session.
> ----------------------
> This entire approach works fine until we start getting multiple simultaneous requests within the same session (which is possible when using asynchronous requests).
> Here's a sample scenario where the above approach may cause a problem:
> ----------------------
> Assume that 2 asynchronous requests (say 2 lookups) are running of the same page (same page class, but 2 different instances), simultaneously.
> If Request#1 updates an @Persist("session") property value, Request#2 will not see this updated value as the accessor of that property.
> ----------------------
> Is what I have mentioned here right? Or is there something in the code that escaped my notice?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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