openwebbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lars-Fredrik Smedberg <itsme...@gmail.com>
Subject Re: Scope of class containing non-static @Produces methods
Date Mon, 29 Dec 2014 17:15:45 GMT
Hi Romain

So @Dependent as the default scope for the producer does that mean that a
seperate instance of the producer class (the class containing the
non-static @Producer method) will be create for each produced value?

If I for example annotate the producer class @ApplicationScoped and let it
contain a @Produces method without a scope annotation the produced value
will still be @Dependent right?

Regards
LF


On Mon, Dec 29, 2014 at 4:28 PM, Romain Manni-Bucau <rmannibucau@gmail.com>
wrote:

> Hi
>
> default scope is @Dependent producer and produced value.
>
> Does it affects? depends. basically the produced value will be
> produced using the contextual producer instance this means if you have
> some state the produced value depends on then it will change the
> produced value otherwise it will not change anything excepted it will
> create one producer instance by "produce" invocation.
>
>
> Romain Manni-Bucau
> @rmannibucau
> http://www.tomitribe.com
> http://rmannibucau.wordpress.com
> https://github.com/rmannibucau
>
>
> 2014-12-29 16:25 GMT+01:00 Lars-Fredrik Smedberg <itsmeden@gmail.com>:
> > Hi
> >
> > Might have touched this question before but in that case I cannot find
> the
> > answer.
> >
> > I'm wondering what the scope of a class containing non-static @Produces
> > methods are if not explicitly specified? @RequestScoped?
> > Does the scope of the class containing the @Produces method in any way
> > affect the scope of the bean being produced?
> >
> > Any references to the CDI spec would be great to
> >
> > Regards
> > Lars-Fredrik
> >
> >
> >
> > --
> > Med vänlig hälsning / Best regards
> >
> > Lars-Fredrik Smedberg
> >
> > STATEMENT OF CONFIDENTIALITY:
> > The information contained in this electronic message and any
> > attachments to this message are intended for the exclusive use of the
> > address(es) and may contain confidential or privileged information. If
> > you are not the intended recipient, please notify Lars-Fredrik Smedberg
> > immediately at itsmeden@gmail.com, and destroy all copies of this
> > message and any attachments.
>



-- 
Med vänlig hälsning / Best regards

Lars-Fredrik Smedberg

STATEMENT OF CONFIDENTIALITY:
The information contained in this electronic message and any
attachments to this message are intended for the exclusive use of the
address(es) and may contain confidential or privileged information. If
you are not the intended recipient, please notify Lars-Fredrik Smedberg
immediately at itsmeden@gmail.com, and destroy all copies of this
message and any attachments.

Mime
View raw message