문제

I've been reading about the conversation scope in Java EE 6 (and therefore CDI 1.0), and how it can isolate data from different tabs in a browser, and preserve data across many requests of a particular workflow of pages. I've no issues there.

In my reading, I've read that many of its ideas came from Seam. Often I see caveats such as 'but CDI's conversationscope does not do "nested" conversations'. I'm not sure what exactly a "nested" conversation is?

I've read this good link also http://www.andygibson.net/blog/article/understanding-nested-conversations/

but I think I'm missing something fundamental.. I'm just not fully getting what a "nested" conversation is in this context. Can anyone help dumb it down for me?

도움이 되었습니까?

해결책

From the Seam 2 documentation:

A nested conversation has its own conversation context, but can read values from the outer conversation's context. The outer conversation's context is read-only within a nested conversation, but because objects are obtained by reference, changes to the objects themselves will be reflected in the outer context.

So with nested conversations you have the chance to split a given parent conversation into several child conversations, each with both their context and access to the parent's context.

Although CDI was heavily influenced by Seam, it is so to say only a common denominator of several influences, so it does not contain everything which Seam had. The idea was, that by creating CDI extensions, such as Seam 3 was about and what now should be done by Apache Deltaspike, more features commonly used could be provided above the CDI standard.

Unfortunately, I am very disappointed with what Deltaspike provides and allthough JavaEE 6 and thus CDI is so long in existence, there is still a gap between what I was used to with my Seam 2 projects. I mean honestly, just have a look at the Deltaspike Homepage which starts with the words "Some logos ideas" which in turn ends my confidence in it...

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top