Return-Path: X-Original-To: apmail-openwebbeans-user-archive@www.apache.org Delivered-To: apmail-openwebbeans-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6DC11109B0 for ; Mon, 29 Dec 2014 17:16:30 +0000 (UTC) Received: (qmail 23641 invoked by uid 500); 29 Dec 2014 17:16:30 -0000 Delivered-To: apmail-openwebbeans-user-archive@openwebbeans.apache.org Received: (qmail 23613 invoked by uid 500); 29 Dec 2014 17:16:30 -0000 Mailing-List: contact user-help@openwebbeans.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@openwebbeans.apache.org Delivered-To: mailing list user@openwebbeans.apache.org Received: (qmail 23603 invoked by uid 99); 29 Dec 2014 17:16:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Dec 2014 17:16:30 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of itsmeden@gmail.com designates 209.85.216.182 as permitted sender) Received: from [209.85.216.182] (HELO mail-qc0-f182.google.com) (209.85.216.182) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Dec 2014 17:16:26 +0000 Received: by mail-qc0-f182.google.com with SMTP id r5so9707248qcx.13 for ; Mon, 29 Dec 2014 09:16:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=jgvfDDIjb13KVjX1zSnKQ3ABCsYQKdTnkYtEBdtckxY=; b=OVWzYCaTtVWCsiaOcYimbTTWajbgARzGH95ExmuCg7xkp101PzQkC9L7wM1tlCM2ak KHU/puwu1Fya5gDD4ViqRE//9EJwEtqQCxp7qVbPz74TtycaL0hGkPOvFSFFTihUXml7 IOb61ZhsYlJU+I913a4G+n2GCHXZ/UvD7i1pwNzVkJkW/eeWLtPd5nuHlp7k2CGONv51 UWJams0Rnb0DJdFYwn8jPzPC6WrmKbXMpds0lKsDWGX//SZHi7kUJVR98hDs67J+i668 ePHqHrQRRlt0/1wtHnr2Q+lnr7DhbGBQQVDgj+o4AcUAy1K8sZnIxdmJUQg9P3fTWm1d VagA== X-Received: by 10.140.86.175 with SMTP id p44mr90002524qgd.54.1419873365837; Mon, 29 Dec 2014 09:16:05 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.40.38 with HTTP; Mon, 29 Dec 2014 09:15:45 -0800 (PST) In-Reply-To: References: From: Lars-Fredrik Smedberg Date: Mon, 29 Dec 2014 18:15:45 +0100 Message-ID: Subject: Re: Scope of class containing non-static @Produces methods To: "user@openwebbeans.apache.org" Content-Type: multipart/alternative; boundary=001a11c1259298cd7b050b5e0748 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c1259298cd7b050b5e0748 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 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 : > > 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=C3=A4nlig h=C3=A4lsning / 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. > --=20 Med v=C3=A4nlig h=C3=A4lsning / 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. --001a11c1259298cd7b050b5e0748 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Romain

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

If I for example ann= otate the producer class @ApplicationScoped and let it contain a @Produces = method without a scope annotation the produced value will still be @Depende= nt right?

Regards
LF


On Mon, De= c 29, 2014 at 4:28 PM, Romain Manni-Bucau <rmannibucau@gmail.com&g= t; 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://rmann= ibucau.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 @Pro= duces
> 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=C3=A4nlig h=C3=A4lsning / 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<= br> > address(es) and may contain confidential or privileged information. If=
> you are not the intended recipient, please notify Lars-Fredrik Smedber= g
> immediately at itsmeden@gmail.co= m, and destroy all copies of this
> message and any attachments.



--
=
Med v=C3=A4nlig h=C3=A4lsning / Best regards=

Lars-Fredrik Smedberg

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