[webbeans-dev] May we ditch the ScopeType annotation?
Mark Struberg
struberg at yahoo.de
Sat Aug 22 04:36:25 EDT 2009
After rereading the spec I noticed that the @ScopeType annotation has gone already *blush*
Still the question remains why we need a @NormalScope annotation instead of letting the Context know about it's capabilities.
Currently scopes with @Scope are automatically always pseudo scopes, without having the chance to change this.
txs,
strub
----- Original Message ----
> From: Mark Struberg <struberg at yahoo.de>
> To: webbeans-dev at lists.jboss.org
> Sent: Friday, August 21, 2009 11:28:28 AM
> Subject: [webbeans-dev] May we ditch the ScopeType annotation?
>
> Hi!
>
> Just a few thoughts.
>
> If we need our applications to use the @ScopeType annotation instead of the
> @Scope which is defined in JSR-330, we will never get apps for JSR-330 running
> on our System.
>
> Since Bob planes to introduce a portable SPI (as we currently have) for context
> implementations, it is imho increasingly important that we have to fully support
> @Scope. I think Bobs idea with the SPI is rubbish for JSR-330 as he will end up
> with the full blown complexity like we have, but being able to handle @Scope and
> only having to rewrite the Context implementations for it without touching the
> other parts of the app would be a huge improvement.
>
> So why do we need the ScopeType instead of only using javax.inject.Scope?
> a) normal scope vs pseudo scope
> b) marking passivation capable scopes
> anything missing?
>
> Imho all the information currently residing in @ScopeType may easily be moved to
> the Context! So I think it does make no difference if the annotations knows
> about if a scope is a normal scope or if the Context of that very scope knows
> about it as long as the info is there at the time the actual contextual instance
> gets created.
>
> So my proposal is as following:
> .) ditch ScopeType
> .) ditch NormalScope
> .) add isNormalScope() and isPassivating() to the Context interface or somewhere
> else in that area
>
> Wdyt?
>
> txs and LieGrue,
> strub
>
>
>
>
> _______________________________________________
> webbeans-dev mailing list
> webbeans-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/webbeans-dev
More information about the weld-dev
mailing list