Return-Path: Delivered-To: apmail-openwebbeans-commits-archive@www.apache.org Received: (qmail 74094 invoked from network); 24 Mar 2010 18:48:25 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 24 Mar 2010 18:48:25 -0000 Received: (qmail 82171 invoked by uid 500); 24 Mar 2010 18:48:25 -0000 Delivered-To: apmail-openwebbeans-commits-archive@openwebbeans.apache.org Received: (qmail 82135 invoked by uid 500); 24 Mar 2010 18:48:25 -0000 Mailing-List: contact commits-help@openwebbeans.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openwebbeans.apache.org Delivered-To: mailing list commits@openwebbeans.apache.org Received: (qmail 82124 invoked by uid 99); 24 Mar 2010 18:48:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Mar 2010 18:48:24 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Mar 2010 18:48:22 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 4BF2223888E7; Wed, 24 Mar 2010 18:48:01 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r927148 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java Date: Wed, 24 Mar 2010 18:48:01 -0000 To: commits@openwebbeans.apache.org From: struberg@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100324184801.4BF2223888E7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: struberg Date: Wed Mar 24 18:48:00 2010 New Revision: 927148 URL: http://svn.apache.org/viewvc?rev=927148&view=rev Log: OWB-329 only add dependent CreationalContext for @Dpendent beans This needs to be reverted, otherwise I got all @ApplicationScoped beans directly into the CreationalContext of another @NormalScopedBeans, which lead to SerializationExceptions Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java?rev=927148&r1=927147&r2=927148&view=diff ============================================================================== --- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java (original) +++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java Wed Mar 24 18:48:00 2010 @@ -714,9 +714,11 @@ public class BeanManagerImpl implements Bean injectedBean = (Bean)injectionResolver.getInjectionPointBean(injectionPoint); CreationalContextImpl injectedCreational = (CreationalContextImpl)createCreationalContext(injectedBean); - injectedCreational.setOwnerCreational(ownerCreationalContextImpl); if(WebBeansUtil.isDependent(injectedBean)) { + // this must only be added for dependent beans, otherwise we register @NormalScoped beans as dependent! + injectedCreational.setOwnerCreational(ownerCreationalContextImpl); + //Creating a new creational context for target bean instance instance = getReference(injectedBean, injectionPoint.getType(), injectedCreational); @@ -836,7 +838,7 @@ public class BeanManagerImpl implements } //Get dependent from DependentContex that create contextual instance - instance = context.get((Bean)bean, (CreationalContext)creationalContext); + instance = context.get((Bean)bean, (CreationalContext)creationalContext); } return instance;