Hi Hantsy,
You can bridge the JSR330 @Singleton scope via a CDI Extension.
MyFaces Codi already does so for the JSF Scopes.
In a CDI Extension you simply can replace the @Singleton annotation with the
@ApplicationScoped annotation.
Cheers,
Arne
-----Ursprüngliche Nachricht-----
Von: cdi-dev-bounces(a)lists.jboss.org [mailto:cdi-dev-bounces@lists.jboss.org] Im Auftrag
von Hantsy Bai
Gesendet: Mittwoch, 16. Mai 2012 08:04
An: Mark Struberg
Cc: cdi-dev(a)lists.jboss.org
Betreff: Re: [cdi-dev] How to process the scope in JEE7
Hi,
Spring provide a resolver to bridge JSR 330 Scope to Spring scope.
http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springfr...
Is there some solution like this in CDI spec? As a developer, I dislike so much
duplication and incompatibility in the future JEE 7...I have got pain when use JSF2 and
CDI in JEE6/Seam3.
I hope there are some solutions to unite them in CDI, deprecate JSR330 scope and bridge it
to CDI for compatibility.
Regards
Hantsy
On 5/15/2012 17:49, Mark Struberg wrote:
Hi!
My personal view/prediction:
* JSR-330 is fine as is. A few things like @Singleton and @Scope are completely useless
though because they are completely underspecified. Other parts are really fine and we will
continue to use it.
* all the EE @ManagedBean and state management should imo get deprecated in EE7. This
stuff is a.) technically broken and b.) not the right place. Imo it was purely the result
of political games...
LieGrue,
strub
----- Original Message -----
> From: Hantsy Bai<hantsy(a)gmail.com>
> To: cdi-dev(a)lists.jboss.org
> Cc:
> Sent: Tuesday, May 15, 2012 7:56 AM
> Subject: [cdi-dev] How to process the scope in JEE7
>
> Hi,
> CDI introduced NormalScope to create custom scope, I noticed there is
> another similar one in the JSR330, @Scope(and @Singleton)
> annotation, and there is also another "State management" standalone spec in
JEE7.
>
> Is there some cooperation with them in JEE7? and what is the
> successor of JSR 330 in JEE7?
>
> Regards
> Hantsy
> _______________________________________________
> cdi-dev mailing list
> cdi-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/cdi-dev
>
_______________________________________________
cdi-dev mailing list
cdi-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/cdi-dev