Return-Path: Delivered-To: apmail-openwebbeans-commits-archive@www.apache.org Received: (qmail 51274 invoked from network); 5 Feb 2010 23:05:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Feb 2010 23:05:34 -0000 Received: (qmail 38361 invoked by uid 500); 5 Feb 2010 23:05:34 -0000 Delivered-To: apmail-openwebbeans-commits-archive@openwebbeans.apache.org Received: (qmail 38332 invoked by uid 500); 5 Feb 2010 23:05:34 -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 38322 invoked by uid 99); 5 Feb 2010 23:05:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Feb 2010 23:05:34 +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; Fri, 05 Feb 2010 23:05:33 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 1F4A6238890A; Fri, 5 Feb 2010 23:05:13 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r907124 - in /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans: config/BeansDeployer.java container/SerializableBeanVault.java Date: Fri, 05 Feb 2010 23:05:13 -0000 To: commits@openwebbeans.apache.org From: struberg@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100205230513.1F4A6238890A@eris.apache.org> Author: struberg Date: Fri Feb 5 23:05:12 2010 New Revision: 907124 URL: http://svn.apache.org/viewvc?rev=907124&view=rev Log: OWB-6 prevent SerializableBean wrapping itself Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/SerializableBeanVault.java Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java?rev=907124&r1=907123&r2=907124&view=diff ============================================================================== --- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java (original) +++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java Fri Feb 5 23:05:12 2010 @@ -111,7 +111,7 @@ * Deploys all the defined web beans components in the container startup. *

* It deploys from the web-beans.xml files and from the class files. It uses - * the {@link WebBeansScanner} class to get classes. + * the {@link org.apache.webbeans.spi.ScannerService} to get classes. *

* * @throws WebBeansDeploymentException if any deployment exception occurs Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/SerializableBeanVault.java URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/SerializableBeanVault.java?rev=907124&r1=907123&r2=907124&view=diff ============================================================================== --- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/SerializableBeanVault.java (original) +++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/SerializableBeanVault.java Fri Feb 5 23:05:12 2010 @@ -31,7 +31,7 @@ *

This class acts as a storage for {@link SerializableBean}s.

* *

The Background:

- *

Any Contextual<T> which holds his information on a storage which may get serialized, + *

Any Contextual<T> which holds it's information on a storage which may get serialized, * like e.g. the SessionContext, the ConversationContext or any 3-rd party Context * for a NormalScoped(passivating=true) and therefore PassivationCapable Scope needs to be Serializable.

*

Normal {@link Bean}s are not serializable because they contain non transportable information. But each @@ -53,6 +53,12 @@ @SuppressWarnings("unchecked") public Contextual getSerializableBean(Contextual bean) { + if (bean instanceof SerializableBean) + { + // we don't like to wrap SerializedBeans in itself! + return bean; + } + String id = null; if((id=WebBeansUtil.isPassivationCapable(bean)) != null)