[webbeans-dev] @NormalScope and @Singleton
Mark Struberg
struberg at yahoo.de
Wed Aug 19 19:37:43 EDT 2009
Hi!
I'm a bit confused about the description of the pseudo scopes in the latest spec (but it's really late here, so I might missed the point)
a) ch 6.3:
> Any scope that is not a normal scope is called a pseudo-scope.
-> @Singleton [1] is per se only @Scope but not @NormalScope,
> The concept of a current instance is not well-defined in the case of a pseudo-scope.
-> but instances of @Singleton are pretty well defined, isn't?
Maybe we should introduce @Passivating and @PseudoScope instead of @NormalScope and invert the logic?
b) ch 6.3
> All pseudo-scopes must be explicitly declared @NormalScope,
> to indicate to the container that no client proxy is required.
vs ch 5.5
> A contextual reference to a bean with a normal scope ...
> ..not a direct reference...
> Instead, the contextual reference is a client proxy object.
I'd say pseudo scopes must _not_ declare @NormalScope?
txs and LieGrue,
strub
[1] http://atinject.googlecode.com/svn/trunk/javadoc/javax/inject/Singleton.html
More information about the weld-dev
mailing list