[JBoss Seam] - Re: Web Beans Sneak Peek
by gavin.king@jboss.com
anonymous wrote : I know that this has also been raise about Seam but would it be possible to remove that annotation and use the value() of the @Component annotation or add a "name" attribute to it instead? I found it would be more meaningful this way. Or maybe the @Named attribute has other uses which requires it to be separate?
There are many component type annotations (@Component, @Standard, and all the user-defined component types). It doesn't make sense to re-declare the name attribute each time we create a new component type.
And please compare:
@Component(name="foo")
| @Component @Name("foo")
The only difference is a single space.
anonymous wrote : In the example that you give in part 4 about how to use injection in resolver method, wouldn't it be better to instantiate the component through the Web Beans API instead of having the container inject 3 values and in the end only using one of them?
You can do that if you like. It will look like:
Component<Foo> comp = container.resolveByType(Foo.class);
| Foo foo = container.getContext(comp.getScope()).get(comp)
anonymous wrote : It probably is too soon to discuss this but are there any plans to replace Seam's component model with Web Beans? I know that some features/behaviour of the Seam component model might be missing from the Web Beans specification but is the ultimate goal the one day use it in Seam?
The current Seam codebase will evolve into the Web Beans RI. Then non-standardized features of Seam will be layered over the Web Beans standard.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4089381#4089381
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089381
18 years, 6 months
[JBoss Seam] - Re: #{conversationList} appears to be empty
by jacob.orshalick
By invoking an action annotated with @Begin, you will promote a conversation to long-running. This should cause a ConversationEntry to show up in your conversationList. Add a print statement in the @Begin to make sure your method is actually being invoked.
Also, here is a quick way to see when conversations are being started and ended:
@Name("conversationLogger")
| public class ConversationLogger implements Serializable {
| @Logger
| private Log log;
|
| @Observer("org.jboss.seam.beginConversation")
| public void logConversationBegin()
| {
| Conversation currentConversation = Conversation.instance();
|
| log.info("Beginning conversation: #0, Parent Id: #1",
| currentConversation.getId(), currentConversation.getParentId());
| }
|
| @Observer("org.jboss.seam.endConversation")
| public void logConversationEnd()
| {
| Conversation currentConversation = Conversation.instance();
|
| log.info("Ending conversation: #0, Parent Id: #1",
| currentConversation.getId(), currentConversation.getParentId());
| }
| }
I find this very helpful, especially when using nested conversations.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4089376#4089376
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089376
18 years, 6 months