I am trying to understand why @Factory is much less well represented in Seam 
examples than @Out (7 vs. 21 in CR2).
On the first glance, factories seem to play the same role as outjections, just 
lazy (or call it demand-drivden, pull-like, data flow, etc.). This mode of 
operation looks safer than outjections (supply-driven, push-like, etc.), as it 
automatically ensures synchronization of provider of a value and a consumer of 
this value; while using outjections, one must be carefull to synchronize 
components "manually" (probably using Seam events).

On the second glance, factories lack one feature supported by outjections - 
namely scoping. Using @Out it is possible to have multiple bindings for the 
same name in different scopes, while I don't see how this is possible for 
factories (in the current implementation).

So one question is - why are factories not used more often (and recommended to 
be used more often), and the another - why scoping is supported for eager value 
producers (@Out) but not for lazy ones (@Factory)?

Thanks again,

Andris Birkmanis

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

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


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to