[jboss-user] [JBoss Seam] - @Factory and @Out: why required=false?

SmokingAPipe do-not-reply at jboss.com
Mon Jan 8 02:23:13 EST 2007

Ok, I'm not understanding something here.

I have a SFSB that with a snippet that looks like this:

  | @Out private Foo foo;
  | @Factory("foo") private void makeFoo() { .... }

and that causes a "foo did not exist but was required" exception when a page is first accessed.  This is within a conversation, and this is the first page to be accessed in that conversation.  If I put @Out(required=false) then it works as expected.

I don't get this.  Foo is required, but shouldn't the factory always create it when it is needed?  How can an @Out fail if there is a factory for that component?

I'm still not totally understanding the interplay between @Out and @Factory, and I'm also sometimes getting concurrent access exceptions if I try to do things in both @Begin and @Factory.  I know these things all have logic behind them but it hasn't sunk in to me yet.

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

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

More information about the jboss-user mailing list