[jboss-user] [JBoss Seam] - doc on component/sfsb and scope

arussel do-not-reply at jboss.com
Tue Sep 25 02:37:23 EDT 2007

My understanding of a seam component was that it was managed by seam, one and only one is created by scope and so is a singleton.
So when a seam component wants another component to be injected with @In,  it looks into its scope and higher scope to find the named component to inject.
If I have:class @Name("Bar") class Bar{ @In Foo foo;}
seams look into Bar scope, then higher scope to find a foo component and inject it.
If @In(create = true)  then seam creates it if it does not exists.

So @Name("Bar") @Scope(scope = ScopeType.APPLICATION) @Stateful    @Startup class Bar{}
will create a singleton sfsb that any component would be able to access using:
@In Bar bar;

When I try that, I get a In value null.
Could someone point to the right a doc to clear up my misunderstandings.

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

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

More information about the jboss-user mailing list