>From the documentation for the @Out annotation:

Specifies the scope to outject to. If no scope is explicitly specified, the 
default scope depends upon whether the value is an instance of a Seam 
component. If it is, the component scope is used. Otherwise, the scope of the 
component with the @Out attribute is used. But if the component scope is 
STATELESS, the EVENT scope is used. - 
http://www.redhat.com/docs/manuals/jboss/jboss-eap-4.2/doc/seam/api/org/jboss/seam/annotations/Out.html

Here is how I understand it
If scope is explicitly specified:
  |      the  specified scope is used
  | otherwise:
  |      if the outjected variable is a seam component:
  |           The seam component's scope is used
  |      otherwise
  |           If scope of the component outjecting the variable is stateless
  |                event scope is used
  |           otherwise
  |                the scope of the component outjecting the variable is used
Looking at my example I would say that the List I am trying to outject is not a 
seam component. (The objects contained in the list are seam components, but the 
List being outjected is not). That is based on my understanding that a Seam 
component is declared with the @Name annotation. Is this correct? If anyone can 
confirm this or set me straight I would appreciate it.

This brings up more questions. 

1. What is the difference between doing this:

@Stateless
  | @Name("clientTransmittalLineItemAction")
  | public class MySessionBeanImpl implements MySessionBean
  | {

and this?: 
@Stateful
  | @Name("clientTransmittalLineItemAction")
  | @Scope(ScopeType.STATELESS)
  | public class MySessionBeanImpl implements MySessionBean
  | {

2. Is the second option even possible? 
3. T or F? if you have a stateless session bean there is not any point in using 
the @Scope annotation. 
4. T or F? If you have a stateful session bean you can specify any scope using 
the @Scope annotation other than ScopeType.STATELESS


It seems that 90% of Seam examples in books and online all use SFSB. I am 
trying to understand when and how a SLSB would be better to use than a SFSB. 
Any help is appreciated.


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4105148
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to