You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by st...@apache.org on 2010/02/06 00:05:13 UTC
svn commit: r907124 - in
/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans:
config/BeansDeployer.java container/SerializableBeanVault.java
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.
* <p>
* 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.
* </p>
*
* @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 @@
* <p>This class acts as a storage for {@link SerializableBean}s.</p>
*
* <h3>The Background:</h3>
- * <p>Any Contextual<T> which holds his information on a storage which may get serialized,
+ * <p>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.</p>
* <p>Normal {@link Bean}s are not serializable because they contain non transportable information. But each
@@ -53,6 +53,12 @@
@SuppressWarnings("unchecked")
public <T> Contextual<T> getSerializableBean(Contextual<T> 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)