That's the saving, but that's not what I mean :-).

1) Certainly with save state = server, there is only 1 uiview tree per session per viewId=jsp page, right?
2) If so, what happens if 2 concurrent requests are executed for the same session/viewId? The same tree is used? (You seem to imply a different tree is created for each request, whose state is initialized to the last saved state, which triggers questions about which of the concurrent executions will finally save the state for the next batch).
3) Where is the code that handles this (if the answer to 1 and 2 is "no").

I know there is some synchronization for this in RI somewhere (although I did not completely work it through).


On 20 Oct 2005, at 13:45, Mathias Brökelmann wrote:

It´s done in the implementation of the StateManager:

JspStateManagerImpl.saveSerializedView(...)
to save the component tree and the component state and
JspStateManagerImpl.restoreView(...)
to restore the component tree and the components state

The state of the components is collected by
UIComponent.processSaveState() and populated by
UIComponent.processRestoreState() these methods traverses the
component tree and call StateHolder.saveState() or
StateHolder.restoreState() for each component.

The StateHolder is responsible for collecting/populating the state and
how the state is carried between the requests. JSF defines two default
modes client and server side state saving. If client side is used the
component tree and component state is written to the response in a way
so that a request based on the response send this data back to the
server. This is normally done by hidden input fields or if javascript
is disabled by url params (which is limited of course).

Server side state is simply stored in the session.

2005/10/20, ir. ing. Jan Dockx <[EMAIL PROTECTED]>:
I mean, which class, which method?


On 19 Oct 2005, at 19:14, ir. ing. Jan Dockx wrote:

Some things are unclear in that respect for me. If "Each request has
its own component tree instantiated", how is view state information
carried across request/response cycles then?

Can you point me to the code in question? It's been difficult to find.

On 19 Oct 2005, at 14:29, Mathias Brökelmann wrote:

Each request has its own component tree instantiated. So there should
no problem with concurrency. If you use session or application scoped
beans then you have to care for concurrency of course.

2005/10/19, ir. ing. Jan Dockx <[EMAIL PROTECTED]>:
What happens if 2 concurrent requests for the same uiview are
received
in MyFaces? Are they serialized? Is a second component tree
instantiated? Or are there indeed concurrency problems?


Met vriendelijke groeten,

Jan Dockx

PeopleWare NV - Head Office
Cdt.Weynsstraat 85
B-2660 Hoboken
Tel: +32 3 448.33.38
Fax: +32 3 448.32.66

PeopleWare NV - Branch Office Geel
Kleinhoefstraat 5
B-2440 Geel
Tel: +32 14 57.00.90
Fax: +32 14 58.13.25

http://www.peopleware.be/
http://www.mobileware.be/




--
Mathias


Met vriendelijke groeten,

Jan Dockx

PeopleWare NV - Head Office
Cdt.Weynsstraat 85
B-2660 Hoboken
Tel: +32 3 448.33.38
Fax: +32 3 448.32.66

PeopleWare NV - Branch Office Geel
Kleinhoefstraat 5
B-2440 Geel
Tel: +32 14 57.00.90
Fax: +32 14 58.13.25

http://www.peopleware.be/
http://www.mobileware.be/

Met vriendelijke groeten,

Jan Dockx

PeopleWare NV - Head Office
Cdt.Weynsstraat 85
B-2660 Hoboken
Tel: +32 3 448.33.38
Fax: +32 3 448.32.66

PeopleWare NV - Branch Office Geel
Kleinhoefstraat 5
B-2440 Geel
Tel: +32 14 57.00.90
Fax: +32 14 58.13.25

http://www.peopleware.be/
http://www.mobileware.be/





--
Mathias


<x-tad-smaller>Met vriendelijke groeten,

Jan Dockx
</x-tad-smaller><x-tad-smaller>
PeopleWare NV - Head Office</x-tad-smaller>
<x-tad-smaller>
Cdt.Weynsstraat 85
B-2660 Hoboken
Tel: +32 3 448.33.38
Fax: +32 3 448.32.66 </x-tad-smaller>
<x-tad-bigger>
</x-tad-bigger>
<x-tad-smaller>
PeopleWare NV - Branch Office Geel</x-tad-smaller>
<x-tad-smaller>
Kleinhoefstraat 5
B-2440 Geel
Tel: +32 14 57.00.90
Fax: +32 14 58.13.25</x-tad-smaller>
<x-tad-bigger>
</x-tad-bigger>
<x-tad-smaller>
http://www.peopleware.be/
</x-tad-smaller><x-tad-smaller>http://www.mobileware.be/</x-tad-smaller>

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to