[jboss-user] [JBoss Seam] - Injecting a narrower-scoped bean into a wider-scoped bean

adamw do-not-reply at jboss.com
Fri Oct 12 04:16:01 EDT 2007


Hello,

I looked through the manual, but couldn't find an answer.

Let's say I have beans with following scopes:
* A - application
* S - stateless
* C - conversation

In the examples I have often seen C-beans are injected into S-beans. As I understand, this is correct wrt to concurrent requests, that is, Seam will create enough copies of S-beans so that an S-bean serves at most one request at a time (if that wasn't true, and two requests invoked a method on an S-bean at the same time, one injected value would overwrite the other...)?

Creating additional beans isn't possible with A-beans however: Seam can create at most one A-bean. So I suppose injecting a C-bean into an A-bean should produce an error, or at least a warning, right?

-- 
Regards,
Adam

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094405#4094405

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094405



More information about the jboss-user mailing list