[jboss-user] [JBoss Seam] - Re: Injection woes
stan.silvert@jboss.com
do-not-reply at jboss.com
Tue Aug 15 19:38:42 EDT 2006
If it is in application scope then it isn't really a singleton. If it is in application scope that doesn't mean there is only one instance per web app. It just means that there is only one instance at a time. There is nothing to stop code from changing the value of "myClass" that is stored in application scope.
What might be interesting is a new scope called SINGLETON. The rule would be that you can add to the SINGLETON scope but you can't remove or replace anything.
So you would have:
@In(create = true)
| @Out(scope = SINGLETON)
| private SomeClass myClass;
Outjection would only happen if the myClass instance got created. Would that satisfy your use case?
Stan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965379#3965379
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965379
More information about the jboss-user
mailing list